Class PathUtil.PathResult
java.lang.Object
com.broadleafcommerce.translation.mapping.PathUtil.PathResult
- Enclosing class:
- PathUtil
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 Summary
ConstructorsConstructorDescriptionPathResult
(String transformedPath, Object translatableFieldContainer, boolean isContainerSimpleMap, Field translatableField, String simpleMapKey) PathResult
(String transformedPath, Object translatableFieldContainer, Field translatableField) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
IfisContainerSimpleMap
is true, then this contains the key in the map where the translatable value should be set.The transformed path that takes into account id based collection members, if applicableThe field on the sub-object that contains the translatable String value.The sub-object that owns the translatable fieldint
hashCode()
boolean
Whether thetranslatableFieldContainer
is a simpleMap
and not a complex attributes map.toString()
-
Constructor Details
-
PathResult
@Deprecated public PathResult(String transformedPath, Object translatableFieldContainer, @NonNull Field translatableField) Deprecated.since 2.0.3, usePathResult(String, Object, boolean, Field, String)
instead -
PathResult
-
-
Method Details
-
getTransformedPath
The transformed path that takes into account id based collection members, if applicable -
getTranslatableFieldContainer
The sub-object that owns the translatable field -
getTranslatableField
The field on the sub-object that contains the translatable String value. Nullable in the case whereisContainerSimpleMap
is true, since there is no field. -
isContainerSimpleMap
public boolean isContainerSimpleMap()Whether thetranslatableFieldContainer
is a simpleMap
and not a complex attributes map. In this case, there is notranslatableField
, instead we need to useMap.get(Object)
.- Since:
- 2.0.3
-
getSimpleMapKey
IfisContainerSimpleMap
is true, then this contains the key in the map where the translatable value should be set.- Since:
- 2.0.3
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
PathResult(String, Object, boolean, Field, String)
instead