Class ParentItemObjectImpl<T extends ControlflowItemObject>

All Implemented Interfaces:
DataObject, AbstractWorkflowItemObject, ControlflowItemObject, ParentItemObject<T>, StatusableObject, PropertyHandler
Direct Known Subclasses:
NodeObjectImpl, SequenceObjectImpl

public abstract class ParentItemObjectImpl<T extends ControlflowItemObject> extends ControlflowItemObjectImpl implements ParentItemObject<T>
Abstract object used in the controlflow of a workflow. CAKE III - Extension. Refer to the corresponding Interface ParentItemObject for more information.
Author:
Alexander Stromer
  • Constructor Details

    • ParentItemObjectImpl

      public ParentItemObjectImpl(DataClass dataClass)
      Standard constructor
      Parameters:
      dataClass -
  • Method Details

    • getNextSibling

      public T getNextSibling(String fromId)
      Description copied from interface: ParentItemObject
      Returns the next (insertion-order) item lodated below the same parent.
      Specified by:
      getNextSibling in interface ParentItemObject<T extends ControlflowItemObject>
      Parameters:
      fromId - Id of the current item.
      Returns:
      Next item. NULL, if it doesn't exist.
    • getPreviousSibling

      public T getPreviousSibling(String fromId)
      Description copied from interface: ParentItemObject
      Returns the previous (insertion-order) item located below the same parent.
      Specified by:
      getPreviousSibling in interface ParentItemObject<T extends ControlflowItemObject>
      Parameters:
      fromId - Id of the current item.
      Returns:
      Previous item. NULL, if it doesn't exist.
    • insertAfter

      public void insertAfter(String fromId, T newObject)
      Description copied from interface: ParentItemObject
      Inserts the given object after the item with the given id.
      Specified by:
      insertAfter in interface ParentItemObject<T extends ControlflowItemObject>
      Parameters:
      fromId - Id of the object to insert the object after.
      newObject - The object, which has to be inserted.
    • insertBefore

      public void insertBefore(String fromId, T newObject)
      Description copied from interface: ParentItemObject
      Inserts the given object before the item with the given id.
      Specified by:
      insertBefore in interface ParentItemObject<T extends ControlflowItemObject>
      Parameters:
      fromId - Id of the object to insert the object before.
      newObject - The object, which has to be inserted.
    • deepSearchItem

      public ControlflowItemObject deepSearchItem(String id)
      Description copied from interface: ParentItemObject
      Searches the item with the given Id in the tree below the current object and returns it.
      Specified by:
      deepSearchItem in interface ParentItemObject<T extends ControlflowItemObject>
      Parameters:
      id - The Id of the object which has to be searched.
      Returns:
      The object, if the object with the given Id was found; NULL otherwise.
    • getItem

      public T getItem(String id)
      Description copied from interface: ParentItemObject
      Returns the item with the given Id if it is directly connected to this object.
      Specified by:
      getItem in interface ParentItemObject<T extends ControlflowItemObject>
      Parameters:
      id - The Id of the object, which has to be found.
      Returns:
      The object, if the object with the given Id was found; NULL otherwise.
    • addItem

      public boolean addItem(T newObject)
      Description copied from interface: ParentItemObject
      Adds the given object to the list of items.
      Specified by:
      addItem in interface ParentItemObject<T extends ControlflowItemObject>
      Parameters:
      newObject - The object, which has to be added.
      Returns:
      TRUE, if the add-operation was successful; FALSE otherwise.
    • getItems

      public LinkedList<T> getItems()
      Description copied from interface: ParentItemObject
      Returns the list of items, sorted according to the operations done on the list.
      Specified by:
      getItems in interface ParentItemObject<T extends ControlflowItemObject>
      Returns:
      Ordered list of items.
    • removeItem

      public boolean removeItem(String id)
      Description copied from interface: ParentItemObject
      Removes the item with the given id of the list.
      Specified by:
      removeItem in interface ParentItemObject<T extends ControlflowItemObject>
      Parameters:
      id - Id of the item to remove.
      Returns:
      TRUE, if an object with the given Id was removed. FALSE otherwise.
    • getFirstItem

      public T getFirstItem()
      Description copied from interface: ParentItemObject
      Returns the first item of the list.
      Specified by:
      getFirstItem in interface ParentItemObject<T extends ControlflowItemObject>
      Returns:
      First item of the list; NULL, if there is no item in the list.