Class DeleteDataEdge


  • public class DeleteDataEdge
    extends Object
    Change operation for the deletion of 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 TODO Refactor; use a common interface for change operations.
    • Field Detail

      • logger

        protected static final Logger logger
        a Logger
    • Constructor Detail

      • DeleteDataEdge

        public DeleteDataEdge()
    • 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 delete the data edge between the given node and the data element in the template.
        Parameters:
        template - the template where the change operation is performed on.
        node - node of the data edge
        dataElement - the data element the data edge is connected to.
        type - the access type of the data edge (read or write)
        Returns:
        True, if deletion is 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 delete the data edge between the given node and the data element. If it is not possible the reasons are stored in the checkReport.
        Parameters:
        template - the template where the change operation is performed on.
        node - node of the data edge
        dataElement - the data element the data edge is connected to.
        type - the access type of the data edge (read or 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 deletion is 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 delete the data edge between the given node and the data element in the instance.
        Parameters:
        instance - the changeable instance where the change operation is performed on.
        node - node of the data edge
        dataElement - the data element the data edge is connected to.
        type - the access type of the data edge (read or write)
        Returns:
        True, if deletion is 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 delete the data edge between the given node and the data element. If it is not possible the reasons are stored in the checkReport.
        Parameters:
        instance - the changeable instance where the change operation is performed on.
        node - node of the data edge
        dataElement - the data element the data edge is connected to.
        type - the access type of the data edge (read or 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 deletion is possible
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableTemplate template,
                                            Node node,
                                            DataElement dataElement,
                                            ActivityConstants.AccessType type)
        Deletes a data edge from the template.
        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 node of the data edge
        dataElement - the data element the data edge is 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)
        Deletes a data edge from the template (with updateManager).
        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 node of the data edge
        dataElement - dataElement the data element the data edge is connected to.
        type - type the access type of the data edge (read or 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)
        Deletes a data edge form the instance.
        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 is 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)
        Deletes a data edge form the instance (with updateManager).
        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 is 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,
                                               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 node of the data edge
        dataElement - the data element the data edge is 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.