enhancements.
fixed label setting permissions catched insufficient privileges exception in case of rename git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@91513 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2a6262429a
commit
eb1f9418a0
|
@ -355,7 +355,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
|
|||
|
||||
|
||||
Info.display("Info", "An operation of sharing was submitted");
|
||||
explorerPanel.mask("Submitting operation");
|
||||
explorerPanel.mask("Setting permissions");
|
||||
|
||||
rpcWorkspaceService.shareFolder(fileModel, finalDialog.getSharedListUsers(), isNewFolder, finalDialog.getSelectedACL(), new AsyncCallback<Boolean>() {
|
||||
|
||||
|
|
|
@ -289,5 +289,14 @@ public interface Icons extends ClientBundle {
|
|||
|
||||
@Source("icons/trash.png")
|
||||
ImageResource trash();
|
||||
|
||||
@Source("icons/readonly.png")
|
||||
ImageResource readonly();
|
||||
|
||||
@Source("icons/writeown.png")
|
||||
ImageResource writeown();
|
||||
|
||||
@Source("icons/writeall.png")
|
||||
ImageResource writeall();
|
||||
}
|
||||
|
||||
|
|
|
@ -452,6 +452,18 @@ public class Resources {
|
|||
return AbstractImagePrototype.create(ICONS.unShareUser());
|
||||
}
|
||||
|
||||
public static AbstractImagePrototype getIconWriteOwn() {
|
||||
return AbstractImagePrototype.create(ICONS.writeown());
|
||||
}
|
||||
|
||||
public static AbstractImagePrototype getIconWriteAll() {
|
||||
return AbstractImagePrototype.create(ICONS.writeall());
|
||||
}
|
||||
|
||||
public static AbstractImagePrototype getIconReadOnly() {
|
||||
return AbstractImagePrototype.create(ICONS.readonly());
|
||||
}
|
||||
|
||||
//ImageResources
|
||||
public static ImageResource getImagePathSeparator(){
|
||||
return ICONS.separatorPath();
|
||||
|
@ -487,6 +499,8 @@ public class Resources {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
public static AbstractImagePrototype getIconByExtension(String fileExtension) {
|
||||
|
||||
if (MPEG.equals(fileExtension) || SWF.equals(fileExtension) || FLV.equals(fileExtension) || AVI.equals(fileExtension)) {
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
|
@ -937,6 +937,8 @@ public class GWTWorkspaceBuilder {
|
|||
fileModel.setType(GXTFolderItemTypeEnum.FOLDER.toString());
|
||||
fileModel.setShareable(true);
|
||||
fileModel.setDescription(item.getDescription());
|
||||
|
||||
// WorkspaceFolder folder = (WorkspaceFolder)
|
||||
break;
|
||||
|
||||
case FOLDER_ITEM:
|
||||
|
|
|
@ -772,6 +772,10 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
|
||||
return true;
|
||||
|
||||
} catch (InsufficientPrivilegesException e) {
|
||||
String error = "An error occurred on renaming item, " +e.getMessage();
|
||||
workspaceLogger.error(error, e);
|
||||
throw new Exception(error);
|
||||
} catch (ItemAlreadyExistException e) {
|
||||
String error = "An error occurred on renaming item, " +e.getMessage();
|
||||
workspaceLogger.error(error, e);
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.gcube.common.scope.impl.ScopeBean;
|
|||
* @Dec 17, 2013
|
||||
*
|
||||
*/
|
||||
public class DonwloadFilesTester {
|
||||
public class DephtVisitDonwloadFilesTester {
|
||||
|
||||
|
||||
protected static Logger logger = Logger.getLogger(SearchTextTest.class);
|
|
@ -0,0 +1,82 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.workspace;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||
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.WorkspaceItemType;
|
||||
import org.gcube.common.homelibrary.home.workspace.folder.FolderItem;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.common.scope.impl.ScopeBean;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jan 29, 2014
|
||||
*
|
||||
*/
|
||||
public class ItemRetrieving {
|
||||
|
||||
|
||||
public static String DEFAULT_SCOPE = "/gcube/devsec"; //DEV
|
||||
public static String TEST_USER = "francesco.mangiacrapa";
|
||||
public static String ITEMID = "a65d0c7a-5ef3-4e61-b12f-715146368b6b";
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
try {
|
||||
|
||||
ScopeBean scope = new ScopeBean(DEFAULT_SCOPE);
|
||||
ScopeProvider.instance.set(scope.toString());
|
||||
|
||||
System.out.println("init HL");
|
||||
Workspace ws = HomeLibrary
|
||||
.getHomeManagerFactory()
|
||||
.getHomeManager()
|
||||
.getHome(TEST_USER)
|
||||
.getWorkspace();
|
||||
//
|
||||
|
||||
System.out.println("start get root");
|
||||
WorkspaceItem root = ws.getItem(ITEMID);
|
||||
|
||||
|
||||
System.out.println("start get children");
|
||||
List<? extends WorkspaceItem> children = root.getChildren();
|
||||
|
||||
System.out.println("children size: "+children.size());
|
||||
|
||||
int i=0;
|
||||
for (WorkspaceItem workspaceItem : children) {
|
||||
|
||||
|
||||
if(workspaceItem.getType().equals(WorkspaceItemType.FOLDER) || workspaceItem.getType().equals(WorkspaceItemType.SHARED_FOLDER)){
|
||||
|
||||
WorkspaceFolder folder = (WorkspaceFolder) workspaceItem;
|
||||
|
||||
|
||||
System.out.println(++i+") folder name: "+folder.getName() + " owner "+folder.getOwner().getPortalLogin());
|
||||
}else{
|
||||
|
||||
|
||||
if(workspaceItem.getType().equals(WorkspaceItemType.FOLDER_ITEM)){
|
||||
|
||||
FolderItem folderItem = (FolderItem) workspaceItem;
|
||||
|
||||
System.out.println(++i+") folderItem id: "+folderItem.getId() +", name: "+folderItem.getName() + ", own: "+folderItem.getOwner().getPortalLogin());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
System.out.println("end");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue