public abstract class AbstractWrappingTemplate extends java.lang.Object implements Template
| Modifier and Type | Field and Description |
|---|---|
protected Template |
template
The wrapped template.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractWrappingTemplate(Template template)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Configuration |
getConfiguration()
Gets the configuration of this process template that corresponds to the
configuration description. |
ConfigurationDescription |
getConfigurationDescription()
Gets the configuration description for this process template, that is a
description of all configuration values that are needed or supported in the
configuration.
|
int |
getConnector(int nodeID,
int dataElementID,
ActivityConstants.AccessType dataEdgeType)
Returns the connector of the given node which accesses the given data
element (reading or writing).
|
DataEdge |
getDataEdge(int nodeID,
int dataElementID,
ActivityConstants.AccessType type)
Returns the data edge which is identified by the given node, the
data element and the direction (reading or writing).
|
java.util.Set<StructuredDataEdge> |
getDataEdgeStructure()
Convenient method which returns all data edges including
their structural data.
|
DataElement |
getDataElement(int dataElementID)
Returns the data element with the given ID.
|
DataElement |
getDataElement(int nodeID,
int connector)
The data element which is associated to the given node and the given
connector of the node.
|
java.util.Set<DataElement> |
getDataElements()
Returns all data elements of the template.
|
int[] |
getDataElementsForNode(int nodeId,
ActivityConstants.AccessType... accessType)
Gets the IDs of all data elements which are accessed by the designated node with the designated
access types.
|
TemplateDeltaLayer |
getDeltaLayer()
Returns the delta layer of the template.
|
java.lang.String |
getDescription()
Returns the description of the process.
|
int[] |
getDisabledConnectors(int nodeID,
ActivityConstants.AccessType accessType)
(needs to be stored)
|
Edge |
getEdge(int srcNodeID,
int destNodeID,
ProcessConstants.EdgeType type)
Returns the edge which is identified by the given source nodeID, destination
nodeID and the edge type.
|
java.util.Set<StructuredEdge> |
getEdgeStructure(ProcessConstants.EdgeType... edgeTypes)
Convenient method which returns all edges including
their structural data.
|
Node |
getEndNode()
Returns the end node of the process.
|
java.util.UUID |
getID()
Returns the ID of the template.
|
java.lang.String |
getInstanceNameTemplate()
Gets a (string) template for the name of instances created on this process
template.
|
int[] |
getMinBlock(java.util.Set<Node> nodes)
Returns the minimal block of the given set of nodes.
|
java.lang.String |
getName()
Returns the name of the process.
|
Node |
getNode(int nodeID)
Returns the node with the given ID.
|
int |
getNodeBranchID(int nodeID)
Returns the ID of the branch the given node belongs to.
|
int |
getNodeCorrespondingBlockNodeID(int nodeID)
Returns the ID of the corresponding block node.
|
int |
getNodeIDForTopologicalID(int topologicalNodeID)
Returns the static node ID for the given topological node ID.
|
int[] |
getNodeIDsInArea(int first,
int last,
boolean includeBlocks)
Returns the IDs of the nodes which are in the area given
by the ID of a first and a last node on a branch.
|
int[] |
getNodeIDsWithActivityTemplate(java.util.UUID activityTemplateVersionID)
Returns all nodes which are linked with the given activity.
|
java.util.Set<Node> |
getNodes()
Returns a set of all nodes which are in the template.
|
int[] |
getNodesForDataElement(int deId,
ActivityConstants.AccessType... accessType)
Gets the IDs of all nodes accessing the designated data element with the designated access
types.
|
int |
getNodeSplitNodeID(int nodeID)
Returns the ID of the first split node of the branch of the given node,
following the control flow backward.
|
int |
getNodeTopologicalID(int nodeID)
Returns corresponding topological ID of the node.
|
ProcessConstants.NodeType |
getNodeType(int nodeID)
Returns the constant representing the type of the designated node.
|
java.util.Set<ProcessModelParameter> |
getParameters(ActivityConstants.AccessType accessType)
Returns the input or output parameters of the process.
|
PluginData |
getPluginData(java.lang.String pluginID)
Returns the plug-in data object for the given plug-in ID, or null if
the plug-in is not in the set of supported plug-ins.
|
java.util.Map<java.lang.String,PluginData> |
getPluginDatas()
Returns a map from the ID of a plug-in to the plug-in data objects.
|
int[] |
getPredByEdgeType(int nodeID,
ProcessConstants.EdgeType... type)
Returns the IDs of the nodes, which are direct predecessors of the node,
using edges of the given types.
|
java.lang.String |
getProcessType()
Returns the process type, which is a short term which kind of schema this
template represents.
|
Node |
getStartNode()
Returns the start node of the process.
|
int[] |
getSuccByEdgeType(int nodeID,
ProcessConstants.EdgeType... type)
Returns the IDs of the nodes, which are direct successors of the node, following
edges of the given types.
|
QualifiedAgent |
getSupervisorAgent()
Returns the supervisor agent of the process template.
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getSupportedPlugins()
Returns a map from the ID of an extension point to the IDs of the plug-ins
within the extension point.
|
Configuration |
getTestConfiguration()
Gets the (stand-alone) test configuration of this process template.
|
int[] |
getUnconnectedConnectors(int nodeID,
ActivityConstants.AccessType dataEdgeType)
(convenience method, calculated on the fly)
|
java.util.Map<java.lang.String,java.lang.String> |
getUserAttributes()
Returns all user attributes as map, the key of the map is the name of the
attribute.
|
java.lang.String |
getUserAttributeValue(java.lang.String attributeName)
Returns the value of the user attribute.
|
java.lang.String |
getVersion()
Returns the logic version of the template, which distinguishes between, for
instance, the major and minor versions (1.1.x vs. 1.x.y).
|
boolean |
isTransPredOf(int currentNodeID,
int potentialPredecessorID,
ProcessConstants.EdgeType... edgeType)
Returns true, if this node is a (transitive) predecessor of the given node,
respecting the given edge type.
|
void |
removeUserAttributeValue(java.lang.String attributeName)
Deprecated.
|
void |
setUserAttributeValue(java.lang.String attributeName,
java.lang.String attributeValue)
Deprecated.
|
java.lang.Object |
toLocalisedString(LocalisationFactory locFac,
java.util.Locale loc)
Gets the localised representation of the implementing object.
|
protected final Template template
protected AbstractWrappingTemplate(Template template)
template - public int[] getDataElementsForNode(int nodeId,
ActivityConstants.AccessType... accessType)
TemplategetDataElementsForNode in interface TemplatenodeId - The ID of the node which accesses the data elements.accessType - The types of access of the node (e.g. reading and/or writing).public int[] getNodesForDataElement(int deId,
ActivityConstants.AccessType... accessType)
TemplategetNodesForDataElement in interface TemplatedeId - The ID of the data element which is accessed.accessType - The types of access of the node (e.g. reading and/or writing).public Configuration getConfiguration()
Templateconfiguration description. All
mandatory configuration entries need to have an appropriate value. These
configuration also needs to provide values for mandatory configuration
values of activities that are retrieved from the process configuration (see
ActivityConfiguration).getConfiguration in interface Templatepublic ConfigurationDescription getConfigurationDescription()
TemplategetConfigurationDescription in interface Templatepublic Configuration getTestConfiguration()
Templatenormal (merged) configuration. Note that
the test configuration allows to override fixed values of the normal
configuration.getTestConfiguration in interface Templatepublic int getConnector(int nodeID,
int dataElementID,
ActivityConstants.AccessType dataEdgeType)
TemplateNode for further details.getConnector in interface TemplatenodeID - The ID of the node.dataElementID - The ID of the data element.dataEdgeType - The type of the data edge which is connected to the
returned connector.CommonConstants#INT_ID_NOT_EXISTING.public DataEdge getDataEdge(int nodeID, int dataElementID, ActivityConstants.AccessType type)
TemplategetDataEdge in interface TemplatenodeID - The node which reads or writes the data element.dataElementID - The data element being accessed by the node.type - The access type of the node (reading, or writing)public java.util.Set<StructuredDataEdge> getDataEdgeStructure()
TemplategetDataEdgeStructure in interface Templatepublic DataElement getDataElement(int dataElementID)
TemplategetDataElement in interface TemplatedataElementID - The ID of the data element.public DataElement getDataElement(int nodeID, int connector)
TemplateNode. If the template does not contain a data element specified
by nodeID and connector, the method returns null.getDataElement in interface TemplatenodeID - The node which accesses the data element.connector - The connector of the given node, which is associated
with the data element.public java.util.Set<DataElement> getDataElements()
TemplategetDataElements in interface Templatepublic TemplateDeltaLayer getDeltaLayer()
TemplateTemplateDeltaLayer for further detail.getDeltaLayer in interface Templatepublic int[] getDisabledConnectors(int nodeID,
ActivityConstants.AccessType accessType)
TemplategetDisabledConnectors in interface TemplatenodeID - The ID of the node.accessType - The activity related access type that could be disabledpublic Edge getEdge(int srcNodeID, int destNodeID, ProcessConstants.EdgeType type)
Templatepublic java.util.Set<StructuredEdge> getEdgeStructure(ProcessConstants.EdgeType... edgeTypes)
TemplategetEdgeStructure in interface TemplateedgeTypes - The edge types to consider.public Node getEndNode()
TemplategetEndNode in interface Templatepublic java.util.UUID getID()
Templatepublic java.lang.String getInstanceNameTemplate()
TemplategetInstanceNameTemplate in interface Templatepublic int[] getMinBlock(java.util.Set<Node> nodes)
TemplategetMinBlock in interface Templatenodes - The set of nodes, the minimal block will be build upon.public java.lang.String getName()
Templatepublic java.lang.String getDescription()
TemplategetDescription in interface Templatepublic Node getNode(int nodeID)
Templatepublic int getNodeBranchID(int nodeID)
TemplategetNodeBranchID in interface TemplatenodeID - The id of the node.public int getNodeCorrespondingBlockNodeID(int nodeID)
TemplategetNodeCorrespondingBlockNodeID in interface TemplatenodeID - The id of the node.public int getNodeIDForTopologicalID(int topologicalNodeID)
TemplateTemplate.getNodeTopologicalID(int).getNodeIDForTopologicalID in interface TemplatetopologicalNodeID - The topological ID of the node.public int[] getNodeIDsInArea(int first,
int last,
boolean includeBlocks)
TemplategetNodeIDsInArea in interface Templatefirst - The first node of the area.last - The last node of the area.includeBlocks - If true, the result includes nodes on blocks which are in the area, too.public int[] getNodeIDsWithActivityTemplate(java.util.UUID activityTemplateVersionID)
TemplategetNodeIDsWithActivityTemplate in interface TemplateactivityTemplateVersionID - The ID of the activity template.public int getNodeSplitNodeID(int nodeID)
TemplategetNodeSplitNodeID in interface TemplatenodeID - The id of the node.public int getNodeTopologicalID(int nodeID)
TemplategetNodeTopologicalID in interface TemplatenodeID - The (static) ID of the node.public ProcessConstants.NodeType getNodeType(int nodeID)
TemplategetNodeType in interface TemplatenodeID - The ID of the node.ProcessConstants.NodeTypepublic java.util.Set<Node> getNodes()
Templatepublic java.util.Set<ProcessModelParameter> getParameters(ActivityConstants.AccessType accessType)
TemplategetParameters in interface TemplateaccessType - the type of the parameter, i.e. READ or WRITE accesspublic int[] getPredByEdgeType(int nodeID,
ProcessConstants.EdgeType... type)
TemplategetPredByEdgeType in interface TemplatenodeID - The ID of the node.type - The edge types to consider.Nodepublic java.lang.String getProcessType()
TemplategetProcessType in interface Templatepublic Node getStartNode()
TemplategetStartNode in interface Templatepublic int[] getSuccByEdgeType(int nodeID,
ProcessConstants.EdgeType... type)
TemplategetSuccByEdgeType in interface TemplatenodeID - The ID of the node.type - The edge types to consider.ProcessConstants.EdgeTypepublic QualifiedAgent getSupervisorAgent()
TemplategetSupervisorAgent in interface Templatepublic int[] getUnconnectedConnectors(int nodeID,
ActivityConstants.AccessType dataEdgeType)
TemplategetUnconnectedConnectors in interface TemplatenodeID - The ID of the node.dataEdgeType - The type of the data edge which need to be connected.public java.lang.String getVersion()
TemplategetVersion in interface Templatepublic boolean isTransPredOf(int currentNodeID,
int potentialPredecessorID,
ProcessConstants.EdgeType... edgeType)
TemplateisTransPredOf in interface TemplatecurrentNodeID - The node.potentialPredecessorID - The potential predecessor.edgeType - The edge types to consider.public PluginData getPluginData(java.lang.String pluginID)
PluginDataContainergetPluginData in interface PluginDataContainerpluginID - The ID of the plug-in, the data object has been requested
for.public java.util.Map<java.lang.String,PluginData> getPluginDatas()
PluginDataContainergetPluginDatas in interface PluginDataContainerpublic java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getSupportedPlugins()
PluginDataContainergetSupportedPlugins in interface PluginDataContainerpublic java.util.Map<java.lang.String,java.lang.String> getUserAttributes()
UserAttributeContainerUserAttributeContainer.setUserAttributeValue(String, String) and
UserAttributeContainer.removeUserAttributeValue(String) on how to change user attributes.getUserAttributes in interface UserAttributeContainerpublic java.lang.String getUserAttributeValue(java.lang.String attributeName)
UserAttributeContainergetUserAttributeValue in interface UserAttributeContainerattributeName - The name of the user attribute.@Deprecated public void removeUserAttributeValue(java.lang.String attributeName)
UserAttributeContainer
This method must not be called directly! Use the change primitive
of the corresponding model instead! In case of the process model, refer to
ChangePrimitives.updateUserAttribute(UserAttributeContainer, String, String).
removeUserAttributeValue in interface UserAttributeContainerattributeName - The key of the value to remove.@Deprecated
public void setUserAttributeValue(java.lang.String attributeName,
java.lang.String attributeValue)
UserAttributeContainer
This method must not be called directly! Use the change primitive
of the corresponding model instead! In case of the process model, refer to
ChangePrimitives.updateUserAttribute(UserAttributeContainer, String, String).
setUserAttributeValue in interface UserAttributeContainerattributeName - The name of the attribute.attributeValue - The new value of the attribute.public java.lang.Object toLocalisedString(LocalisationFactory locFac, java.util.Locale loc)
LocalisedStringLocalised should use the designated
localisation factory for automatic localisation.toLocalisedString in interface LocalisedStringlocFac - The localisation factory to be used by Localised model objects. If this
is null, do not localise the used Localised attributes.loc - The locale for which to get the localised string. If this is null,
treat it like Locale.ROOT has been requested.