Class PServicesData

java.lang.Object
com.portal.app.cc.sharing.PServicesData
All Implemented Interfaces:
TreeNode

public class PServicesData extends Object implements TreeNode

Title:

Description: This datastructure will contain all the service type datastructure and the service instance datastructure

  • Constructor Details

    • PServicesData

      public PServicesData(String sharingType, Poid serviceParentPoid)
      PServicesData This is the constructor for PServicesData. This will create a new root datastructure with a single instance of account level service type
      Parameters:
      sharingType - String
      serviceParentPoid - Poid
  • Method Details

    • clear

      public void clear()
      clear will reinitialize the data
    • getAccountLevelServiceType

      public PServiceType getAccountLevelServiceType()
      getAccountLevelServiceType This returns the account level service type present in PServicesData
      Returns:
      PServiceType
    • addServiceType

      public void addServiceType(PServiceType serviceType)
      addServiceType will add a PServiceType datastructure to PservicesData
      Parameters:
      serviceType - PServiceType
    • getChildCount

      public int getChildCount()
      getChildCount is a overridden method. This will return the count of the instances of PServiceType
      Specified by:
      getChildCount in interface TreeNode
      Returns:
      int
    • getAllowsChildren

      public boolean getAllowsChildren()
      getAllowsChildren will return true if children are allowed
      Specified by:
      getAllowsChildren in interface TreeNode
      Returns:
      boolean
    • isLeaf

      public boolean isLeaf()
      Returns true if the receiver is a leaf.
      Specified by:
      isLeaf in interface TreeNode
      Returns:
      boolean
    • children

      public Enumeration children()
      Returns the children of the receiver as an Enumeration.
      Specified by:
      children in interface TreeNode
      Returns:
      Enumeration
    • getParent

      public TreeNode getParent()
      Returns the parent TreeNode of the receiver.
      Specified by:
      getParent in interface TreeNode
      Returns:
      TreeNode
    • getChildAt

      public TreeNode getChildAt(int index)
      Returns the child TreeNode at index childIndex.
      Specified by:
      getChildAt in interface TreeNode
      Parameters:
      index - int
      Returns:
      TreeNode
    • getIndex

      public int getIndex(TreeNode child)
      Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.
      Specified by:
      getIndex in interface TreeNode
      Parameters:
      child - TreeNode
      Returns:
      int
    • removeEmptyServices

      public void removeEmptyServices()
      removeEmptyServices will remove services which dont contain any service instances