Package de.xima.fc.workflow
Class NodePrototypeData<TData>
- java.lang.Object
-
- de.xima.fc.workflow.NodePrototypeData<TData>
-
- Type Parameters:
TData
- Type of the properties model, seeINodeHandler
.
- All Implemented Interfaces:
IElementPrototypeData<TData>
,IWorkflowElementTypeProviding
,INodePrototypeData<TData>
,IWorkflowNodeTypeProviding
public class NodePrototypeData<TData> extends Object implements INodePrototypeData<TData>
Default POJO implementation ofINodePrototypeData
.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description NodePrototypeData(String type, TData customParameters, List<INodePrototypeData<?>> children)
Creates node prototype data instance with the given data.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <TData> INodePrototypeData<TData>
containerNodeData(EWorkflowNodeType type, TData customParameters, List<INodePrototypeData<?>> children)
Creates trigger prototype data instance with children.static <TData> INodePrototypeData<TData>
containerNodeData(String type, TData customParameters, List<INodePrototypeData<?>> children)
Creates trigger prototype data instance with children.List<INodePrototypeData<?>>
getChildren()
TData
getData()
When a new workflow element is created, its data default to what is returned by this method.String
getType()
static <TData> INodePrototypeData<TData>
leafNodeData(EWorkflowNodeType type, TData customParameters)
Creates node prototype data instance without children.static <TData> INodePrototypeData<TData>
leafNodeData(String type, TData customParameters)
Creates node prototype data instance without children.
-
-
-
Constructor Detail
-
NodePrototypeData
public NodePrototypeData(String type, TData customParameters, List<INodePrototypeData<?>> children)
Creates node prototype data instance with the given data.- Parameters:
type
- Type of the workflow node, seeIWorkflowElementTypeProviding.getType()
.customParameters
- Custom parameter model for the workflow node, seeIElementHandler.getDataModelClass()
.children
- Data for the children of this node.
-
-
Method Detail
-
getChildren
public List<INodePrototypeData<?>> getChildren()
- Specified by:
getChildren
in interfaceINodePrototypeData<TData>
- Returns:
- A list of children for this node prototype. All children will be cloned and added as well when a new node is created.
-
getData
public TData getData()
Description copied from interface:IElementPrototypeData
When a new workflow element is created, its data default to what is returned by this method. A copy is made of that data, subsequent modifications to the value returned by this method will not affect the workflow designer.- Specified by:
getData
in interfaceIElementPrototypeData<TData>
- Returns:
- The properties to be used for the new workflow element.
-
getType
public String getType()
- Specified by:
getType
in interfaceIWorkflowElementTypeProviding
- Returns:
- The type of the workflow element that determines how the workflow element behaves. Usually there is a registered handler for each type.
-
containerNodeData
public static <TData> INodePrototypeData<TData> containerNodeData(EWorkflowNodeType type, TData customParameters, List<INodePrototypeData<?>> children)
Creates trigger prototype data instance with children.- Type Parameters:
TData
- Type of the properties model, seeINodeHandler
.- Parameters:
type
- Type of the workflow node, seeIWorkflowElementTypeProviding.getType()
.customParameters
- Custom parameter model for the workflow node, seeIElementHandler.getDataModelClass()
.children
- Data for the children of the node.- Returns:
- A data instance with children.
- Since:
- 8.0.1
-
containerNodeData
public static <TData> INodePrototypeData<TData> containerNodeData(String type, TData customParameters, List<INodePrototypeData<?>> children)
Creates trigger prototype data instance with children.- Type Parameters:
TData
- Type of the properties model, seeINodeHandler
.- Parameters:
type
- Type of the workflow node, seeIWorkflowElementTypeProviding.getType()
.customParameters
- Custom parameter model for the workflow node, seeIElementHandler.getDataModelClass()
.children
- Data for the children of the node.- Returns:
- A data instance with children.
- Since:
- 8.0.1
-
leafNodeData
public static <TData> INodePrototypeData<TData> leafNodeData(EWorkflowNodeType type, TData customParameters)
Creates node prototype data instance without children.- Type Parameters:
TData
- Type of the properties model, seeINodeHandler
.- Parameters:
type
- Type of the workflow node, seeIWorkflowElementTypeProviding.getType()
.customParameters
- Custom parameter model for the workflow node, seeIElementHandler.getDataModelClass()
.- Returns:
- A data instance without children.
- Since:
- 8.0.1
-
leafNodeData
public static <TData> INodePrototypeData<TData> leafNodeData(String type, TData customParameters)
Creates node prototype data instance without children.- Type Parameters:
TData
- Type of the properties model, seeINodeHandler
.- Parameters:
type
- Type of the workflow node, seeIWorkflowElementTypeProviding.getType()
.customParameters
- Custom parameter model for the workflow node, seeIElementHandler.getDataModelClass()
.- Returns:
- A data instance without children.
- Since:
- 8.0.1
-
-