Interface RuleManager

  • All Known Implementing Classes:
    DefaultRuleManagerImpl

    public interface RuleManager
    Rule Manager to report validation issues when attempting to mutate Elements
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  RuleManager.Operation
      Rules are applied against an unmodified Graph to check whether the proposed mutated state is valid.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addRule​(org.uberfire.ext.wires.bpmn.api.model.rules.Rule rule)
      Add a rule to the Rule Manager
      Results checkCardinality​(org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode outgoingNode, org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode incomingNode, org.uberfire.ext.wires.bpmn.api.model.BpmnEdge edge, RuleManager.Operation operation)
      Check whether adding the proposed Edge to the target Process breaks any cardinality Rules
      Results checkCardinality​(org.uberfire.ext.wires.bpmn.api.model.BpmnGraph target, org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode candidate, RuleManager.Operation operation)
      Check whether adding the proposed Node to the target Process breaks any cardinality Rules
      Results checkConnectionRules​(org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode outgoingNode, org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode incomingNode, org.uberfire.ext.wires.bpmn.api.model.BpmnEdge edge)
      Check whether adding the proposed Edge to the target Process breaks any connection Rules
      Results checkContainment​(org.uberfire.ext.wires.bpmn.api.model.BpmnGraph target, org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode candidate)
      Check whether adding the proposed Node to the target Process breaks any containment Rules
    • Method Detail

      • addRule

        void addRule​(org.uberfire.ext.wires.bpmn.api.model.rules.Rule rule)
        Add a rule to the Rule Manager
        Parameters:
        rule -
      • checkContainment

        Results checkContainment​(org.uberfire.ext.wires.bpmn.api.model.BpmnGraph target,
                                 org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode candidate)
        Check whether adding the proposed Node to the target Process breaks any containment Rules
        Parameters:
        target - Target process
        candidate - Candidate node
        Returns:
      • checkCardinality

        Results checkCardinality​(org.uberfire.ext.wires.bpmn.api.model.BpmnGraph target,
                                 org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode candidate,
                                 RuleManager.Operation operation)
        Check whether adding the proposed Node to the target Process breaks any cardinality Rules
        Parameters:
        target - Target process
        candidate - Candidate node
        operation - Is the candidate Node being added or removed
        Returns:
      • checkConnectionRules

        Results checkConnectionRules​(org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode outgoingNode,
                                     org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode incomingNode,
                                     org.uberfire.ext.wires.bpmn.api.model.BpmnEdge edge)
        Check whether adding the proposed Edge to the target Process breaks any connection Rules
        Parameters:
        outgoingNode - Node from which the Edge will emanate
        incomingNode - Node to which the Edge will terminate
        edge - Candidate edge
        Returns:
        Is the Edge being added or removed
      • checkCardinality

        Results checkCardinality​(org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode outgoingNode,
                                 org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode incomingNode,
                                 org.uberfire.ext.wires.bpmn.api.model.BpmnEdge edge,
                                 RuleManager.Operation operation)
        Check whether adding the proposed Edge to the target Process breaks any cardinality Rules
        Parameters:
        outgoingNode - Node from which the Edge will emanate
        incomingNode - Node to which the Edge will terminate
        edge - Candidate edge
        operation -
        Returns:
        Is the Edge being added or removed