Search in sources :

Example 1 with DeletePermanentFileCommand

use of org.pentaho.mantle.client.commands.DeletePermanentFileCommand in project pentaho-platform by pentaho.

the class FolderCommand method execute.

public void execute() {
    if (popupMenu != null) {
        popupMenu.hide();
    }
    SolutionBrowserPanel sbp = SolutionBrowserPanel.getInstance();
    if (mode == COMMAND.PROPERTIES) {
        new FilePropertiesCommand(repositoryFile).execute();
    } else if (mode == COMMAND.DELETE) {
        TreeItem item = sbp.getSolutionTree().getSelectedItem();
        RepositoryFileTree tree = (RepositoryFileTree) item.getUserObject();
        new DeleteFolderCommand(tree.getFile()).execute();
    } else if (mode == COMMAND.CREATE_FOLDER) {
        TreeItem item = sbp.getSolutionTree().getSelectedItem();
        RepositoryFileTree tree = (RepositoryFileTree) item.getUserObject();
        new NewFolderCommand(tree.getFile()).execute();
    } else if (mode == COMMAND.EXPORT) {
        new ExportFileCommand(repositoryFile).execute();
    } else if (mode == COMMAND.IMPORT) {
        new ImportFileCommand(repositoryFile).execute();
    } else if (mode == COMMAND.PASTE) {
        new PasteFilesCommand().execute();
    } else if (mode == COMMAND.EMPTY_TRASH) {
        new DeletePermanentFileCommand().execute();
    }
}
Also used : ImportFileCommand(org.pentaho.mantle.client.commands.ImportFileCommand) DeletePermanentFileCommand(org.pentaho.mantle.client.commands.DeletePermanentFileCommand) TreeItem(com.google.gwt.user.client.ui.TreeItem) FilePropertiesCommand(org.pentaho.mantle.client.commands.FilePropertiesCommand) NewFolderCommand(org.pentaho.mantle.client.commands.NewFolderCommand) PasteFilesCommand(org.pentaho.mantle.client.commands.PasteFilesCommand) RepositoryFileTree(org.pentaho.gwt.widgets.client.filechooser.RepositoryFileTree) ExportFileCommand(org.pentaho.mantle.client.commands.ExportFileCommand) DeleteFolderCommand(org.pentaho.mantle.client.commands.DeleteFolderCommand)

Aggregations

TreeItem (com.google.gwt.user.client.ui.TreeItem)1 RepositoryFileTree (org.pentaho.gwt.widgets.client.filechooser.RepositoryFileTree)1 DeleteFolderCommand (org.pentaho.mantle.client.commands.DeleteFolderCommand)1 DeletePermanentFileCommand (org.pentaho.mantle.client.commands.DeletePermanentFileCommand)1 ExportFileCommand (org.pentaho.mantle.client.commands.ExportFileCommand)1 FilePropertiesCommand (org.pentaho.mantle.client.commands.FilePropertiesCommand)1 ImportFileCommand (org.pentaho.mantle.client.commands.ImportFileCommand)1 NewFolderCommand (org.pentaho.mantle.client.commands.NewFolderCommand)1 PasteFilesCommand (org.pentaho.mantle.client.commands.PasteFilesCommand)1