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
ConstructorsConstructorDescriptionSearchResourceMappings(List<MethodResourceMapping> mappings) Creates a newSearchResourceMappingsfrom the given -
Method Summary
Modifier and TypeMethodDescriptionReturns the resource's description.Returns the mappings for all exported query methods.Returns theMethodResourceMappingfor the given path.Returns theMappingResourceMetadatafor 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.booleanReturns whether the component shall be exported at all.booleanReturns whether the resource is paging one.iterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SearchResourceMappings
Creates a newSearchResourceMappingsfrom 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 theMappingResourceMetadatafor the given relation name.- Parameters:
rel- must not be null.- Returns:
- Since:
- 2.3
-
getExportedMethodMappingForPath
Returns theMethodResourceMappingfor the given path.- Parameters:
path- must not be null or empty.- Returns:
- Since:
- 2.4
-
getPath
Description copied from interface:ResourceMappingReturns the path the resource is exposed under.- Specified by:
getPathin interfaceResourceMapping- Returns:
- will never be null.
-
getRel
Description copied from interface:ResourceMappingReturns the relation for the resource exported.- Specified by:
getRelin interfaceResourceMapping- Returns:
- will never be null.
-
isExported
public boolean isExported()Description copied from interface:ResourceMappingReturns whether the component shall be exported at all.- Specified by:
isExportedin interfaceResourceMapping- Returns:
- will never be null.
-
isPagingResource
public boolean isPagingResource()Description copied from interface:ResourceMappingReturns whether the resource is paging one.- Specified by:
isPagingResourcein interfaceResourceMapping- Returns:
-
getDescription
Description copied from interface:ResourceMappingReturns the resource's description.- Specified by:
getDescriptionin interfaceResourceMapping- Returns:
-
iterator
- Specified by:
iteratorin interfaceIterable<MethodResourceMapping>
-