public class ResourceMappings extends Object implements Iterable<ResourceMetadata>
ResourceMetadata
and ResourceMapping
instances for domain types and
repositories.Constructor and Description |
---|
ResourceMappings(RepositoryRestConfiguration config,
Repositories repositories)
|
ResourceMappings(RepositoryRestConfiguration config,
Repositories repositories,
org.springframework.hateoas.RelProvider relProvider)
Creates a new
ResourceMappings from the given RepositoryRestConfiguration , Repositories and
RelProvider . |
Modifier and Type | Method and Description |
---|---|
boolean |
exportsMappingFor(Class<?> type)
Returns whether we have a
ResourceMapping for the given type and it is exported. |
boolean |
exportsTopLevelResourceFor(String path)
Returns whether we export a top-level resource for the given path.
|
ResourceMetadata |
getMappingFor(Class<?> type)
Returns a
ResourceMetadata for the given type if available. |
SearchResourceMappings |
getSearchResourceMappings(Class<?> type)
Returns the
ResourceMapping s for the search resources of the given type. |
boolean |
hasMappingFor(Class<?> type)
Returns whether we have a
ResourceMapping for the given type. |
boolean |
isMapped(PersistentProperty<?> property) |
Iterator<ResourceMetadata> |
iterator() |
public ResourceMappings(RepositoryRestConfiguration config, Repositories repositories)
config
- repositories
- public ResourceMappings(RepositoryRestConfiguration config, Repositories repositories, org.springframework.hateoas.RelProvider relProvider)
ResourceMappings
from the given RepositoryRestConfiguration
, Repositories
and
RelProvider
.config
- must not be null.repositories
- must not be null.relProvider
- must not be null.public ResourceMetadata getMappingFor(Class<?> type)
ResourceMetadata
for the given type if available.type
- must not be null.public SearchResourceMappings getSearchResourceMappings(Class<?> type)
ResourceMapping
s for the search resources of the given type.type
- must not be null.public boolean exportsMappingFor(Class<?> type)
ResourceMapping
for the given type and it is exported.type
- public boolean exportsTopLevelResourceFor(String path)
path
- must not be null or empty.public boolean hasMappingFor(Class<?> type)
ResourceMapping
for the given type.type
- must not be null.public boolean isMapped(PersistentProperty<?> property)
public Iterator<ResourceMetadata> iterator()
iterator
in interface Iterable<ResourceMetadata>
Copyright © 2011-2013-2014 Pivotal. All Rights Reserved.