Class PathExtractor
java.lang.Object
de.hybris.platform.sap.productconfig.frontend.util.impl.PathExtractor
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:
Immutable Object
Atypically u path string for CPQ look like this:
groups[1].subGroups[2].subGroups[3].cstics[0].valueImmutable Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintintgetSubGroupIndex(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.
-
Field Details
-
CSTIC_GROUP_INDEX
public static final int CSTIC_GROUP_INDEX- See Also:
-
GROUP_GROUP_INDEX
public static final int GROUP_GROUP_INDEX- See Also:
-
-
Constructor Details
-
PathExtractor
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
-