public class MappingResourceMetadata extends Object implements ResourceMetadata
ResourceMetadata based on a PersistentEntity.| Constructor and Description |
|---|
MappingResourceMetadata(PersistentEntity<?,?> entity)
Creates a new
MappingResourceMetadata for the given PersistentEntity. |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getDefaultPathFor(Class<?> type)
Returns the default path to be used if the path is not configured manually.
|
ResourceDescription |
getDescription()
Returns the resource's description.
|
Class<?> |
getDomainType()
Returns the domain type that is exposed through the resource.
|
Class<?> |
getExcerptProjection()
Returns the projection type to be used when embedding item resources into collections and related resources.
|
ResourceDescription |
getItemResourceDescription()
Returns the
ResourceDescription for the item resource. |
String |
getItemResourceRel()
Returns the relation type pointing to the item resource within a collection.
|
ResourceMapping |
getMappingFor(PersistentProperty<?> property)
Returns the
ResourceMapping for the given PersistentProperty or null if not managed. |
Path |
getPath()
Returns the path the resource is exposed under.
|
String |
getRel()
Returns the relation for the resource exported.
|
SearchResourceMappings |
getSearchResourceMappings()
Returns the
SearchResourceMappings, i.e. the mappings for the search resource exposed for the current
resource. |
boolean |
isExported()
Returns whether the component shall be exported at all.
|
boolean |
isExported(PersistentProperty<?> property)
Returns whether the given
PersistentProperty is a managed resource and in fact exported. |
boolean |
isManagedResource(PersistentProperty<?> property)
Returns whether the type of the given
PersistentProperty is exposed as resource itself. |
boolean |
isPagingResource()
Returns whether the resource is paging one.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetExcerptProjection, getItemResourceDescription, getItemResourceRelgetDescription, getPath, getRel, isExported, isPagingResourcepublic MappingResourceMetadata(PersistentEntity<?,?> entity)
MappingResourceMetadata for the given PersistentEntity.entity - must not be null.public Class<?> getDomainType()
ResourceMetadatagetDomainType in interface ResourceMetadatapublic boolean isManagedResource(PersistentProperty<?> property)
ResourceMetadataPersistentProperty is exposed as resource itself.isManagedResource in interface ResourceMetadataproperty - must not be null.public boolean isExported(PersistentProperty<?> property)
ResourceMetadataPersistentProperty is a managed resource and in fact exported.isExported in interface ResourceMetadataproperty - must not be null.public ResourceMapping getMappingFor(PersistentProperty<?> property)
ResourceMetadataResourceMapping for the given PersistentProperty or null if not managed.getMappingFor in interface ResourceMetadataproperty - must not be null.public SearchResourceMappings getSearchResourceMappings()
ResourceMetadataSearchResourceMappings, i.e. the mappings for the search resource exposed for the current
resource.getSearchResourceMappings in interface ResourceMetadatapublic Path getPath()
ResourceMappinggetPath in interface ResourceMappingpublic boolean isExported()
ResourceMappingisExported in interface ResourceMappingpublic String getRel()
ResourceMappinggetRel in interface ResourceMappingpublic String getItemResourceRel()
CollectionResourceMappinggetItemResourceRel in interface CollectionResourceMappingpublic boolean isPagingResource()
ResourceMappingisPagingResource in interface ResourceMappingpublic ResourceDescription getDescription()
ResourceMappinggetDescription in interface ResourceMappingpublic ResourceDescription getItemResourceDescription()
CollectionResourceMappingResourceDescription for the item resource.getItemResourceDescription in interface CollectionResourceMappingpublic Class<?> getExcerptProjection()
CollectionResourceMappinggetExcerptProjection in interface CollectionResourceMappingCopyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.