Package de.xima.fc.workflow.taglib.model
Class FlowchartSelection<TElement>
- java.lang.Object
-
- de.xima.fc.workflow.taglib.model.FlowchartSelection<TElement>
-
- Type Parameters:
TElement- Type of the selected element.
- All Implemented Interfaces:
IElementWithTask<TElement>,ITaskUuidProviding,Serializable
public final class FlowchartSelection<TElement> extends Object implements IElementWithTask<TElement>, Serializable
Describes the currently selected element of the flowchart. The current selection can be either a trigger, a node, or nothing.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)TElementgetElement()<T> TgetElementAs(Class<T> type)ElementKeygetElementKey()NodeModelgetNode()NodeKeygetNodeKey()UUIDgetTaskUuid()TriggerModelgetTrigger()TriggerKeygetTriggerKey()EFlowchartSelectionTypegetType()UUIDgetUuid()inthashCode()booleanisEmpty()booleanisHasSelection()booleanisNode()booleanisTrigger()static FlowchartSelection<Void>ofEmpty()static FlowchartSelection<NodeModel>ofNode(UUID taskUuid, NodeModel nodeModel)static FlowchartSelection<TriggerModel>ofTrigger(UUID taskUuid, TriggerModel triggerModel)StringtoString()
-
-
-
Method Detail
-
getElement
@Nullable public TElement getElement()
- Specified by:
getElementin interfaceIElementWithTask<TElement>- Returns:
- The instance of the wrapped workflow element.
-
getElementAs
public <T> T getElementAs(Class<T> type)
- Type Parameters:
T- Type to return.- Parameters:
type- Type to return.- Returns:
- The current selection cast to the given type, or
nullif there is no selection ir the select is not of the given type.
-
getElementKey
@Nullable public ElementKey getElementKey()
- Returns:
- If a node is selected, the element key for the selected node. If a trigger is selected, the element key
for the selected trigger. Otherwise,
null.
-
getNode
public NodeModel getNode()
- Returns:
- When a
isNode()is selected, returns that node, ornullotherwise.
-
getNodeKey
@Nullable public NodeKey getNodeKey()
- Returns:
- The node key if a node is selected, or
nullotherwise.
-
getTaskUuid
@Nullable public UUID getTaskUuid()
- Specified by:
getTaskUuidin interfaceIElementWithTask<TElement>- Specified by:
getTaskUuidin interfaceITaskUuidProviding- Returns:
- The UUID that identifies the task to which the workflow element belongs.
-
getTrigger
public TriggerModel getTrigger()
- Returns:
- When a
isTrigger()is selected, returns that trigger, ornullotherwise.
-
getTriggerKey
@Nullable public TriggerKey getTriggerKey()
- Returns:
- The node key if a trigger is selected, or
nullotherwise.
-
getType
public EFlowchartSelectionType getType()
-
getUuid
@Nullable public UUID getUuid()
-
isEmpty
public boolean isEmpty()
-
isHasSelection
public boolean isHasSelection()
-
isNode
public boolean isNode()
-
isTrigger
public boolean isTrigger()
-
ofEmpty
public static FlowchartSelection<Void> ofEmpty()
-
ofNode
public static FlowchartSelection<NodeModel> ofNode(UUID taskUuid, NodeModel nodeModel)
-
ofTrigger
public static FlowchartSelection<TriggerModel> ofTrigger(UUID taskUuid, TriggerModel triggerModel)
-
-