java.lang.Object
de.hybris.platform.sap.productconfig.frontend.util.impl.PathExtractor

public class PathExtractor extends Object
Utility class to analyze a UI path string to get the index of the group, subgroup and/or cstic, so the correct java object can be obtained from the parent.
Atypically u path string for CPQ look like this:
groups[1].subGroups[2].subGroups[3].cstics[0].value
Immutable Object
  • Field Details

  • Constructor Details

    • PathExtractor

      public PathExtractor(String fieldPath)
      Default Constructor.
      Parameters:
      fieldPath - path to analyze
  • Method Details

    • getGroupIndex

      public int getGroupIndex()
      Returns:
      the 'root' groupIndex
    • getCsticsIndex

      public int getCsticsIndex()
      Returns:
      the csticsIndex
    • getSubGroupCount

      public int getSubGroupCount()
      Returns:
      total number of subGroupIndices found
    • getSubGroupIndex

      public int getSubGroupIndex(int subGroupNumber)
      As a path string can contain any number of subgroup components, including zero, one can specify for which subgroup the index should be returned.
      Parameters:
      subGroupNumber - index of the subGroup for which the path index should be returned
      Returns:
      the subGroupIndex with the given index