Class NodeTypeService
java.lang.Object
com.hybris.backoffice.workflow.designer.services.NodeTypeService
Utility methods for operating on Workflow Designer nodes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerates action representation for node to be easily identified with model.Generates action representation for node to be easily identified with model.getNodeName(com.hybris.cockpitng.components.visjs.network.data.Node node) Returns the node display name.booleanChecks if node contains given codebooleanisAction(com.hybris.cockpitng.components.visjs.network.data.Node node) Checks if given node is a Workflow ActionbooleanisAnd(com.hybris.cockpitng.components.visjs.network.data.Node node) Checks if given Node is an And nodebooleanisDecision(com.hybris.cockpitng.components.visjs.network.data.Node node) Checks if given node is a Workflow DecisionbooleanisSameAction(WorkflowActionTemplateModel action, com.hybris.cockpitng.components.visjs.network.data.Node node) Checks if givenNodecorresponds to the givenWorkflowActionTemplateModel.booleanisSameDecision(WorkflowDecisionTemplateModel decision, com.hybris.cockpitng.components.visjs.network.data.Node node) Checks if givenNodecorresponds to the givenWorkflowDecisionTemplateModel.
-
Constructor Details
-
NodeTypeService
public NodeTypeService()
-
-
Method Details
-
isAction
public boolean isAction(com.hybris.cockpitng.components.visjs.network.data.Node node) Checks if given node is a Workflow Action- Parameters:
node- node to check- Returns:
- true if it's an Action node
-
isDecision
public boolean isDecision(com.hybris.cockpitng.components.visjs.network.data.Node node) Checks if given node is a Workflow Decision- Parameters:
node- node to check- Returns:
- true it it's a Decision node
-
isAnd
public boolean isAnd(com.hybris.cockpitng.components.visjs.network.data.Node node) Checks if given Node is an And node- Parameters:
node- node to check- Returns:
- true if it's an And node
-
isSameAction
public boolean isSameAction(WorkflowActionTemplateModel action, com.hybris.cockpitng.components.visjs.network.data.Node node) Checks if givenNodecorresponds to the givenWorkflowActionTemplateModel. For equality the following attributes are compared:- type
- state (saved or unsaved)
- code (in case of unsaved state)
- pk (in case of saved state)
- Parameters:
action- to be comparednode- to be compared- Returns:
- true if node corresponds to the given action
-
generateNodeData
Generates action representation for node to be easily identified with model. For unsaved models the representation contains the type and code of action, for saved -- type, pk and persistence version.- Parameters:
action- to generate the node data for- Returns:
- node data
-
isSameDecision
public boolean isSameDecision(WorkflowDecisionTemplateModel decision, com.hybris.cockpitng.components.visjs.network.data.Node node) Checks if givenNodecorresponds to the givenWorkflowDecisionTemplateModel. For equality the following attributes are compared:- type
- state (saved or unsaved)
- code (in case of unsaved state)
- pk (in case of saved state)
- Parameters:
decision- to be comparednode- to be compared- Returns:
- true if node corresponds to the given decision
-
generateNodeData
Generates action representation for node to be easily identified with model. For unsaved models the representation contains the type and code of decision, for saved -- type, pk and persistence version.- Parameters:
decision- to generate the node data for- Returns:
- node data
-
hasCode
Checks if node contains given code- Parameters:
node- that contains code to be checkedcode- code- Returns:
- true if node contains given code, false otherwise
-
getNodeName
Returns the node display name.- Parameters:
node- input node- Returns:
- node's display name
-