Class DeleteBorderNodes


  • public class DeleteBorderNodes
    extends Object
    Use this change operation to delete the split/start loop and join/end loop nodes. The mentioned nodes can only be deleted, if there is only one branch between them. 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

      • DeleteBorderNodes

        public DeleteBorderNodes()
    • Method Detail

      • isPossible

        public static boolean isPossible​(Template template,
                                         Node split,
                                         Node join)
        Checks if it is possible (concerning structural correctness) to delete start and end nodes of the current block in the given template.
        Parameters:
        template - the template where the block nodes should be deleted
        split - the beginning of the split
        join - the end of it
        Returns:
        True, if deletion is possible
      • isPossible

        public static boolean isPossible​(Template template,
                                         Node split,
                                         Node join,
                                         CheckReport checkReport)
        Checks if it is possible (concerning structural correctness) to delete start and end nodes of the current block in the given template. If it is not possible the reasons are stored in the checkReport.
        Parameters:
        template - the template where the block nodes should be deleted
        split - the beginning of the split
        join - the end of it
        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 split,
                                         Node join)
        Checks if it is possible (concerning structural and state-based correctness) to delete start and end nodes of the current block in the given instance.
        Parameters:
        instance - the changeable instance where the block nodes should be deleted
        split - the beginning of the split
        join - the end of it
        Returns:
        True, if deletion is possible
      • isPossible

        public static boolean isPossible​(ChangeableInstance instance,
                                         Node split,
                                         Node join,
                                         CheckReport checkReport)
        Checks if it is possible (concerning structural and state-based correctness) to delete start and end nodes of the current block in the given instance. If it is not possible the reasons are stored in the checkReport.
        Parameters:
        instance - the changeable instance where the block nodes should be deleted
        split - the beginning of the split
        join - the end of it
        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 split,
                                            Node join)
        Deletes a split and its corresponding join node (border nodes) from the given template.
        Parameters:
        session - The session which is used to check for access rights on this method.
        template - The template where the method is performed on.
        split - the split node
        join - the join node
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableTemplate template,
                                            Node split,
                                            Node join,
                                            UpdateManager updateManager)
        Deletes a split and its corresponding join node (border nodes) from the given template (with updateManager).
        Parameters:
        session - The session which is used to check for access rights on this method.
        template - The template where the method is performed on.
        split - the split node
        join - the join node
        updateManager - the manager who controls the update of the visual graph components. (maybe null)
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableInstance instance,
                                            Node split,
                                            Node join)
        Deletes a split and its corresponding join node (border nodes) from the given instance.
        Parameters:
        session - The session which is used to check for access rights on this method.
        instance - The changeable instance where the method is performed on.
        split - the split node
        join - the join node
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableInstance instance,
                                            Node split,
                                            Node join,
                                            UpdateManager updateManager)
        Deletes a split and its corresponding join node (border nodes) from the given instance (with updateManager).
        Parameters:
        session - The session which is used to check for access rights on this method.
        instance - the changeable instance where the method is performed on.
        split - the split node
        join - the join node
        updateManager - the manager who controls the update of the visual graph components. (maybe null)
      • performOperation

        protected static void performOperation​(SessionToken session,
                                               ChangePrimitives processGraph,
                                               Node split,
                                               Node join,
                                               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
        split - the split node
        join - the join node
        updateManager - the manager who controls the update of the visual graph components. (maybe null)