Added mask on moving item
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@115143 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ead8c3a7da
commit
ef3339fde1
|
@ -172,7 +172,6 @@ import com.google.gwt.user.client.Window;
|
|||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.HasWidgets;
|
||||
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
|
@ -1601,12 +1600,12 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
@Override
|
||||
public void onMoveItem(final MoveItemEvent event) {
|
||||
|
||||
|
||||
explorerPanel.getAsycTreePanel().mask(ConstantsExplorer.MOVING,ConstantsExplorer.LOADINGSTYLE);
|
||||
rpcWorkspaceService.moveItem(event.getFileSourceModel().getIdentifier(), event.getTargetParentFileModel().getIdentifier(), new AsyncCallback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
||||
explorerPanel.getAsycTreePanel().unmask();
|
||||
if(caught instanceof SessionExpiredException){
|
||||
GWT.log("Session expired");
|
||||
eventBus.fireEvent(new SessionExpiredEvent());
|
||||
|
@ -1621,12 +1620,10 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
|
||||
@Override
|
||||
public void onSuccess(Boolean result) {
|
||||
explorerPanel.getAsycTreePanel().unmask();
|
||||
if(result){
|
||||
|
||||
explorerPanel.getAsycTreePanel().reloadTreeLevelAndExpandFolder(event.getTargetParentFileModel().getIdentifier(), true);
|
||||
notifySubscriber(event);
|
||||
|
||||
// explorerPanel.getAsycTreePanel().setExpandTreeLevel(event.getTargetParentFileModel(), true); //Expand level drop
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -86,6 +86,7 @@ public class ConstantsExplorer {
|
|||
public static final String EDIT_PERMISSIONS = "Edit Permissions";
|
||||
public static final String TITLEACCESSWEBDAV = "Access from Desktop";
|
||||
public static final String ACCESSWEBDAVMSG = "Files and folders can be managed directly from the file explorer of your desktop operating system.";
|
||||
public static final String MOVING = "Moving...";
|
||||
|
||||
public static final String FILEUPLOADHEADER = "File upload in: ";
|
||||
public static final String FILE = "File";
|
||||
|
@ -217,4 +218,5 @@ public class ConstantsExplorer {
|
|||
//PROPERTY
|
||||
public static final String SPECIALFOLDERNAME = "SPECIALFOLDERNAME";
|
||||
public static final String SPECIALFOLDERNAMEPROPERTIESFILE = "specialfoldername.properties";
|
||||
|
||||
}
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
package org.gcube.portlets.user.workspace;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.gcube.application.framework.core.session.ASLSession;
|
||||
import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||
import org.gcube.common.homelibrary.home.exceptions.HomeNotFoundException;
|
||||
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
||||
|
@ -16,12 +18,14 @@ import org.gcube.common.homelibrary.home.workspace.Workspace;
|
|||
import org.gcube.common.homelibrary.home.workspace.WorkspaceFolder;
|
||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceSharedFolder;
|
||||
import org.gcube.common.homelibrary.home.workspace.accessmanager.ACLType;
|
||||
import org.gcube.common.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException;
|
||||
import org.gcube.common.homelibrary.home.workspace.folder.FolderItem;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.common.scope.impl.ScopeBean;
|
||||
import org.gcube.portlets.user.workspace.server.util.AclTypeComparator;
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.user.workspace.server.GWTWorkspaceBuilder;
|
||||
import org.gcube.portlets.user.workspace.server.util.MetadataConverter;
|
||||
import org.gcube.portlets.user.workspace.server.util.WorkspaceEventCollector;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,28 +53,49 @@ public class ItemRetrieving {
|
|||
System.out.println("init HL");
|
||||
try {
|
||||
|
||||
Workspace ws = HomeLibrary
|
||||
.getHomeManagerFactory()
|
||||
.getHomeManager()
|
||||
.getHome(TEST_USER)
|
||||
.getWorkspace();
|
||||
|
||||
retrieveFirstLevel(ws);
|
||||
|
||||
} catch (WorkspaceFolderNotFoundException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (InternalErrorException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (HomeNotFoundException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (UserNotFoundException e) {
|
||||
// TODO Auto-generated catch block
|
||||
// Workspace ws = HomeLibrary
|
||||
// .getHomeManagerFactory()
|
||||
// .getHomeManager()
|
||||
// .getHome(TEST_USER)
|
||||
// .getWorkspace();
|
||||
|
||||
System.out.println("\n\nGetting Disk Usage");
|
||||
Workspace ws = getWorkspace();
|
||||
System.out.println("Usage:" +ws.getDiskUsage());
|
||||
Workspace ws2 = getWorkspace();
|
||||
System.out.println("TotalItems:" +ws2.getTotalItems());
|
||||
Workspace ws3 = getWorkspace();
|
||||
retrieveFirstLevel(ws3);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// } catch (WorkspaceFolderNotFoundException e) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e.printStackTrace();
|
||||
// } catch (InternalErrorException e) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e.printStackTrace();
|
||||
// } catch (HomeNotFoundException e) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e.printStackTrace();
|
||||
// } catch (UserNotFoundException e) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
}
|
||||
|
||||
public static Workspace getWorkspace() throws InternalErrorException, HomeNotFoundException, WorkspaceFolderNotFoundException
|
||||
{
|
||||
|
||||
logger.trace("Get Workspace scope: "+DEFAULT_SCOPE + " username: "+TEST_USER);
|
||||
ScopeProvider.instance.set(DEFAULT_SCOPE);
|
||||
logger.trace("Scope provider instancied");
|
||||
|
||||
Workspace workspace = HomeLibrary.getUserWorkspace(TEST_USER);
|
||||
|
||||
return workspace;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue