Class WorkflowModelFinder

java.lang.Object
com.hybris.backoffice.workflow.designer.services.WorkflowModelFinder

public class WorkflowModelFinder extends Object
Utility methods for finding models from Workflow Designer nodes.
  • Constructor Details

    • WorkflowModelFinder

      public WorkflowModelFinder()
  • Method Details

    • findWorkflowAction

      public Optional<WorkflowActionTemplateModel> findWorkflowAction(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)
      Finds corresponding WorkflowActionTemplateModel for given Node.
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      node - node for which a corresponding model should be found
      Returns:
      found action model
    • findWorkflowActionInWorkflowTemplateModel

      public Optional<WorkflowActionTemplateModel> findWorkflowActionInWorkflowTemplateModel(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)
      Finds corresponding WorkflowActionTemplateModel for given Node in WorkflowTemplate model only
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      node - node for which a corresponding model should be found
      Returns:
      found action model
    • findWorkflowDecision

      public Optional<WorkflowDecisionTemplateModel> findWorkflowDecision(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)
      Finds corresponding WorkflowDecisionTemplateModel for given Node.
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      node - for which corresponding model should be found
      Returns:
      found decision model
    • findWorkflowDecisionInWorkflowTemplateModel

      public Optional<WorkflowDecisionTemplateModel> findWorkflowDecisionInWorkflowTemplateModel(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)
      Finds corresponding WorkflowDecisionTemplateModel for given Node in WorkflowTemplate model only.
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      node - for which corresponding model should be found
      Returns:
      found decision model
    • findNewModels

      public List<ItemModel> findNewModels(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      Returns:
      list of new (unsaved) WorkflowActionTemplateModels and WorkflowDecisionTemplateModels
    • findNewWorkflowActions

      public Set<WorkflowActionTemplateModel> findNewWorkflowActions(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)
      Gets new (unsaved) WorkflowActionTemplateModels from the widget model
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      Returns:
      new (unsaved) WorkflowActionTemplateModels from the widget model
    • findNewWorkflowAction

      public Optional<WorkflowActionTemplateModel> findNewWorkflowAction(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)
      Gets new (unsaved) WorkflowActionTemplateModel corresponding to given Node from the widget model
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      node - that represents the desired WorkflowActionTemplateModel
      Returns:
      corresponding WorkflowActionTemplateModel to given node
    • findNewWorkflowDecisions

      public Set<WorkflowDecisionTemplateModel> findNewWorkflowDecisions(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)
      Gets new (unsaved) WorkflowDecisionTemplateModels from the widget model
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      Returns:
      new (unsaved) WorkflowDecisionTemplateModels from the widget model
    • findNewWorkflowDecision

      public Optional<WorkflowDecisionTemplateModel> findNewWorkflowDecision(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context, com.hybris.cockpitng.components.visjs.network.data.Node node)
      Gets new (unsaved) WorkflowDecisionTemplateModel corresponding to given Node from the widget model
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      node - that represents the desired WorkflowDecisionTemplateModel
      Returns:
      corresponding WorkflowDecisionTemplateModel to given node
    • findWorkflowActionsFromWorkflowTemplateModel

      public Set<WorkflowActionTemplateModel> findWorkflowActionsFromWorkflowTemplateModel(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)
      Gets existing (already saved) WorkflowActionTemplateModels from the Workflow Template that is being edited.
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      Returns:
      existing (already saved) WorkflowActionTemplateModels from the Workflow Template that is being edited.
    • findWorkflowDecisionsFromWorkflowTemplateModel

      public Set<WorkflowDecisionTemplateModel> findWorkflowDecisionsFromWorkflowTemplateModel(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)
      Gets existing (already saved) WorkflowDecisionTemplateModels from the Workflow Template that is being edited.
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      Returns:
      existing (already saved) WorkflowDecisionTemplateModels from the Workflow Template that is being edited.
    • findDecisionsOfAction

      public Set<WorkflowDecisionTemplateModel> findDecisionsOfAction(WorkflowActionTemplateModel action)
      Finds all decisions that are incoming to this action or outgoing from this action.
    • findAllWorkflowActions

      public Set<WorkflowActionTemplateModel> findAllWorkflowActions(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)
      Returns a list of both saved and unsaved WorkflowActionTemplateModels.
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      Returns:
      a list of both saved and unsaved WorkflowActionTemplateModels.
    • findAllWorkflowDecisions

      public Set<WorkflowDecisionTemplateModel> findAllWorkflowDecisions(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)
      Returns a list of both saved and unsaved WorkflowDecisionTemplateModels.
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      Returns:
      a list of both saved and unsaved WorkflowDecisionTemplateModels.
    • findWorkflowTemplate

      public WorkflowTemplateModel findWorkflowTemplate(com.hybris.backoffice.widgets.networkchart.context.NetworkChartContext context)
      Returns the workflow template that is currently edited in Workflow Designer
      Parameters:
      context - contains Network Chart widget model, where the Workflow Designer data is stored
      Returns:
      the workflow template that is currently edited in Workflow Designer
    • getNodeTypeService

      public NodeTypeService getNodeTypeService()
    • setNodeTypeService

      public void setNodeTypeService(NodeTypeService nodeTypeService)