Class PathExtractor
- java.lang.Object
-
- de.hybris.platform.sap.productconfig.frontend.util.impl.PathExtractor
-
public class PathExtractor extends java.lang.ObjectUtility 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
-
-
Constructor Summary
Constructors Constructor Description PathExtractor(java.lang.String fieldPath)Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCsticsIndex()intgetGroupIndex()intgetSubGroupCount()intgetSubGroupIndex(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.
-
-
-
Method Detail
-
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
-
-