public class RepositoryResourceMappings extends Object implements ResourceMappings
ResourceMetadata
and ResourceMapping
instances for domain types and
repositories.Constructor and Description |
---|
RepositoryResourceMappings(RepositoryRestConfiguration config,
Repositories repositories)
Creates a new
RepositoryResourceMappings using the given RepositoryRestConfiguration and
Repositories . |
RepositoryResourceMappings(RepositoryRestConfiguration config,
Repositories repositories,
org.springframework.hateoas.RelProvider relProvider)
Creates a new
RepositoryResourceMappings 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 RepositoryResourceMappings(RepositoryRestConfiguration config, Repositories repositories)
RepositoryResourceMappings
using the given RepositoryRestConfiguration
and
Repositories
.config
- repositories
- public RepositoryResourceMappings(RepositoryRestConfiguration config, Repositories repositories, org.springframework.hateoas.RelProvider relProvider)
RepositoryResourceMappings
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)
ResourceMappings
ResourceMetadata
for the given type if available.getMappingFor
in interface ResourceMappings
type
- must not be null.public SearchResourceMappings getSearchResourceMappings(Class<?> type)
ResourceMappings
ResourceMapping
s for the search resources of the given type.getSearchResourceMappings
in interface ResourceMappings
type
- must not be null.public boolean exportsMappingFor(Class<?> type)
ResourceMappings
ResourceMapping
for the given type and it is exported.exportsMappingFor
in interface ResourceMappings
public boolean exportsTopLevelResourceFor(String path)
ResourceMappings
exportsTopLevelResourceFor
in interface ResourceMappings
path
- must not be null or empty.public boolean hasMappingFor(Class<?> type)
ResourceMappings
ResourceMapping
for the given type.hasMappingFor
in interface ResourceMappings
type
- must not be null.public boolean isMapped(PersistentProperty<?> property)
public Iterator<ResourceMetadata> iterator()
iterator
in interface Iterable<ResourceMetadata>
Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.