Class PathExtractor


  • public class PathExtractor
    extends java.lang.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
    • 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
      int getCsticsIndex()  
      int getGroupIndex()  
      int getSubGroupCount()  
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PathExtractor

        public PathExtractor​(java.lang.String fieldPath)
        Default Constructor.
        Parameters:
        fieldPath - path to analyze
    • 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