Package de.xima.fc.workflow
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:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)UUIDgetTaskUuid()Deprecated.Not used anymore, just thegetUuid()already uniquely identifies the element.EWorkflowElementTypegetType()UUIDgetUuid()inthashCode()static ElementKeynodeKey(UUID uuid)Creates an element key for a node with the given task and node UUIDs.static ElementKeynodeKey(UUID taskUuid, UUID uuid)Deprecated.UsenodeKey(UUID)instead, the task UUID is not needed anymore and is ignored.static <T extends IUuidProviding & IWorkflowElementTypeProviding>
ElementKeyof(IElementWithTask<T> element)static ElementKeyof(EWorkflowElementType type, UUID uuid)Creates an element key for an element with the given type and trigger UUID.static ElementKeyof(EWorkflowElementType type, UUID taskUuid, UUID uuid)Deprecated.Useof(EWorkflowElementType, UUID)instead, the task UUID is not needed anymore and is ignored.static ElementKeyof(String value)static <T extends IWorkflowElementTypeProviding & IUuidProviding>
ElementKeyof(UUID taskUuid, T element)Deprecated.Useof(IWorkflowElementTypeProviding)instead, the task UUID is not needed anymore and is ignored.static <T extends IWorkflowElementTypeProviding & IUuidProviding>
ElementKeyof(T element)Creates an element key for the given element.voidsetTaskUuid(UUID taskUuid)Deprecated.Not used anymore, just thegetUuid()already uniquely identifies the element.StringstringValue()NodeKeytoNodeKey()StringtoString()TriggerKeytoTriggerKey()static ElementKeytriggerKey(UUID uuid)Creates an element key for a trigger with the given trigger UUIDs.static ElementKeytriggerKey(UUID taskUuid, UUID uuid)Deprecated.UsetriggerKey(UUID)instead, the task UUID is not needed anymore and is ignored.
-
-
-
Method Detail
-
getTaskUuid
@Nullable @Deprecated public UUID getTaskUuid()
Deprecated.Not used anymore, just thegetUuid()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 thegetUuid()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:
getUuidin interfaceIUuidProviding- Returns:
- The UUID that identifies this instance.
-
stringValue
public String stringValue()
- Returns:
- A string form of this key that can be parsed by
of(String).
-
toNodeKey
public NodeKey toNodeKey()
-
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.UsenodeKey(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:
uuid- UUID of the node.taskUuid- UUID of the task to which the node belongs.- 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 bystringValue().- 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 eitherIWorkflowNodeTypeProvidingorIWorkflowTriggerTypeProviding.- Parameters:
element- The element for which to create the key. Must implement eitherIWorkflowNodeTypeProvidingorIWorkflowTriggerTypeProviding.- Returns:
- An element key for the given element.
-
of
@Deprecated public static <T extends IWorkflowElementTypeProviding & IUuidProviding> ElementKey of(UUID taskUuid, T element)
Deprecated.Useof(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 eitherIWorkflowNodeTypeProvidingorIWorkflowTriggerTypeProviding.- Parameters:
element- The element for which to create the key. Must implement eitherIWorkflowNodeTypeProvidingorIWorkflowTriggerTypeProviding.taskUuid- UUID of the task to which the element belongs.- Returns:
- An element key for the given element.
-
of
@Deprecated public static ElementKey of(EWorkflowElementType type, UUID taskUuid, UUID uuid)
Deprecated.Useof(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.UsetriggerKey(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:
uuid- UUID of the trigger.taskUuid- UUID of the task to which the trigger belongs.- Returns:
- An element key for a trigger with the given task and trigger UUIDs.
-
-