Class ProjectDataDeleteTask

  • All Implemented Interfaces:
    MonitoredRunnable

    public class ProjectDataDeleteTask
    extends Task
    Task that handles deleting files and folders from the project.

    This task will iterate all the files and folders specified by the user to weed out common problem issues (read-only files, checked-out files), ask the user to confirm, and then perform the actual delete operations.

    This task will show a summary dialog if there were multiple files involved or any errors encountered.

    • Constructor Detail

      • ProjectDataDeleteTask

        public ProjectDataDeleteTask​(java.util.List<DomainFile> files,
                                     java.util.List<DomainFolder> folders,
                                     java.awt.Component parentComponent)
        Creates a new task to delete the specified files and folders.
        Parameters:
        files - - the files the user requested to be deleted, or null.
        folders - - the folders the user requested to be deleted, or null.
        parentComponent - - parent java awt component that will be parent of the message dialogs and such.
    • Method Detail

      • run

        public void run​(TaskMonitor monitor)
        Description copied from class: Task
        This is the method that will be called to do the work

        Note: The run(TaskMonitor) method should not make any calls directly on Swing components, as these calls are not thread safe. Place Swing calls in a Runnable, then call Swing.runLater(Runnable) or Swing.runNow(Runnable)to schedule the Runnable inside of the AWT Event Thread.

        Specified by:
        run in class Task
        Parameters:
        monitor - The TaskMonitor that will monitor the executing Task