Class HalJacksonModule.EmbeddedMapper
java.lang.Object
org.springframework.hateoas.mediatype.hal.HalJacksonModule.EmbeddedMapper
- Enclosing class:
- HalJacksonModule
Helper to easily map embedded resources and find out whether they were curied.
- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorsConstructorDescriptionEmbeddedMapper(LinkRelationProvider relProvider, CurieProvider curieProvider, boolean preferCollectionRels) -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasCuriedEmbed(Iterable<?> source) Returns whether the given source elements will be namespaced.Maps the given source elements as embedded values.map(LinkRelation source) Maps the givenHalLinkRelationusing the underlying relation transformer.with(@Nullable tools.jackson.databind.PropertyNamingStrategy strategy) Registers the givenPropertyNamingStrategywith the current mapper to forward that strategy as relation transformer, so thatLinkRelations used as key for the embedding will be transformed using the given strategy.
-
Constructor Details
-
EmbeddedMapper
public EmbeddedMapper(LinkRelationProvider relProvider, CurieProvider curieProvider, boolean preferCollectionRels)
-
-
Method Details
-
with
public HalJacksonModule.EmbeddedMapper with(@Nullable tools.jackson.databind.PropertyNamingStrategy strategy) Registers the givenPropertyNamingStrategywith the current mapper to forward that strategy as relation transformer, so thatLinkRelations used as key for the embedding will be transformed using the given strategy.- Parameters:
strategy- must not be null.- Returns:
- an
HalJacksonModule.EmbeddedMapperapplying the given strategy when mapping embedded objects.
-
map
Maps the given source elements as embedded values.- Parameters:
source- must not be null.- Returns:
-
map
Maps the givenHalLinkRelationusing the underlying relation transformer.- Parameters:
source- must not be null.- Returns:
-
hasCuriedEmbed
Returns whether the given source elements will be namespaced.- Parameters:
source- must not be null.- Returns:
-