Class ElementKey

java.lang.Object
de.xima.fc.workflow.ElementKey
All Implemented Interfaces:
IUuidProviding, Serializable

public final class ElementKey extends Object implements IUuidProviding, Serializable
The key of a workflow element that uniquely identifies it within the context of a process. Consists of the element's UUID, and the element's type.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
See Also:
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getTaskUuid

      @Nullable @Deprecated public UUID getTaskUuid()
      Deprecated.
      Not used anymore, just the getUuid() already uniquely identifies the element. This method will most likely return null.
      Gets the legacy task UUID, if available. This was used in older versions, but now only exists for backwards compatibility. The element UUID is already unique within the workflow, so the task UUID is not needed anymore.
      Returns:
      The legacy task UUID if available, null otherwise.
    • setTaskUuid

      public void setTaskUuid(UUID taskUuid)
      Deprecated.
      Not used anymore, just the getUuid() already uniquely identifies the element.
      Sets the legacy task UUID. This was used in older versions, but now only exists for backwards compatibility. The element UUID is already unique within the workflow, so the task UUID is not needed anymore.
      Parameters:
      taskUuid - The legacy task UUID to set, can be null.
    • getType

      public EWorkflowElementType getType()
    • getUuid

      public UUID getUuid()
      Specified by:
      getUuid in interface IUuidProviding
      Returns:
      The UUID that identifies this instance.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • stringValue

      public String stringValue()
      Returns:
      A string form of this key that can be parsed by of(String).
    • toNodeKey

      public NodeKey toNodeKey()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toTriggerKey

      public TriggerKey toTriggerKey()
    • nodeKey

      public static ElementKey nodeKey(UUID uuid)
      Creates an element key for a node with the given task and node UUIDs.
      Parameters:
      uuid - UUID of the node.
      Returns:
      An element key for a node with the given task and node UUIDs.
    • nodeKey

      @Deprecated public static ElementKey nodeKey(UUID taskUuid, UUID uuid)
      Deprecated.
      Use nodeKey(UUID) instead, the task UUID is not needed anymore and is ignored.
      Creates an element key for a node with the given task and node UUIDs.
      Parameters:
      taskUuid - UUID of the task to which the node belongs.
      uuid - UUID of the node.
      Returns:
      An element key for a node with the given task and node UUIDs.
    • of

      public static ElementKey of(EWorkflowElementType type, UUID uuid)
      Creates an element key for an element with the given type and trigger UUID.
      Parameters:
      type - The type of the element.
      uuid - UUID of the element.
      Returns:
      An element key for an element with the given type, and task and trigger UUIDs.
    • of

      public static <T extends IUuidProviding & IWorkflowElementTypeProviding> ElementKey of(IElementWithTask<T> element)
    • of

      public static ElementKey of(String value)
      Parameters:
      value - Value as obtained by stringValue().
      Returns:
      The key represented by the given string.
    • of

      public static <T extends IWorkflowElementTypeProviding & IUuidProviding> ElementKey of(T element)
      Creates an element key for the given element.
      Type Parameters:
      T - The type of the element, which must implement either IWorkflowNodeTypeProviding or IWorkflowTriggerTypeProviding.
      Parameters:
      element - The element for which to create the key. Must implement either IWorkflowNodeTypeProviding or IWorkflowTriggerTypeProviding.
      Returns:
      An element key for the given element.
    • of

      @Deprecated public static <T extends IWorkflowElementTypeProviding & IUuidProviding> ElementKey of(UUID taskUuid, T element)
      Deprecated.
      Use of(IWorkflowElementTypeProviding) instead, the task UUID is not needed anymore and is ignored.
      Creates an element key for the given element.
      Type Parameters:
      T - The type of the element, which must implement either IWorkflowNodeTypeProviding or IWorkflowTriggerTypeProviding.
      Parameters:
      taskUuid - UUID of the task to which the element belongs.
      element - The element for which to create the key. Must implement either IWorkflowNodeTypeProviding or IWorkflowTriggerTypeProviding.
      Returns:
      An element key for the given element.
    • of

      @Deprecated public static ElementKey of(EWorkflowElementType type, UUID taskUuid, UUID uuid)
      Deprecated.
      Use of(EWorkflowElementType, UUID) instead, the task UUID is not needed anymore and is ignored.
      Creates an element key for an element with the given type and trigger UUID.
      Parameters:
      type - The type of the element.
      taskUuid - UUID of the task to which the element belongs.
      uuid - UUID of the element.
      Returns:
      An element key for an element with the given type, and task and trigger UUIDs.
    • triggerKey

      public static ElementKey triggerKey(UUID uuid)
      Creates an element key for a trigger with the given trigger UUIDs.
      Parameters:
      uuid - UUID of the trigger.
      Returns:
      An element key for a trigger with the given task and trigger UUIDs.
    • triggerKey

      @Deprecated public static ElementKey triggerKey(UUID taskUuid, UUID uuid)
      Deprecated.
      Use triggerKey(UUID) instead, the task UUID is not needed anymore and is ignored.
      Creates an element key for a trigger with the given trigger UUIDs.
      Parameters:
      taskUuid - UUID of the task to which the trigger belongs.
      uuid - UUID of the trigger.
      Returns:
      An element key for a trigger with the given task and trigger UUIDs.