Class PathUtil.PathResult

java.lang.Object
com.broadleafcommerce.translation.mapping.PathUtil.PathResult
Enclosing class:
PathUtil

public static class PathUtil.PathResult extends Object
The transformed path and final target object and field of the path. For example, a path like options[0].label in a translation API request would be transformed into options[id=01ES1NBHETX0Y20AHH85961X77].label.
  • Constructor Details

  • Method Details

    • getTransformedPath

      public String getTransformedPath()
      The transformed path that takes into account id based collection members, if applicable
    • getTranslatableFieldContainer

      public Object getTranslatableFieldContainer()
      The sub-object that owns the translatable field
    • getTranslatableField

      @Nullable public Field getTranslatableField()
      The field on the sub-object that contains the translatable String value. Nullable in the case where isContainerSimpleMap is true, since there is no field.
    • isContainerSimpleMap

      public boolean isContainerSimpleMap()
      Whether the translatableFieldContainer is a simple Map and not a complex attributes map. In this case, there is no translatableField, instead we need to use Map.get(Object).
      Since:
      2.0.3
    • getSimpleMapKey

      @Nullable public String getSimpleMapKey()
      If isContainerSimpleMap is true, then this contains the key in the map where the translatable value should be set.
      Since:
      2.0.3
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object