Class Jackson2HalModule.EmbeddedMapper

java.lang.Object
org.springframework.hateoas.mediatype.hal.Jackson2HalModule.EmbeddedMapper
Enclosing class:
Jackson2HalModule

public static class Jackson2HalModule.EmbeddedMapper extends Object
Helper to easily map embedded resources and find out whether they were curied.
Author:
Oliver Gierke
  • Constructor Details

  • Method Details

    • with

      public Jackson2HalModule.EmbeddedMapper with(@Nullable com.fasterxml.jackson.databind.PropertyNamingStrategy strategy)
      Registers the given PropertyNamingStrategy with the current mapper to forward that strategy as relation transformer, so that LinkRelations used as key for the embedding will be transformed using the given strategy.
      Parameters:
      strategy - must not be null.
      Returns:
      an Jackson2HalModule.EmbeddedMapper applying the given strategy when mapping embedded objects.
    • map

      public Map<HalLinkRelation,Object> map(Iterable<?> source)
      Maps the given source elements as embedded values.
      Parameters:
      source - must not be null.
      Returns:
    • map

      public HalLinkRelation map(LinkRelation source)
      Maps the given HalLinkRelation using the underlying relation transformer.
      Parameters:
      source - must not be null.
      Returns:
    • hasCuriedEmbed

      public boolean hasCuriedEmbed(Iterable<?> source)
      Returns whether the given source elements will be namespaced.
      Parameters:
      source - must not be null.
      Returns: