Interface ICCTreeItem

All Superinterfaces:
ICCBase
All Known Subinterfaces:
ICCBranchPoint, ICCFile, ICCFlowPoint, ICCImportBranchPoint, ICCImportFile, ICCImportFlowPoint, ICCImportFlowPointParent, ICCImportModule, ICCImportPart, ICCImportResult, ICCModule, ICCPart, ICCResult
All Known Implementing Classes:
CCAbstractTreeItem, CCEmptyResult

public interface ICCTreeItem extends ICCBase
Represents an item that has a hierarchy. i.e. has a parent and or children
Since:
4.0
  • Method Details

    • getParent

      ICCTreeItem getParent()
      Returns the parent or null if it is a root item
      Returns:
      parent or null
    • isRoot

      boolean isRoot()
      Returns true if this is a root item with no parent
      Returns:
      true if it has no parent and therefore is a root item
    • getChildren

      ICCTreeItem[] getChildren()
      Returns an array (could be an empty array) of children New in v9 calls to this method will return child items in an order as determined by the items themselves
      Returns:
      array of children or an empty array
    • addChild

      boolean addChild(ICCTreeItem child)
      Add a single child to this item The added child will have this item as its parent
      Parameters:
      child - child to be added
      Returns:
      true if added
    • addChildren

      void addChildren(ICCTreeItem[] children)
      Add array of children to this item The added children will have this item as their parent if it is important to know if an item already exists then use addChild(ICCTreeItem)
      Parameters:
      children - array of children to be added
    • setParent

      void setParent(ICCTreeItem parent)
      Sets the parent of this item This item will become a child of the parent
      Parameters:
      parent - this artifact's parent
    • getChild

      ICCTreeItem getChild(String name)
      Given a name return the matching child The current implementation only supports unique names
      Parameters:
      name - child's name to retrieve
      Returns:
      null or the child
    • getNumChildren

      int getNumChildren()
      Returns the number of children
      Returns:
      number of children
      Since:
      6.1
    • getQualifiedName

      String getQualifiedName()
      Returns a qualified name can be used to uniquely identify an object.
      Returns:
      qualified name
      Since:
      9.0
    • refresh

      void refresh()
      Refreshes the children to ensure the sort order is correct
      Since:
      9.0
    • getUUID

      String getUUID()
      Returns a globally unique id (UUID) If one does not exist in the result, a call to getUniqueID() will be done to produce a unique reproducible string
      Returns:
      UUID or null
      Since:
      10.0
    • setUUID

      void setUUID(String uuid)
      Sets the unique id for this tree item When possible this should be a UUID format.
      Parameters:
      uuid - UUID or a globally unique identifier
      Since:
      10.0
    • getUniqueID

      String getUniqueID()
      The following API is added for backwards compatibility. When a UUID is not available in the result this call will be used to generate a temporary UUID (does not have to have a true UUID format) The returned value should
      • be the same for the same result.
      • be unique from any other artifact in the result
      • can be any string that uniquely represents this artifact
      Returns:
      globally unique string
      Since:
      10.0
    • supportsUUID

      boolean supportsUUID()
      Return true if this artifact supports a UUID
      Returns:
      true if UUID is supported
      Since:
      10.0