Class PathUtil
java.lang.Object
com.broadleafcommerce.translation.mapping.PathUtil
Utility class for deriving translatable field paths based on an entity projection. If while
traversing the path structure, a field whose value is
SubIdentifiable
is found in a
collection, the collection member identification in the path is updated to include the
identifier, rather than a integer position value. At the same time, the final target of the path
is also determined and returned.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The transformed path and final target object and field of the path. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<PathUtil.PathResult>
getValueForPath
(Object projection, String field) Fetch aPathUtil.PathResult
given a starting projection object and a possibly nested field path.
-
Field Details
-
JSON_PATH_PREFIX
- See Also:
-
-
Method Details
-
getValueForPath
Fetch aPathUtil.PathResult
given a starting projection object and a possibly nested field path. Note, thePathResult
may contained a transformed version of the path, if applicable.- Parameters:
projection
- The starting projection instance to inspect for the pathfield
- The possibly nested path to use to fetch the final target object- Returns:
- The
PathUtil.PathResult
representing the transformed field path and final target object
-