Class SearchResourceMappings
java.lang.Object
org.springframework.data.rest.core.mapping.SearchResourceMappings
- All Implemented Interfaces:
Iterable<MethodResourceMapping>
,ResourceMapping
public class SearchResourceMappings
extends Object
implements Iterable<MethodResourceMapping>, ResourceMapping
ResourceMapping
for all search resources.- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorDescriptionSearchResourceMappings
(List<MethodResourceMapping> mappings) Creates a newSearchResourceMappings
from the given -
Method Summary
Modifier and TypeMethodDescriptionReturns the resource's description.Returns the mappings for all exported query methods.Returns theMethodResourceMapping
for the given path.Returns theMappingResourceMetadata
for the given relation name.getMappedMethod
(String path) Returns the method mapped to the given path.getPath()
Returns the path the resource is exposed under.getRel()
Returns the relation for the resource exported.boolean
Returns whether the component shall be exported at all.boolean
Returns whether the resource is paging one.iterator()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SearchResourceMappings
Creates a newSearchResourceMappings
from the given- Parameters:
mappings
-
-
-
Method Details
-
getMappedMethod
Returns the method mapped to the given path.- Parameters:
path
- must not be null or empty.- Returns:
-
getExportedMappings
Returns the mappings for all exported query methods.- Returns:
- Since:
- 2.3
-
getExportedMethodMappingForRel
Returns theMappingResourceMetadata
for the given relation name.- Parameters:
rel
- must not be null.- Returns:
- Since:
- 2.3
-
getExportedMethodMappingForPath
Returns theMethodResourceMapping
for the given path.- Parameters:
path
- must not be null or empty.- Returns:
- Since:
- 2.4
-
getPath
Description copied from interface:ResourceMapping
Returns the path the resource is exposed under.- Specified by:
getPath
in interfaceResourceMapping
- Returns:
- will never be null.
-
getRel
Description copied from interface:ResourceMapping
Returns the relation for the resource exported.- Specified by:
getRel
in interfaceResourceMapping
- Returns:
- will never be null.
-
isExported
public boolean isExported()Description copied from interface:ResourceMapping
Returns whether the component shall be exported at all.- Specified by:
isExported
in interfaceResourceMapping
- Returns:
- will never be null.
-
isPagingResource
public boolean isPagingResource()Description copied from interface:ResourceMapping
Returns whether the resource is paging one.- Specified by:
isPagingResource
in interfaceResourceMapping
- Returns:
-
getDescription
Description copied from interface:ResourceMapping
Returns the resource's description.- Specified by:
getDescription
in interfaceResourceMapping
- Returns:
-
iterator
- Specified by:
iterator
in interfaceIterable<MethodResourceMapping>
-