Interface ResourceMappings
- All Superinterfaces:
Iterable<ResourceMetadata>,Streamable<ResourceMetadata>,Supplier<Stream<ResourceMetadata>>
- All Known Implementing Classes:
PersistentEntitiesResourceMappings,RepositoryResourceMappings
- Author:
- Oliver Gierke
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexportsMappingFor(Class<?> type) Returns whether we have aResourceMappingfor the given type and it is exported.booleanReturns whether we export a top-level resource for the given path.@Nullable ResourceMetadatagetMetadataFor(Class<?> type) Returns aResourceMetadatafor the given type if available.default ResourceMetadatagetRequiredMetadataFor(Class<?> type) Returns the requiredResourceMetadatafor the given type or throwsIllegalStateException.getSearchResourceMappings(Class<?> type) Returns theResourceMappings for the search resources of the given type.booleanhasMappingFor(Class<?> type) Returns whether we have aResourceMappingfor the given type.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getMetadataFor
Returns aResourceMetadatafor the given type if available.- Parameters:
type- must not be null.- Returns:
- the
ResourceMetadataif available or null otherwise.
-
getRequiredMetadataFor
Returns the requiredResourceMetadatafor the given type or throwsIllegalStateException.- Parameters:
type- must not be null.- Returns:
- the
ResourceMetadataif available or null otherwise. - Throws:
IllegalArgumentException- if noResourceMetadatais available for the given type.- Since:
- 5.0
-
getSearchResourceMappings
Returns theResourceMappings for the search resources of the given type.- Parameters:
type- must not be null.- Returns:
- will never be null.
-
exportsMappingFor
Returns whether we have aResourceMappingfor the given type and it is exported.- Parameters:
type-- Returns:
-
exportsTopLevelResourceFor
Returns whether we export a top-level resource for the given path.- Parameters:
path- must not be null or empty.- Returns:
-
hasMappingFor
Returns whether we have aResourceMappingfor the given type.- Parameters:
type- must not be null.- Returns:
-