Package org.alfresco.rest.framework.core
Class ResourceMetadata
- java.lang.Object
-
- org.alfresco.rest.framework.core.ResourceMetadata
-
- Direct Known Subclasses:
OperationResourceMetaData
public class ResourceMetadata extends Object
Describes a resource and its properties. Metadata about what functions the resource can perform and what properties it has.- Author:
- Gethin James, janv
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResourceMetadata.RESOURCE_TYPE
-
Constructor Summary
Constructors Constructor Description ResourceMetadata(String uniqueId, ResourceMetadata.RESOURCE_TYPE type, List<ResourceOperation> operations, Api api, Set<Class<? extends ResourceAction>> apiDeleted, Set<Class<? extends ResourceAction>> apiNoAuth, String parentResource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Api
getApi()
protected Set<Class<? extends ResourceAction>>
getApiDeleted()
Class
getObjectType(ResourceOperation operation)
Gets the data type of the resource parameterResourceOperation
getOperation(org.springframework.http.HttpMethod supportedMethod)
Gets the operation for the specified HTTPMethodList<ResourceOperation>
getOperations()
String
getParentResource()
ResourceMetadata.RESOURCE_TYPE
getType()
The type of this resourceString
getUniqueId()
URL uniqueId to the resourceboolean
isDeleted(Class<? extends ResourceAction> resourceAction)
Indicates if this resource action is no longer supported.boolean
isNoAuth(Class<? extends ResourceAction> resourceAction)
Indicates if this resource action supports unauthenticated access.String
toString()
-
-
-
Constructor Detail
-
ResourceMetadata
public ResourceMetadata(String uniqueId, ResourceMetadata.RESOURCE_TYPE type, List<ResourceOperation> operations, Api api, Set<Class<? extends ResourceAction>> apiDeleted, Set<Class<? extends ResourceAction>> apiNoAuth, String parentResource)
-
-
Method Detail
-
getOperation
public ResourceOperation getOperation(org.springframework.http.HttpMethod supportedMethod)
Gets the operation for the specified HTTPMethod- Parameters:
supportedMethod
- HttpMethod- Returns:
- null if the operation is not supported
-
getObjectType
public Class getObjectType(ResourceOperation operation)
Gets the data type of the resource parameter- Parameters:
operation
-ResourceOperation
object- Returns:
- The data type of the resource parameter
-
isDeleted
public boolean isDeleted(Class<? extends ResourceAction> resourceAction)
Indicates if this resource action is no longer supported.- Returns:
- true if it is no longer supported
-
isNoAuth
public boolean isNoAuth(Class<? extends ResourceAction> resourceAction)
Indicates if this resource action supports unauthenticated access.- Parameters:
resourceAction
-- Returns:
-
getUniqueId
public String getUniqueId()
URL uniqueId to the resource- Returns:
- String uniqueId
-
getType
public ResourceMetadata.RESOURCE_TYPE getType()
The type of this resource- Returns:
- RESOURCE_TYPE type
-
getApi
public Api getApi()
- Returns:
- the api
-
getOperations
public List<ResourceOperation> getOperations()
-
getApiDeleted
protected Set<Class<? extends ResourceAction>> getApiDeleted()
-
getParentResource
public String getParentResource()
-
-