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();
}
}
Aggregations