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.
|
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, wait
getItemResourceDescription, getItemResourceRel
getDescription, getPath, getRel, isExported, isPagingResource
public MappingResourceMetadata(PersistentEntity<?,?> entity)
MappingResourceMetadata
for the given PersistentEntity
.entity
- must not be null.public Class<?> getDomainType()
ResourceMetadata
getDomainType
in interface ResourceMetadata
public boolean isManagedResource(PersistentProperty<?> property)
ResourceMetadata
PersistentProperty
is exposed as resource itself.isManagedResource
in interface ResourceMetadata
property
- must not be null.public boolean isExported(PersistentProperty<?> property)
ResourceMetadata
PersistentProperty
is a managed resource and in fact exported.isExported
in interface ResourceMetadata
property
- must not be null.public ResourceMapping getMappingFor(PersistentProperty<?> property)
ResourceMetadata
ResourceMapping
for the given PersistentProperty
or null if not managed.getMappingFor
in interface ResourceMetadata
property
- must not be null.public SearchResourceMappings getSearchResourceMappings()
ResourceMetadata
SearchResourceMappings
, i.e. the mappings for the search resource exposed for the current
resource.getSearchResourceMappings
in interface ResourceMetadata
public Path getPath()
ResourceMapping
getPath
in interface ResourceMapping
public boolean isExported()
ResourceMapping
isExported
in interface ResourceMapping
public String getRel()
ResourceMapping
getRel
in interface ResourceMapping
public String getItemResourceRel()
CollectionResourceMapping
getItemResourceRel
in interface CollectionResourceMapping
public boolean isPagingResource()
ResourceMapping
isPagingResource
in interface ResourceMapping
public ResourceDescription getDescription()
ResourceMapping
getDescription
in interface ResourceMapping
public ResourceDescription getItemResourceDescription()
CollectionResourceMapping
ResourceDescription
for the item resource.getItemResourceDescription
in interface CollectionResourceMapping
Copyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.