Class DefaultExcerptProjector
java.lang.Object
org.springframework.data.rest.webmvc.support.DefaultExcerptProjector
- All Implemented Interfaces:
ExcerptProjector
- Direct Known Subclasses:
PersistentEntityProjector
DefaultedPageable implementation of ExcerptProjector that uses the given ProjectionFactory
and considers the given ResourceMappings.- Since:
- 2.5
- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultExcerptProjector(ProjectionFactory factory, ResourceMappings mappings) -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasExcerptProjection(Class<?> type) Returns whether an excerpt projection has been registered for the given type.projectExcerpt(Object source) Creates a excerpt projection for the given source.
-
Constructor Details
-
DefaultExcerptProjector
-
-
Method Details
-
projectExcerpt
Description copied from interface:ExcerptProjectorCreates a excerpt projection for the given source. If no excerpt projection is available, the object will be returned as is. If you completely wish to skip handling the object, check for the presence of an excerpt projection usingExcerptProjector.hasExcerptProjection(Class).- Specified by:
projectExcerptin interfaceExcerptProjector- Parameters:
source- must not be null.- Returns:
-
hasExcerptProjection
Description copied from interface:ExcerptProjectorReturns whether an excerpt projection has been registered for the given type.- Specified by:
hasExcerptProjectionin interfaceExcerptProjector- Parameters:
type- must not be null.- Returns:
-