java.lang.Object
com.broadleafcommerce.translation.mapping.PathUtil

public final class PathUtil extends Object
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.
  • Field Details

  • Method Details

    • getValueForPath

      public static Optional<PathUtil.PathResult> getValueForPath(Object projection, String field)
      Fetch a PathUtil.PathResult given a starting projection object and a possibly nested field path. Note, the PathResult may contained a transformed version of the path, if applicable.
      Parameters:
      projection - The starting projection instance to inspect for the path
      field - 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