Class InsertDataEdge


  • public class InsertDataEdge
    extends Object
    Change operation for inserting a data edge between a node and a data element. Call isPossible first to check if the deletion is valid, than call perform operation to execute the change
    • Field Detail

      • logger

        protected static final Logger logger
        a Logger
    • Constructor Detail

      • InsertDataEdge

        public InsertDataEdge()
    • Method Detail

      • isPossible

        public static boolean isPossible​(Template template,
                                         Node node,
                                         DataElement dataElement,
                                         ActivityConstants.AccessType type)
        Check if it is possible (concerning structural correctness) to insert a data edge of the given type between the given node and the data element in the template.
        Parameters:
        template - the template where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        Returns:
        true if possible
      • isPossible

        public static boolean isPossible​(Template template,
                                         Node node,
                                         DataElement dataElement,
                                         ActivityConstants.AccessType type,
                                         CheckReport checkReport)
        Check if it is possible (concerning structural correctness) to insert a data edge of the given type between the given node and the data element in the template. If it is not possible the reasons are stored in the check report.
        Parameters:
        template - the template where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        checkReport - a checkReport object which can be filled with the reason why the isPossible failed (i.e. in the case the method returns false), may be null
        Returns:
        true if possible
      • isPossible

        public static boolean isPossible​(Template template,
                                         Node node,
                                         DataElement[] dataElements,
                                         ActivityConstants.AccessType type)
        Check if it is possible (concerning structural correctness) to insert data edges of the given type between the given node and the data elements in the template.
        Parameters:
        template - the template where the change operation is performed on.
        node - the node of the data edges
        dataElements - the data elements the data edges will be connected to.
        type - the access type of the data edges (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        Returns:
        true if possible
      • isPossible

        public static boolean isPossible​(Template template,
                                         Node node,
                                         DataElement[] dataElements,
                                         ActivityConstants.AccessType type,
                                         CheckReport checkReport)
        Check if it is possible (concerning structural correctness) to insert data edges of the given type between the given node and the data elements in the template. If it is not possible the reasons are stored in the check report.
        Parameters:
        template - the template where the change operation is performed on.
        node - the node of the data edges
        dataElements - the data elements the data edges will be connected to.
        type - the access type of the data edges (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        checkReport - a checkReport object which can be filled with the reason why the isPossible failed (i.e. in the case the method returns false), may be null
        Returns:
        true if possible
      • isPossible

        public static boolean isPossible​(Template template,
                                         Node node,
                                         DataElement dataElement,
                                         String paramName,
                                         ActivityConstants.AccessType type)
        Check if it is possible (concerning structural correctness) to connect the parameter of the given node with the given data element via a data edge of the given type in the template.
        Parameters:
        template - the template where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        paramName - the name of the parameter where the data element should be connected to via the connectorID
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        Returns:
        true if possible
      • isPossible

        public static boolean isPossible​(Template template,
                                         Node node,
                                         DataElement dataElement,
                                         String paramName,
                                         ActivityConstants.AccessType type,
                                         CheckReport checkReport)
        Check if it is possible (concerning structural correctness) to connect the parameter of the given node with the given data element via a data edge of the given type in the template. If it is not possible the reasons are stored in the check report.
        Parameters:
        template - the template where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        paramName - the name of the parameter where the data element should be connected to
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        checkReport - a checkReport object which can be filled with the reason why the isPossible failed (i.e. in the case the method returns false), may be null
        Returns:
        true if possible
      • isPossible

        public static boolean isPossible​(ChangeableInstance instance,
                                         Node node,
                                         DataElement dataElement,
                                         ActivityConstants.AccessType type)
        Check if it is possible (concerning structural and state-based correctness) to insert a data edge of the given type between the given node and the data element in the instance.
        Parameters:
        instance - the changeable instance where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        Returns:
        true if possible
      • isPossible

        public static boolean isPossible​(ChangeableInstance instance,
                                         Node node,
                                         DataElement dataElement,
                                         ActivityConstants.AccessType type,
                                         CheckReport checkReport)
        Check if it is possible (concerning structural and state-based correctness) to insert a data edge of the given type between the given node and the data element in the instance. If it is not possible the reasons are stored in the check report.
        Parameters:
        instance - the changeable instance where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        checkReport - a checkReport object which can be filled with the reason why the isPossible failed (i.e. in the case the method returns false), may be null
        Returns:
        true if possible
      • isPossible

        public static boolean isPossible​(ChangeableInstance instance,
                                         Node node,
                                         DataElement[] dataElements,
                                         ActivityConstants.AccessType type)
        Check if it is possible (concerning structural and state-based correctness) to insert data edges of the given type between the given node and the data elements in the instance.
        Parameters:
        instance - the changeable instance where the change operation is performed on.
        node - the node of the data edges
        dataElements - the data elements the data edges will be connected to.
        type - the access type of the data edges (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        Returns:
        true if possible
      • isPossible

        public static boolean isPossible​(ChangeableInstance instance,
                                         Node node,
                                         DataElement[] dataElements,
                                         ActivityConstants.AccessType type,
                                         CheckReport checkReport)
        Check if it is possible (concerning structural and state-based correctness) to insert data edges of the given type between the given node and the data elements in the instance. If it is not possible the reasons are stored in the check report.
        Parameters:
        instance - the changeable instance where the change operation is performed on.
        node - the node of the data edge
        dataElements - the data elements the data edges will be connected to.
        type - the access type of the data edges (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        checkReport - a checkReport object which can be filled with the reason why the isPossible failed (i.e. in the case the method returns false), may be null
        Returns:
        true if possible
      • isPossible

        public static boolean isPossible​(ChangeableInstance instance,
                                         Node node,
                                         DataElement dataElement,
                                         String paramName,
                                         ActivityConstants.AccessType type)
        Check if it is possible (concerning structural and state-based correctness) to connect the parameter of the given node with the given data element via a data edge of the given type in the instance.
        Parameters:
        instance - the changeable instance where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        paramName - the name of the parameter where the data element should be connected to
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        Returns:
        true if possible
      • isPossible

        public static boolean isPossible​(ChangeableInstance instance,
                                         Node node,
                                         DataElement dataElement,
                                         String paramName,
                                         ActivityConstants.AccessType type,
                                         CheckReport checkReport)
        Check if it is possible (concerning structural and state-based correctness) to connect the parameter of the given node with the given data element via a data edge of the given type in the instance. If it is not possible the reasons are stored in the check report.
        Parameters:
        instance - the changeable instance where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        paramName - the name of the parameter where the data element should be connected to via the connectorID
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        checkReport - a checkReport object which can be filled with the reason why the isPossible failed (i.e. in the case the method returns false), may be null
        Returns:
        true if possible
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableTemplate template,
                                            Node node,
                                            DataElement dataElement,
                                            ProcessModelParameter parameter,
                                            ActivityConstants.AccessType type)
        Inserts a new data edge in the template. This method (i.e. parameter is given) is called if the node has already an activity template in case of type WRITE/READ or a node parameter in case of type SYSTEM_READ/SYSTEM_WRITE
        Parameters:
        session - The session which is used to check for access rights on this method.
        template - the changeable template where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        parameter - the Parameter of the activity where the data edge will be connected (READ/WRITE) or the parameter of the node in case SYSTEM_READ/SYSTEM_WRITE
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableTemplate template,
                                            Node node,
                                            DataElement dataElement,
                                            ProcessModelParameter parameter,
                                            ActivityConstants.AccessType type,
                                            UpdateManager updateManager)
        Inserts a new data edge in the template. This method (i.e. parameter is given) is called if the node has already an activity template in case of type WRITE/READ or a node parameter in case of type SYSTEM_READ/SYSTEM_WRITE
        Parameters:
        session - The session which is used to check for access rights on this method.
        template - the changeable template where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        parameter - the Parameter of the activity where the data edge will be connected (READ/WRITE) or the parameter of the node in case SYSTEM_READ/SYSTEM_WRITE
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        updateManager - the manager who controls the update of the visual graph components.
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableTemplate template,
                                            Node node,
                                            DataElement dataElement,
                                            ActivityConstants.AccessType type)
        Inserts a new data edge in the template (with update manager). This method (i.e. a parameter is not given) is called in one of the following situations:
        For types: READ/WRITE
        1. if the node does not have an activity template yet.
        2. if the node does have an activity but with a parameter which is compatible with the given data element and not connected to another data element yet.
        Note: if the node already has an activity it is important to call isPossible first to guarantee that there is a free compliant parameter. For types: SYSTEM_READ/SYSTEM_WRITE
        The node must have a parameter which is compatible with the data element and which is not connected to another data element yet.
        Parameters:
        session - The session which is used to check for access rights on this method.
        template - the template where the change operation is performed on.
        node - the source node of the data edge
        dataElement - the data element the data edge will be connected to.
        type - the access type of the data edge (read or write)
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableTemplate template,
                                            Node node,
                                            DataElement dataElement,
                                            ActivityConstants.AccessType type,
                                            UpdateManager updateManager)
        Inserts a new data edge in the template (with update manager). This method (i.e. a parameter is not given) is called in one of the following situations:
        For types: READ/WRITE
        1. if the node does not have an activity template yet.
        2. if the node does have an activity but with a parameter which is compatible with the given data element and not connected to another data element yet.
        Note: if the node already has an activity it is important to call isPossible first to guarantee that there is a free compliant parameter. For types: SYSTEM_READ/SYSTEM_WRITE
        The node must have a parameter which is compatible with the data element and which is not connected to another data element yet.
        Parameters:
        session - The session which is used to check for access rights on this method.
        template - the template where the change operation is performed on.
        node - the source node of the data edge
        dataElement - the data element the data edge will be connected to.
        type - the access type of the data edge (read or write)
        updateManager - the manager who controls the update of the visual graph components.
      • performOperation

        protected static void performOperation​(SessionToken session,
                                               ChangeableTemplate template,
                                               Node node,
                                               DataElement dataElement,
                                               ProcessModelParameter param,
                                               int connectorID,
                                               ActivityConstants.AccessType type,
                                               UpdateManager updateManager)
        Inserts a new data edge in the template. This method is for internal use only, because of the connector argument which should be hidden for programmers using the change operation API.
        Parameters:
        session - The session which is used to check for access rights on this method.
        template - the template where the change operation is performed on.
        node - the source node of the data edge
        dataElement - the data element the data edge will be connected to.
        param - the parameter where the data element should be connected to via the connectorID
        connectorID -
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        updateManager - the manager who controls the update of the visual graph components (maybe null).
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableInstance instance,
                                            Node node,
                                            DataElement dataElement,
                                            ProcessModelParameter parameter,
                                            ActivityConstants.AccessType type)
        Inserts a new data edge in the instance. This method (i.e. parameter is given) is called if the node has already an activity template in case of type WRITE/READ or a node parameter in case of type SYSTEM_READ/SYSTEM_WRITE
        Parameters:
        session - The session which is used to check for access rights on this method.
        instance - the changeable instance where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        parameter - the Parameter of the activity where the data edge will be connected (READ/WRITE) or the parameter of the node in case SYSTEM_READ/SYSTEM_WRITE
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableInstance instance,
                                            Node node,
                                            DataElement dataElement,
                                            ProcessModelParameter parameter,
                                            ActivityConstants.AccessType type,
                                            UpdateManager updateManager)
        Inserts a new data edge in the instance. This method (i.e. parameter is given) is called if the node has already an activity template in case of type WRITE/READ or a node parameter in case of type SYSTEM_READ/SYSTEM_WRITE. (with update manager)
        Parameters:
        session - The session which is used to check for access rights on this method.
        instance - the changeable instance where the change operation is performed on.
        node - the node of the data edge
        dataElement - the data element the data edge will be connected to.
        parameter - the Parameter of the activity where the data edge will be connected (READ/WRITE) or the parameter of the node in case SYSTEM_READ/SYSTEM_WRITE
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        updateManager - the manager who controls the update of the visual graph components.
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableInstance instance,
                                            Node node,
                                            DataElement dataElement,
                                            ActivityConstants.AccessType type)
        Inserts a new data edge in the instance. This method (i.e. a parameter is not given) is called in one of the following situations:
        For types: READ/WRITE
        1. if the node does not have an activity template yet.
        2. if the node does have an activity but with a parameter which is compatible with the given data element and not connected to another data element yet.
        Note: if the node already has an activity it is important to call isPossible first to guarantee that there is a free compliant parameter. For types: SYSTEM_READ/SYSTEM_WRITE
        The node must have a parameter which is compatible with the data element and which is not connected to another data element yet.
        Parameters:
        session - The session which is used to check for access rights on this method.
        instance - the instance where the change operation is performed on.
        node - the source node of the data edge
        dataElement - the data element the data edge will be connected to.
        type - the access type of the data edge (read or write)
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableInstance instance,
                                            Node node,
                                            DataElement dataElement,
                                            ActivityConstants.AccessType type,
                                            UpdateManager updateManager)
        Inserts a new data edge in the instance (with update manager). This method (i.e. a parameter is not given) is called in one of the following situations:
        For types: READ/WRITE
        1. if the node does not have an activity template yet.
        2. if the node does have an activity but with a parameter which is compatible with the given data element and not connected to another data element yet.
        Note: if the node already has an activity it is important to call isPossible first to guarantee that there is a free compliant parameter. For types: SYSTEM_READ/SYSTEM_WRITE
        The node must have a parameter which is compatible with the data element and which is not connected to another data element yet.
        Parameters:
        session - The session which is used to check for access rights on this method.
        instance - the instance where the change operation is performed on.
        node - the source node of the data edge
        dataElement - the data element the data edge will be connected to.
        type - the access type of the data edge (read or write)
        updateManager - the manager who controls the update of the visual graph components.
      • performOperation

        protected static void performOperation​(SessionToken session,
                                               ChangeableInstance instance,
                                               Node node,
                                               DataElement dataElement,
                                               ProcessModelParameter param,
                                               int connectorID,
                                               ActivityConstants.AccessType type,
                                               UpdateManager updateManager)
        Inserts a new data edge in the instance. This method is for internal use only, because of the connector argument which should be hidden for programmers using the change operation API.
        Parameters:
        session - The session which is used to check for access rights on this method.
        instance - the changeable instance where the change operation is performed on.
        node - the source node of the data edge
        dataElement - the data element the data edge will be connected to.
        param - the parameter where the data element should be connected to via the connectorID
        connectorID -
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        updateManager - the manager who controls the update of the visual graph components (maybe null).
      • performOperation

        protected static void performOperation​(SessionToken session,
                                               ChangePrimitives processGraph,
                                               Node node,
                                               DataElement dataElement,
                                               ActivityConstants.AccessType type,
                                               UpdateManager updateManager)
        Worker method to do the structural changes for both changeable templates and changeable instances.
        Parameters:
        session - The session which is used to check for access rights on this method.
        processGraph - an instance of type ChangeableTemplate or ChangeableInstance
        node - the source node of the data edge
        dataElement - the data element the data edge will be connected to.
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        updateManager - the manager who controls the update of the visual graph components (maybe null).
      • performOperation

        protected static void performOperation​(SessionToken session,
                                               ChangePrimitives processGraph,
                                               Node node,
                                               DataElement dataElement,
                                               ProcessModelParameter parameter,
                                               ActivityConstants.AccessType type,
                                               UpdateManager updateManager)
        Worker method to do the structural changes for both changeable templates and changeable instances. Used if the parameter is given.
        Parameters:
        session - The session which is used to check for access rights on this method.
        processGraph - an instance of type ChangeableTemplate or ChangeableInstance
        node - the source node of the data edge
        dataElement - the data element the data edge will be connected to.
        parameter - the parameter of the activity where the data edge will be connected
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        updateManager - the manager who controls the update of the visual graph components (maybe null).
      • performOperation

        protected static void performOperation​(SessionToken session,
                                               ChangePrimitives processGraph,
                                               Node node,
                                               DataElement dataElement,
                                               ProcessModelParameter param,
                                               int connectorID,
                                               ActivityConstants.AccessType type,
                                               UpdateManager updateManager)
        Worker method to do the structural changes for both changeable templates and changeable instances. Used if the connector is given.
        Parameters:
        session - The session which is used to check for access rights on this method.
        processGraph - an instance of type ChangeableTemplate or ChangeableInstance
        node - the source node of the data edge
        dataElement - the data element the data edge will be connected to.
        param - the parameter of the activity where the data edge will be connected
        connectorID - the connector id where the data edge will be connected to
        type - the access type of the data edge (READ/WRITE/SYSTEM_READ/SYSTEM_WRITE)
        updateManager - the manager who controls the update of the visual graph components (maybe null).