public interface ResourceLocator
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COLLECTION_RESOURCE |
static java.lang.String |
ENTITY_ID |
static java.lang.String |
RELATIONSHIP_ID |
static java.lang.String |
RELATIONSHIP_RESOURCE |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map |
locateEmbeddedResources(Api api,
java.util.Map embeddedKeys)
For a given Map finds any resources that should be embedded inside a class.
|
ResourceWithMetadata |
locateEntityResource(Api api,
java.lang.String resourceName,
org.springframework.http.HttpMethod httpMethod)
Finds an Entity Resource and returns it in ResourceWithMetadata wrapper.
|
java.util.Map |
locateRelationResource(Api api,
java.lang.String entityKey,
java.util.Collection relationshipKeys,
org.springframework.http.HttpMethod httpMethod)
Finds multiple relationship Resources and returns them as a Map of ResourceWithMetadata.
|
ResourceWithMetadata |
locateRelationResource(Api api,
java.lang.String resourceName,
java.lang.String relationName,
org.springframework.http.HttpMethod httpMethod)
Finds an Relationship Resource and returns it in ResourceWithMetadata wrapper.
|
ResourceWithMetadata |
locateResource(Api api,
java.util.Map templateVars,
org.springframework.http.HttpMethod httpMethod)
Used by webscripts to locate a resource based on the URL template variables.
|
static final java.lang.String COLLECTION_RESOURCE
static final java.lang.String ENTITY_ID
static final java.lang.String RELATIONSHIP_RESOURCE
static final java.lang.String RELATIONSHIP_ID
ResourceWithMetadata locateEntityResource(Api api, java.lang.String resourceName, org.springframework.http.HttpMethod httpMethod) throws InvalidArgumentException, UnsupportedResourceOperationException
api - - The API being used.resourceName - - The entity resource name - this is the "name" property on the @EntityResource annotation.httpMethod - - A permitted HttpMethodInvalidArgumentException - - thrown if either the api or resourceName's are invalid. ie. A resource doesn't exist.UnsupportedResourceOperationException - - throw if the resource does not support the specified HttpMethod.ResourceWithMetadata locateRelationResource(Api api, java.lang.String resourceName, java.lang.String relationName, org.springframework.http.HttpMethod httpMethod) throws InvalidArgumentException, UnsupportedResourceOperationException
api - - The API being used.resourceName - - The entity resource name - this is the "entityResourceName" property on the @RelationshipResource annotation.relationName - - The relationship resource name - this is the "name" property on the @RelationshipResource annotation.httpMethod - - A permitted HttpMethodInvalidArgumentException - - thrown if either the api or resourceName's are invalid. ie. A resource doesn't exist.UnsupportedResourceOperationException - - throw if the resource does not support the specified HttpMethod.ResourceWithMetadata locateResource(Api api, java.util.Map templateVars, org.springframework.http.HttpMethod httpMethod)
api - - The API being used.templateVars - A map of variables representing the requesthttpMethod - - A permitted HttpMethodjava.util.Map locateEmbeddedResources(Api api, java.util.Map embeddedKeys)
api - - The API being used.embeddedKeys - - Likely to be the result of a call to ResourceInspector.findEmbeddedResources()java.util.Map locateRelationResource(Api api, java.lang.String entityKey, java.util.Collection relationshipKeys, org.springframework.http.HttpMethod httpMethod) throws InvalidArgumentException, UnsupportedResourceOperationException
api - - The API being used.entityKey - - this is the "entityResourceName" property on the @RelationshipResource annotation.relationshipKeys - - The relationship resource names - this is the "name" property on the @RelationshipResource annotation.httpMethod - - A permitted HttpMethodInvalidArgumentException - - thrown if either the api or resourceName's are invalid. ie. A resource doesn't exist.UnsupportedResourceOperationException - - throw if the resource does not support the specified HttpMethod.Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.