Integred with Task Executor Widget
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@168969 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a34ae883a9
commit
34307c8ccf
|
@ -1,13 +1,19 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
|
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-21-0"
|
||||||
|
date="2018-06-07">
|
||||||
|
<Change>Integrated with Task Executor Widget</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-20-1"
|
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-20-1"
|
||||||
date="2018-04-19">
|
date="2018-04-19">
|
||||||
<Change>Managed case of Exception in order to avoid failure on checkItemLocked</Change>
|
<Change>Managed case of Exception in order to avoid failure on
|
||||||
|
checkItemLocked</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-20-0"
|
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-20-0"
|
||||||
date="2018-03-01">
|
date="2018-03-01">
|
||||||
<Change>[Task #11127] Porting to new ws-thredds engine</Change>
|
<Change>[Task #11127] Porting to new ws-thredds engine</Change>
|
||||||
<Change>[Feature #11325] Workspace: add New URL feature in the context
|
<Change>[Feature #11325] Workspace: add New URL feature in the context
|
||||||
menu of right pane</Change>
|
menu of right pane
|
||||||
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-19-0"
|
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-19-0"
|
||||||
date="2018-01-09">
|
date="2018-01-09">
|
||||||
|
|
8
pom.xml
8
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>workspace-tree-widget</artifactId>
|
<artifactId>workspace-tree-widget</artifactId>
|
||||||
<version>6.20.1-SNAPSHOT</version>
|
<version>6.21.0-SNAPSHOT</version>
|
||||||
<name>gCube Workspace Tree Widget</name>
|
<name>gCube Workspace Tree Widget</name>
|
||||||
<description>
|
<description>
|
||||||
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
||||||
|
@ -203,6 +203,12 @@
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
|
<artifactId>ws-task-executor-widget</artifactId>
|
||||||
|
<version>[0.0.1-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-httpclient</groupId>
|
<groupId>commons-httpclient</groupId>
|
||||||
<artifactId>commons-httpclient</artifactId>
|
<artifactId>commons-httpclient</artifactId>
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
|
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
|
||||||
|
|
||||||
<inherits name='org.gcube.portlets.widgets.wsthreddssync.WsThreddsWidget' />
|
<inherits name='org.gcube.portlets.widgets.wsthreddssync.WsThreddsWidget' />
|
||||||
|
|
||||||
|
<inherits
|
||||||
|
name="org.gcube.portlets.widgets.wstaskexecutor.WsTaskExecutorWidget" />
|
||||||
|
|
||||||
|
|
||||||
<!-- Specify the application specific style sheet. -->
|
<!-- Specify the application specific style sheet. -->
|
||||||
<stylesheet src='workspacetree.css' />
|
<stylesheet src='workspacetree.css' />
|
||||||
|
|
|
@ -35,6 +35,8 @@ import org.gcube.portlets.user.workspace.client.event.DeleteSmartFolderEvent;
|
||||||
import org.gcube.portlets.user.workspace.client.event.DeleteSmartFolderEventHandler;
|
import org.gcube.portlets.user.workspace.client.event.DeleteSmartFolderEventHandler;
|
||||||
import org.gcube.portlets.user.workspace.client.event.EditUserPermissionEvent;
|
import org.gcube.portlets.user.workspace.client.event.EditUserPermissionEvent;
|
||||||
import org.gcube.portlets.user.workspace.client.event.EditUserPermissionEventHandler;
|
import org.gcube.portlets.user.workspace.client.event.EditUserPermissionEventHandler;
|
||||||
|
import org.gcube.portlets.user.workspace.client.event.ExecuteDataMinerTaskEvent;
|
||||||
|
import org.gcube.portlets.user.workspace.client.event.ExecuteDataMinerTaskEventHandler;
|
||||||
import org.gcube.portlets.user.workspace.client.event.ExpandFolderEvent;
|
import org.gcube.portlets.user.workspace.client.event.ExpandFolderEvent;
|
||||||
import org.gcube.portlets.user.workspace.client.event.ExpandFolderEventHandler;
|
import org.gcube.portlets.user.workspace.client.event.ExpandFolderEventHandler;
|
||||||
import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent;
|
import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent;
|
||||||
|
@ -154,6 +156,8 @@ import org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing.mul
|
||||||
import org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.WorskpaceUploadNotificationListener;
|
import org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.WorskpaceUploadNotificationListener;
|
||||||
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.DialogUpload.UPLOAD_TYPE;
|
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.DialogUpload.UPLOAD_TYPE;
|
||||||
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.MultipleDilaogUpload;
|
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.MultipleDilaogUpload;
|
||||||
|
import org.gcube.portlets.widgets.wstaskexecutor.client.WsTaskExecutorWidget;
|
||||||
|
import org.gcube.portlets.widgets.wstaskexecutor.shared.WSItem;
|
||||||
import org.gcube.portlets.widgets.wsthreddssync.client.SyncCompletedNotification.SyncCompletedNotificationListner;
|
import org.gcube.portlets.widgets.wsthreddssync.client.SyncCompletedNotification.SyncCompletedNotificationListner;
|
||||||
import org.gcube.portlets.widgets.wsthreddssync.client.WsThreddsWidget;
|
import org.gcube.portlets.widgets.wsthreddssync.client.WsThreddsWidget;
|
||||||
import org.gcube.portlets.widgets.wsthreddssync.shared.WsFolder;
|
import org.gcube.portlets.widgets.wsthreddssync.shared.WsFolder;
|
||||||
|
@ -201,6 +205,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
||||||
private Map<String, String> msgFolderSynched = new HashMap<String,String>();
|
private Map<String, String> msgFolderSynched = new HashMap<String,String>();
|
||||||
|
|
||||||
private WsThreddsWidget wsThreddsWidget = new WsThreddsWidget();
|
private WsThreddsWidget wsThreddsWidget = new WsThreddsWidget();
|
||||||
|
private WsTaskExecutorWidget taskExecutor = new WsTaskExecutorWidget();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new app controller explorer.
|
* Instantiates a new app controller explorer.
|
||||||
|
@ -437,6 +442,24 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
eventBus.addHandler(ExecuteDataMinerTaskEvent.TYPE, new ExecuteDataMinerTaskEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onExecuteDMTask(ExecuteDataMinerTaskEvent executeDataMinerTaskEvent) {
|
||||||
|
|
||||||
|
if(executeDataMinerTaskEvent.getTargetFileModel()!=null){
|
||||||
|
WSItem wsItem = new WSItem(executeDataMinerTaskEvent.getTargetFileModel().getIdentifier(), executeDataMinerTaskEvent.getTargetFileModel().getName());
|
||||||
|
try {
|
||||||
|
taskExecutor.showTaskConfigurations(wsItem);
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
Window.alert(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
eventBus.addHandler(UpdateWorkspaceSizeEvent.TYPE, new UpdateWorkspaceSizeEventHandler() {
|
eventBus.addHandler(UpdateWorkspaceSizeEvent.TYPE, new UpdateWorkspaceSizeEventHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -72,6 +72,7 @@ public class ConstantsExplorer {
|
||||||
public static final String MESSAGE_ADD_SUBJECT = "Add Subject";
|
public static final String MESSAGE_ADD_SUBJECT = "Add Subject";
|
||||||
public static final String HISTORY = "History";
|
public static final String HISTORY = "History";
|
||||||
public static final String ACCREAD = "Read";
|
public static final String ACCREAD = "Read";
|
||||||
|
public static final String MESSAGE_EXECUTE_DM_TASK = "Execute DM Task";
|
||||||
public static final String MESSAGE_ERROR_OCCURED = "Sorry an error has occurred while processing your request";
|
public static final String MESSAGE_ERROR_OCCURED = "Sorry an error has occurred while processing your request";
|
||||||
public static final String INFO = "Info";
|
public static final String INFO = "Info";
|
||||||
public static final String MESSAGE_SEND_TO_OK = "Your message has been successfully delivered";
|
public static final String MESSAGE_SEND_TO_OK = "Your message has been successfully delivered";
|
||||||
|
@ -259,6 +260,7 @@ public static enum WS_UPLOAD_TYPE {File, Archive};
|
||||||
|
|
||||||
public static final String MSG_FOLDER_LOCKED_BY_SYNC= "is under synchronization process.\nPlease be aware that some operations are not currently available and that the content might change during this process.";
|
public static final String MSG_FOLDER_LOCKED_BY_SYNC= "is under synchronization process.\nPlease be aware that some operations are not currently available and that the content might change during this process.";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log.
|
* Log.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,63 +1,62 @@
|
||||||
|
|
||||||
package org.gcube.portlets.user.workspace.client.constant;
|
package org.gcube.portlets.user.workspace.client.constant;
|
||||||
|
|
||||||
public enum WorkspaceOperation {
|
public enum WorkspaceOperation {
|
||||||
|
INSERT_FOLDER("INS", "INS"), // Insert Folder
|
||||||
INSERT_FOLDER("INS", "INS"), // Insert Folder
|
ADD_ITEM("ADD", "ADD"), // Add Folder
|
||||||
ADD_ITEM("ADD", "ADD"), // Add Folder
|
REMOVE("REM", "REM"), UPLOAD_FILE("UPL", "UPL"),
|
||||||
REMOVE("REM", "REM"),
|
DOWNLOAD("DWL", "DWL"), PREVIEW("PRW", "PRW"), RENAME("RNM", "RNM"),
|
||||||
UPLOAD_FILE("UPL", "UPL"),
|
INSERT_SHARED_FOLDER("ISHF", "ASHF"), // Insert shared Folder
|
||||||
DOWNLOAD("DWL", "DWL"),
|
PUBLISH_ON_DATA_CATALOGUE("PODC", "PODC"),
|
||||||
PREVIEW("PRW", "PRW"),
|
PUBLISH_ON_THREDDS("POTD", "POTD"),
|
||||||
RENAME("RNM", "RNM"),
|
SHARE("SHR", "SHR"), // SHARE
|
||||||
INSERT_SHARED_FOLDER("ISHF", "ASHF"), // Insert shared Folder
|
UNSHARE("USHR", "USHR"), // UNSHARE
|
||||||
PUBLISH_ON_DATA_CATALOGUE("PODC", "PODC"),
|
UPLOAD_ARCHIVE("UPA", "UPA"), // Upload Archive
|
||||||
PUBLISH_ON_THREDDS("POTD", "POTD"),
|
LINK("LNK", "LNK"),
|
||||||
SHARE("SHR", "SHR"), // SHARE
|
SHOW("SHW", "SHW"), // SHOW
|
||||||
UNSHARE("USHR", "USHR"), // UNSHARE
|
ADD_URL("CLK", "CLK"), // Add Url
|
||||||
UPLOAD_ARCHIVE("UPA", "UPA"), // Upload Archive
|
// OPEN_REPORT_TEMPLATE("ORT", "ORT"), // Open report template
|
||||||
LINK("LNK", "LNK"),
|
// OPEN_REPORT("ORP", "ORP"), // Open report
|
||||||
SHOW("SHW", "SHW"), // SHOW
|
SENDTO("SDT", "SDT"), // Send to
|
||||||
ADD_URL("CLK", "CLK"), // Add Url
|
GET_NEW_MESSAGES("DWM", "DWM"), // Get all new messages
|
||||||
// OPEN_REPORT_TEMPLATE("ORT", "ORT"), // Open report template
|
CREATE_NEW_MESSAGE("CNM", "CNM"), // Create new message
|
||||||
// OPEN_REPORT("ORP", "ORP"), // Open report
|
MARK_AS_READ("MKR", "MKR"), // Mark as read
|
||||||
SENDTO("SDT", "SDT"), // Send to
|
MARK_AS_UNREAD("MKNR", "MKNR"), // Mark as not read
|
||||||
GET_NEW_MESSAGES("DWM", "DWM"), // Get all new messages
|
DELETE_MESSAGE("DLM", "DLM"), // Delete message
|
||||||
CREATE_NEW_MESSAGE("CNM", "CNM"), // Create new message
|
FORWARD_MESSAGE("FWM", "FWM"), // Forward message
|
||||||
MARK_AS_READ("MKR", "MKR"), // Mark as read
|
COPY("CPI", "CPI"), // copy item
|
||||||
MARK_AS_UNREAD("MKNR", "MKNR"), // Mark as not read
|
PASTE("PSI", "PSI"), // paste
|
||||||
DELETE_MESSAGE("DLM", "DLM"), // Delete message
|
REFRESH_FOLDER("RFH", "RFH"), // Refresh
|
||||||
FORWARD_MESSAGE("FWM", "FWM"), // Forward message
|
WEBDAV_URL("WDV", "WDV"), // WebDav
|
||||||
COPY("CPI", "CPI"), // copy item
|
GET_INFO("GTI", "GTI"), // GET INFO
|
||||||
PASTE("PSI", "PSI"), // paste
|
HISTORY("HST", "HST"), // HISTORY
|
||||||
REFRESH_FOLDER("RFH", "RFH"), // Refresh
|
ACCREAD("ACR", "ACR"), // ACCOUNTING READ
|
||||||
WEBDAV_URL("WDV", "WDV"), // WebDav
|
SHARE_LINK("SLK", "SLK"), // SHARE URL LINK
|
||||||
GET_INFO("GTI", "GTI"), // GET INFO
|
PUBLIC_LINK("PLK", "PLK"), // PUBLIC LINK
|
||||||
HISTORY("HST", "HST"), //HISTORY
|
// ADD_ADMINISTRATOR("AAD", "AAD"), // ADD_ADMINISTRATOR
|
||||||
ACCREAD("ACR", "ACR"), //ACCOUNTING READ
|
VRE_CHANGE_PERIMISSIONS("CHP", "CHP"),
|
||||||
SHARE_LINK("SLK", "SLK"), //SHARE URL LINK
|
EDIT_PERMISSIONS("EDP", "EDP"), // EDIT PERMISSIONS
|
||||||
PUBLIC_LINK("PLK", "PLK"), //PUBLIC LINK
|
FOLDER_LINK("FRL", "FRL"), // FOLDER LINK
|
||||||
// ADD_ADMINISTRATOR("AAD", "AAD"), // ADD_ADMINISTRATOR
|
FOLDER_LINK_REMOVE("FPR", "FPR"),
|
||||||
VRE_CHANGE_PERIMISSIONS("CHP", "CHP"),
|
VERSIONING("VRN", "VRN"), // VERSIONING
|
||||||
EDIT_PERMISSIONS("EDP", "EDP"), //EDIT PERMISSIONS
|
EXECUTE_DM_TASK("EDT", "EDT"); //EXECUTE DM TASK
|
||||||
FOLDER_LINK("FRL", "FRL"), //FOLDER LINK
|
|
||||||
FOLDER_LINK_REMOVE("FPR","FPR"),
|
|
||||||
VERSIONING("VRN", "VRN"); //VERSIONING
|
|
||||||
|
|
||||||
|
|
||||||
private String id; // ID CONTEXT MENU
|
private String id; // ID CONTEXT MENU
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
WorkspaceOperation(String id, String name) {
|
WorkspaceOperation(String id, String name) {
|
||||||
|
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
package org.gcube.portlets.user.workspace.client.event;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class ExecuteDataMinerTaskEvent.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||||
|
* May 25, 2018
|
||||||
|
*/
|
||||||
|
public class ExecuteDataMinerTaskEvent extends
|
||||||
|
GwtEvent<ExecuteDataMinerTaskEventHandler> {
|
||||||
|
public static Type<ExecuteDataMinerTaskEventHandler> TYPE = new Type<ExecuteDataMinerTaskEventHandler>();
|
||||||
|
private FileModel targetFileModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new execute data miner task event.
|
||||||
|
*
|
||||||
|
* @param target the target
|
||||||
|
*/
|
||||||
|
public ExecuteDataMinerTaskEvent(FileModel target) {
|
||||||
|
this.setTargetFileModel(target);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Type<ExecuteDataMinerTaskEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.EventHandler)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void dispatch(ExecuteDataMinerTaskEventHandler handler) {
|
||||||
|
handler.onExecuteDMTask(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the target file model.
|
||||||
|
*
|
||||||
|
* @return the targetFileModel
|
||||||
|
*/
|
||||||
|
public FileModel getTargetFileModel() {
|
||||||
|
return targetFileModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the target file model.
|
||||||
|
*
|
||||||
|
* @param targetFileModel the targetFileModel to set
|
||||||
|
*/
|
||||||
|
public void setTargetFileModel(FileModel targetFileModel) {
|
||||||
|
this.targetFileModel = targetFileModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package org.gcube.portlets.user.workspace.client.event;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Interface ExecuteDataMinerTaskEventHandler.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||||
|
* May 25, 2018
|
||||||
|
*/
|
||||||
|
public interface ExecuteDataMinerTaskEventHandler extends EventHandler {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On execute dm task.
|
||||||
|
*
|
||||||
|
* @param executeDataMinerTaskEvent the execute data miner task event
|
||||||
|
*/
|
||||||
|
void onExecuteDMTask(ExecuteDataMinerTaskEvent executeDataMinerTaskEvent);
|
||||||
|
}
|
|
@ -16,6 +16,7 @@ import org.gcube.portlets.user.workspace.client.event.CreateSharedFolderEvent;
|
||||||
import org.gcube.portlets.user.workspace.client.event.CreateUrlEvent;
|
import org.gcube.portlets.user.workspace.client.event.CreateUrlEvent;
|
||||||
import org.gcube.portlets.user.workspace.client.event.DeleteItemEvent;
|
import org.gcube.portlets.user.workspace.client.event.DeleteItemEvent;
|
||||||
import org.gcube.portlets.user.workspace.client.event.EditUserPermissionEvent;
|
import org.gcube.portlets.user.workspace.client.event.EditUserPermissionEvent;
|
||||||
|
import org.gcube.portlets.user.workspace.client.event.ExecuteDataMinerTaskEvent;
|
||||||
import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent;
|
import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent;
|
||||||
import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent.DownloadType;
|
import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent.DownloadType;
|
||||||
import org.gcube.portlets.user.workspace.client.event.FileUploadEvent;
|
import org.gcube.portlets.user.workspace.client.event.FileUploadEvent;
|
||||||
|
@ -391,6 +392,24 @@ public class ContextMenuTree {
|
||||||
publishOnThredds.setVisible(false);
|
publishOnThredds.setVisible(false);
|
||||||
contextMenu.add(publishOnThredds);
|
contextMenu.add(publishOnThredds);
|
||||||
|
|
||||||
|
// publish on data catalogue
|
||||||
|
MenuItem executeDMTask = new MenuItem();
|
||||||
|
executeDMTask.setId(WorkspaceOperation.EXECUTE_DM_TASK.getId());
|
||||||
|
executeDMTask.setText(ConstantsExplorer.MESSAGE_EXECUTE_DM_TASK);
|
||||||
|
executeDMTask.setIcon(Resources.getIconShell());
|
||||||
|
|
||||||
|
executeDMTask.addSelectionListener(new SelectionListener<MenuEvent>() {
|
||||||
|
public void componentSelected(MenuEvent ce) {
|
||||||
|
|
||||||
|
FileModel sourceFileModel = listSelectedItems.get(0);
|
||||||
|
if (sourceFileModel != null) {
|
||||||
|
eventBus.fireEvent(new ExecuteDataMinerTaskEvent(sourceFileModel));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
executeDMTask.setVisible(false);
|
||||||
|
contextMenu.add(executeDMTask);
|
||||||
|
|
||||||
|
|
||||||
MenuItem editPermissions = new MenuItem();
|
MenuItem editPermissions = new MenuItem();
|
||||||
editPermissions.setId(WorkspaceOperation.EDIT_PERMISSIONS.getId());
|
editPermissions.setId(WorkspaceOperation.EDIT_PERMISSIONS.getId());
|
||||||
|
@ -834,6 +853,7 @@ public class ContextMenuTree {
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.SENDTO.getId()).setVisible(true); //send to
|
contextMenu.getItemByItemId(WorkspaceOperation.SENDTO.getId()).setVisible(true); //send to
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.DOWNLOAD.getId()).setVisible(true); //DOWNLOAD
|
contextMenu.getItemByItemId(WorkspaceOperation.DOWNLOAD.getId()).setVisible(true); //DOWNLOAD
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.COPY.getId()).setEnabled(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.COPY.getId()).setEnabled(true);
|
||||||
|
contextMenu.getItemByItemId(WorkspaceOperation.EXECUTE_DM_TASK.getId()).setVisible(false);
|
||||||
|
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.PREVIEW.getId()).setVisible(false); //preview image
|
contextMenu.getItemByItemId(WorkspaceOperation.PREVIEW.getId()).setVisible(false); //preview image
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.LINK.getId()).setVisible(false); //open link
|
contextMenu.getItemByItemId(WorkspaceOperation.LINK.getId()).setVisible(false); //open link
|
||||||
|
@ -933,6 +953,7 @@ public class ContextMenuTree {
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.SHOW.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.SHOW.getId()).setVisible(true);
|
||||||
|
contextMenu.getItemByItemId(WorkspaceOperation.EXECUTE_DM_TASK.getId()).setVisible(true);
|
||||||
|
|
||||||
switch(selectedItem.getGXTFolderItemType()){
|
switch(selectedItem.getGXTFolderItemType()){
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
|
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
|
||||||
|
|
||||||
<inherits name='org.gcube.portlets.widgets.wsthreddssync.WsThreddsWidget' />
|
<inherits name='org.gcube.portlets.widgets.wsthreddssync.WsThreddsWidget' />
|
||||||
|
|
||||||
|
<inherits
|
||||||
|
name="org.gcube.portlets.widgets.wstaskexecutor.WsTaskExecutorWidget" />
|
||||||
|
|
||||||
|
|
||||||
<!-- Specify the application specific style sheet. -->
|
<!-- Specify the application specific style sheet. -->
|
||||||
<stylesheet src='workspacetree.css' />
|
<stylesheet src='workspacetree.css' />
|
||||||
|
|
Loading…
Reference in New Issue