|
|
@ -52,6 +52,8 @@ import org.gcube.portlets.user.workspace.client.event.OpenContextMenuTreeEvent;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.OpenContextMenuTreeEventHandler;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.OpenContextMenuTreeEventHandler;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.OpenReportsEvent;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.OpenReportsEvent;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.OpenReportsEventHandler;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.OpenReportsEventHandler;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.OpenUrlEvent;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.OpenUrlEventHandler;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.PasteItemEvent;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.PasteItemEvent;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.PasteItemEventHandler;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.PasteItemEventHandler;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.PathElementSelectedEvent;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.PathElementSelectedEvent;
|
|
|
@ -83,11 +85,14 @@ import org.gcube.portlets.user.workspace.client.event.VRESettingPermissionEvent;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.WebDavUrlEvent;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.WebDavUrlEvent;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.WebDavUrlEventHandler;
|
|
|
|
import org.gcube.portlets.user.workspace.client.event.WebDavUrlEventHandler;
|
|
|
|
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
|
|
|
|
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.workspace.client.interfaces.GXTFolderItemTypeEnum;
|
|
|
|
import org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface;
|
|
|
|
import org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface;
|
|
|
|
import org.gcube.portlets.user.workspace.client.model.FileGridModel;
|
|
|
|
import org.gcube.portlets.user.workspace.client.model.FileGridModel;
|
|
|
|
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
|
|
|
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
|
|
|
import org.gcube.portlets.user.workspace.client.model.FolderModel;
|
|
|
|
import org.gcube.portlets.user.workspace.client.model.FolderModel;
|
|
|
|
import org.gcube.portlets.user.workspace.client.model.ScopeModel;
|
|
|
|
import org.gcube.portlets.user.workspace.client.model.ScopeModel;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceServiceAsync;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.WorskpacePortlet;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.WorskpacePortlet;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.panels.GxtBorderLayoutPanel;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.panels.GxtBorderLayoutPanel;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.panels.GxtItemsPanel;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.panels.GxtItemsPanel;
|
|
|
@ -97,6 +102,10 @@ import org.gcube.portlets.user.workspace.client.view.windows.DialogGetInfo;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.windows.InfoDisplay;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.windows.InfoDisplay;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxAlert;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxAlert;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxConfirm;
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxConfirm;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.workspace.client.view.windows.WindowOpenUrl;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.workspace.client.workspace.GWTWorkspaceItem;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.workspace.client.workspace.folder.item.GWTExternalUrl;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.workspace.client.workspace.folder.item.gcube.GWTUrlDocument;
|
|
|
|
import org.gcube.portlets.user.workspace.shared.ExtendedWorkspaceACL;
|
|
|
|
import org.gcube.portlets.user.workspace.shared.ExtendedWorkspaceACL;
|
|
|
|
import org.gcube.portlets.user.workspace.shared.SessionExpiredException;
|
|
|
|
import org.gcube.portlets.user.workspace.shared.SessionExpiredException;
|
|
|
|
import org.gcube.portlets.user.workspace.shared.TrashContent;
|
|
|
|
import org.gcube.portlets.user.workspace.shared.TrashContent;
|
|
|
@ -130,7 +139,7 @@ public class AppController implements SubscriberInterface {
|
|
|
|
private WorskpacePortlet wsPortlet = null;
|
|
|
|
private WorskpacePortlet wsPortlet = null;
|
|
|
|
private AppControllerExplorer appContrExplorer = null;
|
|
|
|
private AppControllerExplorer appContrExplorer = null;
|
|
|
|
private String rootIdentifier = null;
|
|
|
|
private String rootIdentifier = null;
|
|
|
|
// public static boolean isSearchActive = false;
|
|
|
|
// public static boolean isSearchActive = false;
|
|
|
|
private HasWidgets rootPanel;
|
|
|
|
private HasWidgets rootPanel;
|
|
|
|
private String selectedSmartFolderId;
|
|
|
|
private String selectedSmartFolderId;
|
|
|
|
private String selectedSmartFolderCategory;
|
|
|
|
private String selectedSmartFolderCategory;
|
|
|
@ -173,9 +182,14 @@ public class AppController implements SubscriberInterface {
|
|
|
|
return eventBus;
|
|
|
|
return eventBus;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void bind() {
|
|
|
|
private void bind() {
|
|
|
|
|
|
|
|
//double click on URLs
|
|
|
|
|
|
|
|
eventBus.addHandler(OpenUrlEvent.TYPE, new OpenUrlEventHandler() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onClickUrl(OpenUrlEvent openUrlEvent) {
|
|
|
|
|
|
|
|
AppControllerExplorer.getInstance().doClickUrl(openUrlEvent);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
eventBus.addHandler(StoreGridChangedEvent.TYPE, new StoreGridChangedEventHandler() {
|
|
|
|
eventBus.addHandler(StoreGridChangedEvent.TYPE, new StoreGridChangedEventHandler() {
|
|
|
|
|
|
|
|
|
|
|
@ -246,7 +260,7 @@ public class AppController implements SubscriberInterface {
|
|
|
|
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.VALIDATINGOPERATION,ConstantsExplorer.LOADINGSTYLE);
|
|
|
|
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.VALIDATINGOPERATION,ConstantsExplorer.LOADINGSTYLE);
|
|
|
|
|
|
|
|
|
|
|
|
if(folderDestinationId!=null){
|
|
|
|
if(folderDestinationId!=null){
|
|
|
|
// Info.display("Info", "pasting...");
|
|
|
|
// Info.display("Info", "pasting...");
|
|
|
|
AppControllerExplorer.getEventBus().fireEvent(new PasteItemEvent(pasteItemEvent.getIds(), folderDestinationId, pasteItemEvent.getOperationType()));
|
|
|
|
AppControllerExplorer.getEventBus().fireEvent(new PasteItemEvent(pasteItemEvent.getIds(), folderDestinationId, pasteItemEvent.getOperationType()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -344,7 +358,7 @@ public class AppController implements SubscriberInterface {
|
|
|
|
|
|
|
|
|
|
|
|
FileModel parent = wsPortlet.getToolBarPath().getLastParent();
|
|
|
|
FileModel parent = wsPortlet.getToolBarPath().getLastParent();
|
|
|
|
//CREATE FOLDER PARENT FOR RPC
|
|
|
|
//CREATE FOLDER PARENT FOR RPC
|
|
|
|
// FolderModel folder = new FolderModel(parent.getIdentifier(), parent.getName(), parent.getParentFileModel(), true, parent.isShared());
|
|
|
|
// FolderModel folder = new FolderModel(parent.getIdentifier(), parent.getName(), parent.getParentFileModel(), true, parent.isShared());
|
|
|
|
updateStoreByRpc(parent);
|
|
|
|
updateStoreByRpc(parent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -396,14 +410,14 @@ public class AppController implements SubscriberInterface {
|
|
|
|
public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) {
|
|
|
|
public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) {
|
|
|
|
|
|
|
|
|
|
|
|
if(fileDownloadEvent!=null && fileDownloadEvent.getItemIdentifier()!=null){
|
|
|
|
if(fileDownloadEvent!=null && fileDownloadEvent.getItemIdentifier()!=null){
|
|
|
|
// FileGridModel fileItem = getGridSelectedItem();
|
|
|
|
// FileGridModel fileItem = getGridSelectedItem();
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// String id = fileDownloadEvent.getItemIdentifier()!=null? fileDownloadEvent.getItemIdentifier():"";
|
|
|
|
// String id = fileDownloadEvent.getItemIdentifier()!=null? fileDownloadEvent.getItemIdentifier():"";
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// if(fileItem!=null && id.compareTo(fileItem.getIdentifier())==0){
|
|
|
|
// if(fileItem!=null && id.compareTo(fileItem.getIdentifier())==0){
|
|
|
|
// fileItem.setMarkAsRead(true);
|
|
|
|
// fileItem.setMarkAsRead(true);
|
|
|
|
// accountingSetItemAsRead(true);
|
|
|
|
// accountingSetItemAsRead(true);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(fileDownloadEvent.getItemIdentifier(), fileDownloadEvent.getItemName(), fileDownloadEvent.getDownloadType()));
|
|
|
|
AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(fileDownloadEvent.getItemIdentifier(), fileDownloadEvent.getItemName(), fileDownloadEvent.getDownloadType()));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -529,10 +543,10 @@ public class AppController implements SubscriberInterface {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void doElementDoubleClick(final FileGridModel fileModel) {
|
|
|
|
private void doElementDoubleClick(final FileGridModel fileModel) {
|
|
|
|
// appContrExplorer.expandFolder(event.getIdentifier());
|
|
|
|
// appContrExplorer.expandFolder(event.getIdentifier());
|
|
|
|
|
|
|
|
|
|
|
|
//COMMENTED 01-02-2013
|
|
|
|
//COMMENTED 01-02-2013
|
|
|
|
// appContrExplorer.expandFolder(event.getIdentifier());
|
|
|
|
// appContrExplorer.expandFolder(event.getIdentifier());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(fileModel.getIdentifier()!=null){
|
|
|
|
if(fileModel.getIdentifier()!=null){
|
|
|
@ -567,7 +581,7 @@ public class AppController implements SubscriberInterface {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
else{
|
|
|
|
wsPortlet.getSearchAndFilterContainer().setSearchActive(true); //ADDED 06-04-12
|
|
|
|
wsPortlet.getSearchAndFilterContainer().setSearchActive(true); //ADDED 06-04-12
|
|
|
|
// setSearchActive(true);
|
|
|
|
// setSearchActive(true);
|
|
|
|
appContrExplorer.searching(true);
|
|
|
|
appContrExplorer.searching(true);
|
|
|
|
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activeButtonsOnSearch(true); //ADDED 09-08-13
|
|
|
|
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activeButtonsOnSearch(true); //ADDED 09-08-13
|
|
|
|
doSearchText(searchTextEvent.getTextSearch());
|
|
|
|
doSearchText(searchTextEvent.getTextSearch());
|
|
|
@ -580,7 +594,7 @@ public class AppController implements SubscriberInterface {
|
|
|
|
|
|
|
|
|
|
|
|
wsPortlet.getSearchAndFilterContainer().setVisibleButtonSave(true); //ADDED 24/04/2012
|
|
|
|
wsPortlet.getSearchAndFilterContainer().setVisibleButtonSave(true); //ADDED 24/04/2012
|
|
|
|
|
|
|
|
|
|
|
|
// wsPortlet.getGxtCardLayoutResultPanel().getToolBarItem().activeAllButtonWithoutGroupView(false); //ADDED 06/02/2013
|
|
|
|
// wsPortlet.getGxtCardLayoutResultPanel().getToolBarItem().activeAllButtonWithoutGroupView(false); //ADDED 06/02/2013
|
|
|
|
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(true);
|
|
|
|
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(true);
|
|
|
|
|
|
|
|
|
|
|
@ -590,7 +604,7 @@ public class AppController implements SubscriberInterface {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
// System.out.println("Failure search RPC");
|
|
|
|
// System.out.println("Failure search RPC");
|
|
|
|
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " searching item. " +ConstantsExplorer.TRY_AGAIN, null);
|
|
|
|
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " searching item. " +ConstantsExplorer.TRY_AGAIN, null);
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
|
|
|
|
|
|
|
@ -634,76 +648,76 @@ public class AppController implements SubscriberInterface {
|
|
|
|
|
|
|
|
|
|
|
|
switch (wsPortletInitOperation) {
|
|
|
|
switch (wsPortletInitOperation) {
|
|
|
|
|
|
|
|
|
|
|
|
case gotofolder:
|
|
|
|
case gotofolder:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
appContrExplorer.getRpcWorkspaceService().getFolderChildrenForFileGridById(itemId, new AsyncCallback<List<FileGridModel>>() {
|
|
|
|
appContrExplorer.getRpcWorkspaceService().getFolderChildrenForFileGridById(itemId, new AsyncCallback<List<FileGridModel>>() {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
|
|
|
|
|
|
|
if(caught instanceof SessionExpiredException){
|
|
|
|
|
|
|
|
GWT.log("Session expired");
|
|
|
|
|
|
|
|
viewSessionExpiredPanel();
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new MessageBoxAlert("Error", caught.getMessage(), null);
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(caught instanceof SessionExpiredException){
|
|
|
|
|
|
|
|
GWT.log("Session expired");
|
|
|
|
|
|
|
|
viewSessionExpiredPanel();
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
new MessageBoxAlert("Error", caught.getMessage(), null);
|
|
|
|
public void onSuccess(List<FileGridModel> result) {
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().updateStore(result);
|
|
|
|
}
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(result!=null && result.size()>0){
|
|
|
|
@Override
|
|
|
|
String childId = result.get(0).getIdentifier(); //GET FIRST CHILD ID TO LOAD PARENTS BREADCRUMB
|
|
|
|
public void onSuccess(List<FileGridModel> result) {
|
|
|
|
loadParentBreadcrumbByItemId(childId, false);
|
|
|
|
|
|
|
|
}else{ //FOLDER IS EMPTY AND EXISTS, FOLDER IS LAST PARENT INTO BREADCRUMB
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadParentBreadcrumbByItemId(itemId, true); //RELOAD BREDCRUMB
|
|
|
|
wsPortlet.getGridGroupContainer().updateStore(result);
|
|
|
|
}
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(result!=null && result.size()>0){
|
|
|
|
|
|
|
|
String childId = result.get(0).getIdentifier(); //GET FIRST CHILD ID TO LOAD PARENTS BREADCRUMB
|
|
|
|
|
|
|
|
loadParentBreadcrumbByItemId(childId, false);
|
|
|
|
|
|
|
|
}else{ //FOLDER IS EMPTY AND EXISTS, FOLDER IS LAST PARENT INTO BREADCRUMB
|
|
|
|
|
|
|
|
|
|
|
|
boolean selected =wsPortlet.getGridGroupContainer().selectItemByFileModelId(itemId);
|
|
|
|
loadParentBreadcrumbByItemId(itemId, true); //RELOAD BREDCRUMB
|
|
|
|
|
|
|
|
|
|
|
|
if(selected)
|
|
|
|
|
|
|
|
new InfoDisplay("Info", "The searched element was selected");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case sharelink:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
appContrExplorer.getRpcWorkspaceService().getItemForFileGrid(itemId, new AsyncCallback<FileGridModel>() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
|
|
|
new MessageBoxAlert("Error", caught.getMessage(), null);
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onSuccess(FileGridModel result) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<FileGridModel> listResult = new ArrayList<FileGridModel>();
|
|
|
|
boolean selected =wsPortlet.getGridGroupContainer().selectItemByFileModelId(itemId);
|
|
|
|
listResult.add(result);
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().updateStore(listResult);
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(result!=null)
|
|
|
|
if(selected)
|
|
|
|
loadBreadcrumbByFileModel(result, false); //ADDED 13-06-2013
|
|
|
|
new InfoDisplay("Info", "The searched element was selected");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case sharelink:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
appContrExplorer.getRpcWorkspaceService().getItemForFileGrid(itemId, new AsyncCallback<FileGridModel>() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
|
|
|
new MessageBoxAlert("Error", caught.getMessage(), null);
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onSuccess(FileGridModel result) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<FileGridModel> listResult = new ArrayList<FileGridModel>();
|
|
|
|
|
|
|
|
listResult.add(result);
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().updateStore(listResult);
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(result!=null)
|
|
|
|
|
|
|
|
loadBreadcrumbByFileModel(result, false); //ADDED 13-06-2013
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -785,22 +799,22 @@ public class AppController implements SubscriberInterface {
|
|
|
|
parent = wsPortlet.getGridGroupContainer().getCurrentFolderView();
|
|
|
|
parent = wsPortlet.getGridGroupContainer().getCurrentFolderView();
|
|
|
|
GWT.log("Search is not active get parent item for uploading from CurrentFolderView: " +parent.getName());
|
|
|
|
GWT.log("Search is not active get parent item for uploading from CurrentFolderView: " +parent.getName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// }else if(wsPortlet.getGridGroupContainer().getCurrentFolderView()!=null){
|
|
|
|
// }else if(wsPortlet.getGridGroupContainer().getCurrentFolderView()!=null){
|
|
|
|
// parent = wsPortlet.getGridGroupContainer().getCurrentFolderView();
|
|
|
|
// parent = wsPortlet.getGridGroupContainer().getCurrentFolderView();
|
|
|
|
// GWT.log("get parent item for uploading from CurrentFolderView: " +parent.getName());
|
|
|
|
// GWT.log("get parent item for uploading from CurrentFolderView: " +parent.getName());
|
|
|
|
// }else if(wsPortlet.getToolBarPath().getLastParent()!=null){
|
|
|
|
// }else if(wsPortlet.getToolBarPath().getLastParent()!=null){
|
|
|
|
// parent = wsPortlet.getToolBarPath().getLastParent();
|
|
|
|
// parent = wsPortlet.getToolBarPath().getLastParent();
|
|
|
|
// GWT.log("get parent item for uploading from breadcrumb: " +parent.getName());
|
|
|
|
// GWT.log("get parent item for uploading from breadcrumb: " +parent.getName());
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{ //IF IS SEARCH ACTIVE
|
|
|
|
else{ //IF IS SEARCH ACTIVE
|
|
|
|
|
|
|
|
|
|
|
|
//is BREADCRUMB fully?
|
|
|
|
//is BREADCRUMB fully?
|
|
|
|
if(wsPortlet.getToolBarPath().getLastParent()!=null){
|
|
|
|
if(wsPortlet.getToolBarPath().getLastParent()!=null){
|
|
|
|
parent = wsPortlet.getToolBarPath().getLastParent();
|
|
|
|
parent = wsPortlet.getToolBarPath().getLastParent();
|
|
|
|
GWT.log("Search is active get parent item for uploading from breadcrumb: " +parent.getName());
|
|
|
|
GWT.log("Search is active get parent item for uploading from breadcrumb: " +parent.getName());
|
|
|
|
}else
|
|
|
|
}else
|
|
|
|
parent = null; //also SET null AS PARENT
|
|
|
|
parent = null; //also SET null AS PARENT
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -814,14 +828,14 @@ public class AppController implements SubscriberInterface {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// eventBus.addHandler(FileDownloadEvent.TYPE, new FileDownloadEventHandler() {
|
|
|
|
// eventBus.addHandler(FileDownloadEvent.TYPE, new FileDownloadEventHandler() {
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// @Override
|
|
|
|
// @Override
|
|
|
|
// public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) {
|
|
|
|
// public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) {
|
|
|
|
// AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(fileDownloadEvent.getItemIdentifier(), fileDownloadEvent.getItemName(), fileDownloadEvent.getDownloadType()));
|
|
|
|
// AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(fileDownloadEvent.getItemIdentifier(), fileDownloadEvent.getItemName(), fileDownloadEvent.getDownloadType()));
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
eventBus.addHandler(DeleteItemEvent.TYPE, new DeleteItemEventHandler() {
|
|
|
|
eventBus.addHandler(DeleteItemEvent.TYPE, new DeleteItemEventHandler() {
|
|
|
@ -859,48 +873,48 @@ public class AppController implements SubscriberInterface {
|
|
|
|
|
|
|
|
|
|
|
|
int size = event.getListTarget().size();
|
|
|
|
int size = event.getListTarget().size();
|
|
|
|
|
|
|
|
|
|
|
|
MessageBoxConfirm mbc = new MessageBoxConfirm(ConstantsExplorer.MESSAGE_DELETE, "Are you sure you want to delete "+size+" items?");
|
|
|
|
MessageBoxConfirm mbc = new MessageBoxConfirm(ConstantsExplorer.MESSAGE_DELETE, "Are you sure you want to delete "+size+" items?");
|
|
|
|
|
|
|
|
|
|
|
|
mbc.getMessageBoxConfirm().addCallback(new Listener<MessageBoxEvent>() {
|
|
|
|
mbc.getMessageBoxConfirm().addCallback(new Listener<MessageBoxEvent>() {
|
|
|
|
|
|
|
|
|
|
|
|
public void handleEvent(MessageBoxEvent be) {
|
|
|
|
public void handleEvent(MessageBoxEvent be) {
|
|
|
|
|
|
|
|
|
|
|
|
// eventBus.fireEvent(new DeleteItemEvent(sel));
|
|
|
|
// eventBus.fireEvent(new DeleteItemEvent(sel));
|
|
|
|
|
|
|
|
|
|
|
|
//IF NOT CANCELLED
|
|
|
|
//IF NOT CANCELLED
|
|
|
|
String clickedButton = be.getButtonClicked().getItemId();
|
|
|
|
String clickedButton = be.getButtonClicked().getItemId();
|
|
|
|
if(clickedButton.equals(Dialog.YES)){
|
|
|
|
if(clickedButton.equals(Dialog.YES)){
|
|
|
|
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().mask("Deleting",ConstantsExplorer.LOADINGSTYLE);
|
|
|
|
wsPortlet.getGridGroupContainer().mask("Deleting",ConstantsExplorer.LOADINGSTYLE);
|
|
|
|
|
|
|
|
|
|
|
|
appContrExplorer.getRpcWorkspaceService().deleteListItemsForIds(event.getListTarget(), new AsyncCallback<Void>() {
|
|
|
|
appContrExplorer.getRpcWorkspaceService().deleteListItemsForIds(event.getListTarget(), new AsyncCallback<Void>() {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onFailure(Throwable arg0) {
|
|
|
|
public void onFailure(Throwable arg0) {
|
|
|
|
new MessageBoxAlert("Error", arg0.getMessage(),null);
|
|
|
|
new MessageBoxAlert("Error", arg0.getMessage(),null);
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
appContrExplorer.refreshRoot(true);
|
|
|
|
appContrExplorer.refreshRoot(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onSuccess(Void arg0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Deleting item from grid
|
|
|
|
|
|
|
|
for (String id : event.getListTarget()) {
|
|
|
|
|
|
|
|
deleteItem(id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
System.out.println("target: "+target);
|
|
|
|
public void onSuccess(Void arg0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Deleting item from grid
|
|
|
|
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){
|
|
|
|
for (String id : event.getListTarget()) {
|
|
|
|
appContrExplorer.refreshRoot(false);
|
|
|
|
deleteItem(id);
|
|
|
|
}else
|
|
|
|
}
|
|
|
|
AppControllerExplorer.getEventBus().fireEvent(new RefreshFolderEvent(target, true, false, true));
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
System.out.println("target: "+target);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){
|
|
|
|
|
|
|
|
appContrExplorer.refreshRoot(false);
|
|
|
|
|
|
|
|
}else
|
|
|
|
|
|
|
|
AppControllerExplorer.getEventBus().fireEvent(new RefreshFolderEvent(target, true, false, true));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1205,12 +1219,12 @@ public class AppController implements SubscriberInterface {
|
|
|
|
|
|
|
|
|
|
|
|
//IF IS SEARCH and IS NOT SEARCH FOR ITEM ID - fire event search text
|
|
|
|
//IF IS SEARCH and IS NOT SEARCH FOR ITEM ID - fire event search text
|
|
|
|
if(searchParameter!=null && !searchParameter.isEmpty() && !isSearchForItemId){
|
|
|
|
if(searchParameter!=null && !searchParameter.isEmpty() && !isSearchForItemId){
|
|
|
|
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
|
|
|
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void execute() {
|
|
|
|
public void execute() {
|
|
|
|
wsPortlet.getSearchAndFilterContainer().searchText(searchParameter);
|
|
|
|
wsPortlet.getSearchAndFilterContainer().searchText(searchParameter);
|
|
|
|
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activeButtonsOnSearch(false); //ADDED 09-08-13
|
|
|
|
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activeButtonsOnSearch(false); //ADDED 09-08-13
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else if(itemIdParameter!=null && !itemIdParameter.isEmpty()){ //SEARCH FOR ITEM ID
|
|
|
|
} else if(itemIdParameter!=null && !itemIdParameter.isEmpty()){ //SEARCH FOR ITEM ID
|
|
|
|
|
|
|
|
|
|
|
@ -1257,24 +1271,24 @@ public class AppController implements SubscriberInterface {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void setCookie(String name, String value, int days) {
|
|
|
|
public static void setCookie(String name, String value, int days) {
|
|
|
|
|
|
|
|
|
|
|
|
if (value == null) {
|
|
|
|
if (value == null) {
|
|
|
|
Cookies.removeCookie(name);
|
|
|
|
Cookies.removeCookie(name);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Now
|
|
|
|
// Now
|
|
|
|
Date expiringDate = new Date();
|
|
|
|
Date expiringDate = new Date();
|
|
|
|
// Now + days
|
|
|
|
// Now + days
|
|
|
|
expiringDate.setTime(expiringDate.getTime() + ConstantsPortlet.MILLISECS_PER_DAY * days);
|
|
|
|
expiringDate.setTime(expiringDate.getTime() + ConstantsPortlet.MILLISECS_PER_DAY * days);
|
|
|
|
Cookies.setCookie(name, value, expiringDate);
|
|
|
|
Cookies.setCookie(name, value, expiringDate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void setCookieGridViewSetting(String value) {
|
|
|
|
public static void setCookieGridViewSetting(String value) {
|
|
|
|
|
|
|
|
|
|
|
|
setCookie(ConstantsPortlet.GCUBE_COOKIE_WORKSPACE_GRID_VIEW_SETTING, value, ConstantsPortlet.COOKIE_EXPIRE_DAYS);
|
|
|
|
setCookie(ConstantsPortlet.GCUBE_COOKIE_WORKSPACE_GRID_VIEW_SETTING, value, ConstantsPortlet.COOKIE_EXPIRE_DAYS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public GxtBorderLayoutPanel getMainPanel(){
|
|
|
|
public GxtBorderLayoutPanel getMainPanel(){
|
|
|
|
return wsPortlet.getBorderLayoutContainer();
|
|
|
|
return wsPortlet.getBorderLayoutContainer();
|
|
|
@ -1300,9 +1314,9 @@ public class AppController implements SubscriberInterface {
|
|
|
|
|
|
|
|
|
|
|
|
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
|
|
|
|
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
|
|
|
|
|
|
|
|
|
|
|
|
// System.out.println("In client new RPC getFolderChildrenForFileGrid "+parent.getName());
|
|
|
|
// System.out.println("In client new RPC getFolderChildrenForFileGrid "+parent.getName());
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// System.out.println(parent);
|
|
|
|
// System.out.println(parent);
|
|
|
|
|
|
|
|
|
|
|
|
appContrExplorer.getRpcWorkspaceService().getFolderChildrenForFileGrid(parent, new AsyncCallback<List<FileGridModel>>() {
|
|
|
|
appContrExplorer.getRpcWorkspaceService().getFolderChildrenForFileGrid(parent, new AsyncCallback<List<FileGridModel>>() {
|
|
|
|
|
|
|
|
|
|
|
@ -1316,8 +1330,8 @@ public class AppController implements SubscriberInterface {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " getting items for grid. " +ConstantsExplorer.TRY_AGAIN, null);
|
|
|
|
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " getting items for grid. " +ConstantsExplorer.TRY_AGAIN, null);
|
|
|
|
// System.out.println(caught);
|
|
|
|
// System.out.println(caught);
|
|
|
|
// caught.printStackTrace();
|
|
|
|
// caught.printStackTrace();
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1370,7 +1384,7 @@ public class AppController implements SubscriberInterface {
|
|
|
|
wsPortlet.getSearchAndFilterContainer().searchCancel(); //TODO added in 05/04/2012
|
|
|
|
wsPortlet.getSearchAndFilterContainer().searchCancel(); //TODO added in 05/04/2012
|
|
|
|
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
|
|
|
|
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
|
|
|
|
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
|
|
|
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
|
|
|
// setSearchActive(false);
|
|
|
|
// setSearchActive(false);
|
|
|
|
|
|
|
|
|
|
|
|
resetSmartFolderSelected();
|
|
|
|
resetSmartFolderSelected();
|
|
|
|
|
|
|
|
|
|
|
@ -1470,7 +1484,7 @@ public class AppController implements SubscriberInterface {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onSuccess(List<FileGridModel> result) {
|
|
|
|
public void onSuccess(List<FileGridModel> result) {
|
|
|
|
wsPortlet.getSearchAndFilterContainer().setSearchActive(true);
|
|
|
|
wsPortlet.getSearchAndFilterContainer().setSearchActive(true);
|
|
|
|
// setSearchActive(true);
|
|
|
|
// setSearchActive(true);
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
wsPortlet.getGridGroupContainer().unmask();
|
|
|
|
wsPortlet.getGridGroupContainer().updateStore(result);
|
|
|
|
wsPortlet.getGridGroupContainer().updateStore(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1640,7 +1654,7 @@ public class AppController implements SubscriberInterface {
|
|
|
|
"<br> Your session expired, please try to <a href=\"/c/portal/logout\">login again</a> "));
|
|
|
|
"<br> Your session expired, please try to <a href=\"/c/portal/logout\">login again</a> "));
|
|
|
|
|
|
|
|
|
|
|
|
return errorPanel;
|
|
|
|
return errorPanel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* (non-Javadoc)
|
|
|
|
/* (non-Javadoc)
|
|
|
@ -1662,7 +1676,7 @@ public class AppController implements SubscriberInterface {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Info.display("Info", "paste submitting...");
|
|
|
|
// Info.display("Info", "paste submitting...");
|
|
|
|
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activePasteButton(false);
|
|
|
|
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activePasteButton(false);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1708,82 +1722,82 @@ public class AppController implements SubscriberInterface {
|
|
|
|
|
|
|
|
|
|
|
|
switch (operation) {
|
|
|
|
switch (operation) {
|
|
|
|
|
|
|
|
|
|
|
|
case SHOW:
|
|
|
|
case SHOW:
|
|
|
|
WindowTrash.getInstance().show();
|
|
|
|
WindowTrash.getInstance().show();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case DELETE_PERMANENTLY:
|
|
|
|
case DELETE_PERMANENTLY:
|
|
|
|
case RESTORE:{
|
|
|
|
case RESTORE:{
|
|
|
|
|
|
|
|
|
|
|
|
if(trashItemIds==null || trashItemIds.isEmpty())
|
|
|
|
if(trashItemIds==null || trashItemIds.isEmpty())
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WindowTrash.getInstance().maskContainer("Updating Trash");
|
|
|
|
WindowTrash.getInstance().maskContainer("Updating Trash");
|
|
|
|
List<String> trashIds = new ArrayList<String>(trashItemIds.size());
|
|
|
|
List<String> trashIds = new ArrayList<String>(trashItemIds.size());
|
|
|
|
for (FileModel fileModel : trashItemIds) {
|
|
|
|
for (FileModel fileModel : trashItemIds) {
|
|
|
|
trashIds.add(fileModel.getIdentifier());
|
|
|
|
trashIds.add(fileModel.getIdentifier());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AppControllerExplorer.rpcWorkspaceService.executeOperationOnTrash(trashIds, operation, new AsyncCallback<TrashOperationContent>() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onFailure(Throwable arg0) {
|
|
|
|
|
|
|
|
WindowTrash.getInstance().unmaskContainer();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AppControllerExplorer.rpcWorkspaceService.executeOperationOnTrash(trashIds, operation, new AsyncCallback<TrashOperationContent>() {
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onSuccess(TrashOperationContent operationResult) {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
WindowTrash.getInstance().executeOperationOnTrashContainer(operationResult.getListTrashIds(), operationResult.getOperation());
|
|
|
|
public void onFailure(Throwable arg0) {
|
|
|
|
|
|
|
|
WindowTrash.getInstance().unmaskContainer();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemDetails().updateTrashIcon(WindowTrash.getInstance().getTrashedFiles().size()>0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//SHOW POSSIBLY ERRORS
|
|
|
|
|
|
|
|
WindowTrash.getInstance().showTrashErrors(operation, operationResult.getListErrors());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(operation.equals(WorkspaceTrashOperation.RESTORE)){
|
|
|
|
|
|
|
|
appContrExplorer.refreshRoot(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
WindowTrash.getInstance().unmaskContainer();
|
|
|
|
public void onSuccess(TrashOperationContent operationResult) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WindowTrash.getInstance().executeOperationOnTrashContainer(operationResult.getListTrashIds(), operationResult.getOperation());
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemDetails().updateTrashIcon(WindowTrash.getInstance().getTrashedFiles().size()>0);
|
|
|
|
default:{
|
|
|
|
|
|
|
|
|
|
|
|
//SHOW POSSIBLY ERRORS
|
|
|
|
WindowTrash.getInstance().maskContainer("Updating Trash");
|
|
|
|
WindowTrash.getInstance().showTrashErrors(operation, operationResult.getListErrors());
|
|
|
|
AppControllerExplorer.rpcWorkspaceService.updateTrashContent(operation, new AsyncCallback<TrashContent>() {
|
|
|
|
|
|
|
|
|
|
|
|
if(operation.equals(WorkspaceTrashOperation.RESTORE)){
|
|
|
|
@Override
|
|
|
|
appContrExplorer.refreshRoot(true);
|
|
|
|
public void onFailure(Throwable arg0) {
|
|
|
|
}
|
|
|
|
WindowTrash.getInstance().unmaskContainer();
|
|
|
|
|
|
|
|
|
|
|
|
WindowTrash.getInstance().unmaskContainer();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onSuccess(TrashContent operationResult) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WindowTrash.getInstance().updateTrashContainer(operationResult.getTrashContent());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemDetails().updateTrashIcon(operationResult.getTrashContent().size()>0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//SHOW POSSIBLY ERRORS
|
|
|
|
|
|
|
|
WindowTrash.getInstance().showTrashErrors(operation, operationResult.getListErrors());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(operation.equals(WorkspaceTrashOperation.RESTORE_ALL)){
|
|
|
|
|
|
|
|
appContrExplorer.refreshRoot(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default:{
|
|
|
|
WindowTrash.getInstance().unmaskContainer();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
WindowTrash.getInstance().maskContainer("Updating Trash");
|
|
|
|
break;
|
|
|
|
AppControllerExplorer.rpcWorkspaceService.updateTrashContent(operation, new AsyncCallback<TrashContent>() {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onFailure(Throwable arg0) {
|
|
|
|
|
|
|
|
WindowTrash.getInstance().unmaskContainer();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onSuccess(TrashContent operationResult) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WindowTrash.getInstance().updateTrashContainer(operationResult.getTrashContent());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemDetails().updateTrashIcon(operationResult.getTrashContent().size()>0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//SHOW POSSIBLY ERRORS
|
|
|
|
|
|
|
|
WindowTrash.getInstance().showTrashErrors(operation, operationResult.getListErrors());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(operation.equals(WorkspaceTrashOperation.RESTORE_ALL)){
|
|
|
|
|
|
|
|
appContrExplorer.refreshRoot(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WindowTrash.getInstance().unmaskContainer();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|