[Release #12006] Removed Send to

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@169605 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2018-07-02 13:05:35 +00:00
parent 7ac6e6f955
commit 4c53e7f769
6 changed files with 2 additions and 106 deletions

View File

@ -3,6 +3,8 @@
date="2018-07-02"> date="2018-07-02">
<Change>[Task #12089] Migrate to workspace-uploader 2.0 <Change>[Task #12089] Migrate to workspace-uploader 2.0
</Change> </Change>
<Change>[Release #12006] Removed Send to
</Change>
</Changeset> </Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-21-0" <Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-21-0"
date="2018-06-07"> date="2018-06-07">

View File

@ -77,8 +77,6 @@ import org.gcube.portlets.user.workspace.client.event.RenderForm;
import org.gcube.portlets.user.workspace.client.event.RenderFormEventHandler; import org.gcube.portlets.user.workspace.client.event.RenderFormEventHandler;
import org.gcube.portlets.user.workspace.client.event.SelectedItemEvent; import org.gcube.portlets.user.workspace.client.event.SelectedItemEvent;
import org.gcube.portlets.user.workspace.client.event.SelectedItemEventHandler; import org.gcube.portlets.user.workspace.client.event.SelectedItemEventHandler;
import org.gcube.portlets.user.workspace.client.event.SendMessageEvent;
import org.gcube.portlets.user.workspace.client.event.SendMessageEventHandler;
import org.gcube.portlets.user.workspace.client.event.SessionExpiredEvent; import org.gcube.portlets.user.workspace.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.workspace.client.event.SessionExpiredEventHandler; import org.gcube.portlets.user.workspace.client.event.SessionExpiredEventHandler;
import org.gcube.portlets.user.workspace.client.event.SmartFolderSelectedEvent; import org.gcube.portlets.user.workspace.client.event.SmartFolderSelectedEvent;
@ -499,15 +497,6 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
} }
}); });
eventBus.addHandler(SendMessageEvent.TYPE, new SendMessageEventHandler() {
@Override
public void onSendMessage(SendMessageEvent sendMessageEvent) {
notifySubscriber(sendMessageEvent);
}
});
eventBus.addHandler(UnShareFolderEvent.TYPE,new UnShareFolderEventHandler() { eventBus.addHandler(UnShareFolderEvent.TYPE,new UnShareFolderEventHandler() {
@Override @Override
@ -2009,19 +1998,6 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
sub.refreshFolder(refresh.getFolderTarget(), refresh.isForceRefresh(), refresh.isForceReloadBreadCrumb()); sub.refreshFolder(refresh.getFolderTarget(), refresh.isForceRefresh(), refresh.isForceReloadBreadCrumb());
}else if(event instanceof SendMessageEvent){
SendMessageEvent messageEvent = (SendMessageEvent) event;
HashMap<String, String> hashFiles = new HashMap<String, String>();
if(messageEvent.getListFileModelSelected()!=null){
for (FileModel fileModel : messageEvent.getListFileModelSelected()) {
hashFiles.put(fileModel.getIdentifier(), fileModel.getName());
}
}
sub.createNewMessage(hashFiles);
}else if(event instanceof FileDownloadEvent){ }else if(event instanceof FileDownloadEvent){
FileDownloadEvent messageEvent = (FileDownloadEvent) event; FileDownloadEvent messageEvent = (FileDownloadEvent) event;

View File

@ -15,9 +15,6 @@ public enum WorkspaceOperation {
LINK("LNK", "LNK"), LINK("LNK", "LNK"),
SHOW("SHW", "SHW"), // SHOW SHOW("SHW", "SHW"), // SHOW
ADD_URL("CLK", "CLK"), // Add Url ADD_URL("CLK", "CLK"), // Add Url
// OPEN_REPORT_TEMPLATE("ORT", "ORT"), // Open report template
// OPEN_REPORT("ORP", "ORP"), // Open report
SENDTO("SDT", "SDT"), // Send to
GET_NEW_MESSAGES("DWM", "DWM"), // Get all new messages GET_NEW_MESSAGES("DWM", "DWM"), // Get all new messages
CREATE_NEW_MESSAGE("CNM", "CNM"), // Create new message CREATE_NEW_MESSAGE("CNM", "CNM"), // Create new message
MARK_AS_READ("MKR", "MKR"), // Mark as read MARK_AS_READ("MKR", "MKR"), // Mark as read

View File

@ -1,50 +0,0 @@
package org.gcube.portlets.user.workspace.client.event;
import java.util.List;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class SendMessageEvent extends GwtEvent<SendMessageEventHandler> implements GuiEventInterface{
public static Type<SendMessageEventHandler> TYPE = new Type<SendMessageEventHandler>();
private List<FileModel> listFileModelSelected;
// public AddFolderEvent(FolderModel newFolder, FolderModel parentFileModel) {
// this.newFolder = newFolder;
// this.parentFileModel = parentFileModel;
// }
public SendMessageEvent(List<FileModel> selected) {
this.listFileModelSelected = selected;
}
@Override
public Type<SendMessageEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(SendMessageEventHandler handler) {
handler.onSendMessage(this);
}
public List<FileModel> getListFileModelSelected() {
return listFileModelSelected;
}
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.CREATE_NEW_MESSAGE;
}
}

View File

@ -1,7 +0,0 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface SendMessageEventHandler extends EventHandler {
void onSendMessage(SendMessageEvent sendMessageEvent);
}

View File

@ -30,7 +30,6 @@ import org.gcube.portlets.user.workspace.client.event.PasteItemEvent;
import org.gcube.portlets.user.workspace.client.event.PublishOnDataCatalogueEvent; import org.gcube.portlets.user.workspace.client.event.PublishOnDataCatalogueEvent;
import org.gcube.portlets.user.workspace.client.event.RefreshFolderEvent; import org.gcube.portlets.user.workspace.client.event.RefreshFolderEvent;
import org.gcube.portlets.user.workspace.client.event.RenameItemEvent; import org.gcube.portlets.user.workspace.client.event.RenameItemEvent;
import org.gcube.portlets.user.workspace.client.event.SendMessageEvent;
import org.gcube.portlets.user.workspace.client.event.SyncWithThreddsCatalogueEvent; import org.gcube.portlets.user.workspace.client.event.SyncWithThreddsCatalogueEvent;
import org.gcube.portlets.user.workspace.client.event.UnShareFolderEvent; import org.gcube.portlets.user.workspace.client.event.UnShareFolderEvent;
import org.gcube.portlets.user.workspace.client.event.VRESettingPermissionEvent; import org.gcube.portlets.user.workspace.client.event.VRESettingPermissionEvent;
@ -611,24 +610,6 @@ public class ContextMenuTree {
contextMenu.add(viewWebDav); contextMenu.add(viewWebDav);
MenuItem sendTo = new MenuItem();
sendTo.setId(WorkspaceOperation.SENDTO.getId());
sendTo.setText(ConstantsExplorer.MESSAGE_SEND_TO);
sendTo.setIcon(Resources.getIconSendTo());
sendTo.addSelectionListener(new SelectionListener<MenuEvent>() {
public void componentSelected(MenuEvent ce) {
if(listSelectedItems!=null && listSelectedItems.size()>0)
eventBus.fireEvent(new SendMessageEvent(listSelectedItems));
}
});
contextMenu.add(sendTo);
MenuItem upload = new MenuItem(); MenuItem upload = new MenuItem();
upload.setId(WorkspaceOperation.UPLOAD_FILE.getId()); upload.setId(WorkspaceOperation.UPLOAD_FILE.getId());
upload.setText(ConstantsExplorer.MESSAGE_UPLOAD_FILE); upload.setText(ConstantsExplorer.MESSAGE_UPLOAD_FILE);
@ -850,7 +831,6 @@ public class ContextMenuTree {
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_FILE.getId()).setVisible(true); contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_FILE.getId()).setVisible(true);
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_ARCHIVE.getId()).setVisible(true); contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_ARCHIVE.getId()).setVisible(true);
contextMenu.getItemByItemId(WorkspaceOperation.ADD_URL.getId()).setVisible(true); contextMenu.getItemByItemId(WorkspaceOperation.ADD_URL.getId()).setVisible(true);
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.EXECUTE_DM_TASK.getId()).setVisible(false);
@ -909,7 +889,6 @@ public class ContextMenuTree {
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_FILE.getId()).setVisible(false); contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_FILE.getId()).setVisible(false);
contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_ARCHIVE.getId()).setVisible(false); contextMenu.getItemByItemId(WorkspaceOperation.UPLOAD_ARCHIVE.getId()).setVisible(false);
contextMenu.getItemByItemId(WorkspaceOperation.ADD_URL.getId()).setVisible(false); contextMenu.getItemByItemId(WorkspaceOperation.ADD_URL.getId()).setVisible(false);
contextMenu.getItemByItemId(WorkspaceOperation.SENDTO.getId()).setVisible(false);
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_FOLDER.getId()).setVisible(false); //insert folder contextMenu.getItemByItemId(WorkspaceOperation.INSERT_FOLDER.getId()).setVisible(false); //insert folder
contextMenu.getItemByItemId(WorkspaceOperation.DOWNLOAD.getId()).setVisible(false); contextMenu.getItemByItemId(WorkspaceOperation.DOWNLOAD.getId()).setVisible(false);
} }
@ -923,7 +902,6 @@ public class ContextMenuTree {
contextMenu.getItemByItemId(WorkspaceOperation.SHARE.getId()).setVisible(true); //SHARE contextMenu.getItemByItemId(WorkspaceOperation.SHARE.getId()).setVisible(true); //SHARE
contextMenu.getItemByItemId(WorkspaceOperation.SHOW.getId()).setVisible(false); //show contextMenu.getItemByItemId(WorkspaceOperation.SHOW.getId()).setVisible(false); //show
contextMenu.getItemByItemId(WorkspaceOperation.REFRESH_FOLDER.getId()).setVisible(true); //refresh contextMenu.getItemByItemId(WorkspaceOperation.REFRESH_FOLDER.getId()).setVisible(true); //refresh
contextMenu.getItemByItemId(WorkspaceOperation.SENDTO.getId()).setVisible(false); //send to
contextMenu.getItemByItemId(WorkspaceOperation.FOLDER_LINK.getId()).setVisible(true); //folder link contextMenu.getItemByItemId(WorkspaceOperation.FOLDER_LINK.getId()).setVisible(true); //folder link
contextMenu.getItemByItemId(WorkspaceOperation.EXECUTE_DM_TASK.getId()).setVisible(true); contextMenu.getItemByItemId(WorkspaceOperation.EXECUTE_DM_TASK.getId()).setVisible(true);
if(selectedItem.isShared()){//IS SHARED if(selectedItem.isShared()){//IS SHARED