ref 13226:StorageHub - Update workspace-sharing-widget to SH
https://support.d4science.org/issues/13226 Updated to StorageHub git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@177228 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
98c05754c3
commit
9abf40926d
|
@ -9,8 +9,8 @@ import java.util.List;
|
||||||
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||||
* @Jan 23, 2014
|
* Jan 23, 2014
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class FileModelUtils {
|
public class FileModelUtils {
|
||||||
|
|
|
@ -4,14 +4,14 @@
|
||||||
package org.gcube.portlets.user.workspace.client.util;
|
package org.gcube.portlets.user.workspace.client.util;
|
||||||
|
|
||||||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||||
import org.gcube.portlets.user.workspace.shared.WorkspaceACL;
|
import org.gcube.portlets.widgets.workspacesharingwidget.shared.WorkspaceACL;
|
||||||
import org.gcube.portlets.user.workspace.shared.WorkspaceACL.USER_TYPE;
|
import org.gcube.portlets.widgets.workspacesharingwidget.shared.WorkspaceACL.USER_TYPE;
|
||||||
|
|
||||||
import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||||
* @Feb 17, 2014
|
* Feb 17, 2014
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GetPermissionIconByACL {
|
public class GetPermissionIconByACL {
|
||||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.portlets.user.workspace.client.util;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||||
* @May 8, 2014
|
* May 8, 2014
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GroupNameUtilSeparator {
|
public class GroupNameUtilSeparator {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import com.google.gwt.user.client.ui.Image;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||||
* Jan 9, 2017
|
* Jan 9, 2017
|
||||||
*/
|
*/
|
||||||
public class MaskPanel extends FlowPanel{
|
public class MaskPanel extends FlowPanel{
|
||||||
|
|
|
@ -20,8 +20,8 @@ import com.google.gwt.http.client.Response;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||||
* @Jun 24, 2013
|
* Jun 24, 2013
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RequestBuilderWorkspaceValidateItem {
|
public class RequestBuilderWorkspaceValidateItem {
|
||||||
|
|
|
@ -6,8 +6,8 @@ package org.gcube.portlets.user.workspace.client.util;
|
||||||
import org.gcube.portlets.user.workspace.client.view.windows.NewBrowserWindow;
|
import org.gcube.portlets.user.workspace.client.view.windows.NewBrowserWindow;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||||
* @Jun 25, 2013
|
* Jun 25, 2013
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class WindowOpenParameter {
|
public class WindowOpenParameter {
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.gcube.portlets.user.workspace.shared.HandlerResultMessage;
|
||||||
/**
|
/**
|
||||||
* The Class DownloadPublicLinkServlet.
|
* The Class DownloadPublicLinkServlet.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||||
* May 16, 2017
|
* May 16, 2017
|
||||||
*/
|
*/
|
||||||
public class DownloadPublicLinkServlet extends HttpServlet{
|
public class DownloadPublicLinkServlet extends HttpServlet{
|
||||||
|
|
|
@ -39,7 +39,7 @@ import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||||
/**
|
/**
|
||||||
* The Class DownloadServlet.
|
* The Class DownloadServlet.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapaATisti.cnr.it)
|
||||||
* Oct 18, 2018
|
* Oct 18, 2018
|
||||||
*/
|
*/
|
||||||
public class DownloadServlet extends HttpServlet{
|
public class DownloadServlet extends HttpServlet{
|
||||||
|
|
|
@ -7,7 +7,7 @@ package org.gcube.portlets.user.workspace.server;
|
||||||
/**
|
/**
|
||||||
* The Class FileNotVersionedException.
|
* The Class FileNotVersionedException.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||||
* Feb 20, 2017
|
* Feb 20, 2017
|
||||||
*/
|
*/
|
||||||
public class FileNotVersionedException extends Exception {
|
public class FileNotVersionedException extends Exception {
|
||||||
|
|
|
@ -27,7 +27,6 @@ import org.gcube.common.homelibrary.home.workspace.WorkspaceFolder;
|
||||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
||||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceSharedFolder;
|
import org.gcube.common.homelibrary.home.workspace.WorkspaceSharedFolder;
|
||||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceSmartFolder;
|
import org.gcube.common.homelibrary.home.workspace.WorkspaceSmartFolder;
|
||||||
import org.gcube.common.homelibrary.home.workspace.accessmanager.ACLType;
|
|
||||||
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntry;
|
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntry;
|
||||||
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryAdd;
|
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryAdd;
|
||||||
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryCreate;
|
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryCreate;
|
||||||
|
@ -55,6 +54,7 @@ import org.gcube.common.homelibrary.home.workspace.trash.WorkspaceTrashFolder;
|
||||||
import org.gcube.common.homelibrary.home.workspace.trash.WorkspaceTrashItem;
|
import org.gcube.common.homelibrary.home.workspace.trash.WorkspaceTrashItem;
|
||||||
import org.gcube.common.homelibrary.home.workspace.usermanager.GCubeGroup;
|
import org.gcube.common.homelibrary.home.workspace.usermanager.GCubeGroup;
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
import org.gcube.common.scope.api.ScopeProvider;
|
||||||
|
import org.gcube.common.storagehubwrapper.shared.ACLType;
|
||||||
import org.gcube.portal.wssynclibrary.shared.ItemNotSynched;
|
import org.gcube.portal.wssynclibrary.shared.ItemNotSynched;
|
||||||
import org.gcube.portal.wssynclibrary.shared.thredds.Sync_Status;
|
import org.gcube.portal.wssynclibrary.shared.thredds.Sync_Status;
|
||||||
import org.gcube.portal.wssynclibrary.thredds.WorkspaceThreddsSynchronize;
|
import org.gcube.portal.wssynclibrary.thredds.WorkspaceThreddsSynchronize;
|
||||||
|
@ -67,7 +67,6 @@ import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||||
import org.gcube.portlets.user.workspace.client.model.FileTrashedModel;
|
import org.gcube.portlets.user.workspace.client.model.FileTrashedModel;
|
||||||
import org.gcube.portlets.user.workspace.client.model.FolderGridModel;
|
import org.gcube.portlets.user.workspace.client.model.FolderGridModel;
|
||||||
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.InfoContactModel;
|
|
||||||
import org.gcube.portlets.user.workspace.client.model.MessageModel;
|
import org.gcube.portlets.user.workspace.client.model.MessageModel;
|
||||||
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.model.SmartFolderModel;
|
import org.gcube.portlets.user.workspace.client.model.SmartFolderModel;
|
||||||
|
@ -82,10 +81,9 @@ import org.gcube.portlets.user.workspace.client.workspace.folder.item.gcube.GWTD
|
||||||
import org.gcube.portlets.user.workspace.client.workspace.folder.item.gcube.GWTImageDocument;
|
import org.gcube.portlets.user.workspace.client.workspace.folder.item.gcube.GWTImageDocument;
|
||||||
import org.gcube.portlets.user.workspace.client.workspace.folder.item.gcube.GWTUrlDocument;
|
import org.gcube.portlets.user.workspace.client.workspace.folder.item.gcube.GWTUrlDocument;
|
||||||
import org.gcube.portlets.user.workspace.server.util.UserUtil;
|
import org.gcube.portlets.user.workspace.server.util.UserUtil;
|
||||||
import org.gcube.portlets.user.workspace.shared.WorkspaceACL;
|
|
||||||
import org.gcube.portlets.user.workspace.shared.WorkspaceACL.USER_TYPE;
|
|
||||||
import org.gcube.portlets.user.workspace.shared.accounting.GxtAccountingEntryType;
|
import org.gcube.portlets.user.workspace.shared.accounting.GxtAccountingEntryType;
|
||||||
import org.gcube.portlets.user.workspace.shared.accounting.GxtAccountingField;
|
import org.gcube.portlets.user.workspace.shared.accounting.GxtAccountingField;
|
||||||
|
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||||
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||||
|
|
||||||
import com.thoughtworks.xstream.XStream;
|
import com.thoughtworks.xstream.XStream;
|
||||||
|
@ -95,7 +93,7 @@ import com.thoughtworks.xstream.XStream;
|
||||||
/**
|
/**
|
||||||
* The Class GWTWorkspaceBuilder.
|
* The Class GWTWorkspaceBuilder.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||||
* Nov 30, 2016
|
* Nov 30, 2016
|
||||||
*/
|
*/
|
||||||
public class GWTWorkspaceBuilder {
|
public class GWTWorkspaceBuilder {
|
||||||
|
@ -1975,47 +1973,7 @@ public class GWTWorkspaceBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the workspace acl from ac ls.
|
|
||||||
*
|
|
||||||
* @param types the types
|
|
||||||
* @return the workspace acl from ac ls
|
|
||||||
* @throws Exception the exception
|
|
||||||
*/
|
|
||||||
public List<WorkspaceACL> getWorkspaceACLFromACLs(List<ACLType> types) throws Exception{
|
|
||||||
|
|
||||||
List<WorkspaceACL> acls = new ArrayList<WorkspaceACL>();
|
|
||||||
|
|
||||||
for (ACLType acl : types) {
|
|
||||||
|
|
||||||
switch (acl) {
|
|
||||||
case ADMINISTRATOR:
|
|
||||||
acls.add(new WorkspaceACL(acl.toString(), "Admin", false, USER_TYPE.ADMINISTRATOR, ""));
|
|
||||||
break;
|
|
||||||
case READ_ONLY:
|
|
||||||
acls.add(new WorkspaceACL(acl.toString(), "Read Only", false, USER_TYPE.OTHER, "Users can read any file but cannot update/delete"));
|
|
||||||
break;
|
|
||||||
case WRITE_OWNER:
|
|
||||||
acls.add(new WorkspaceACL(acl.toString(), "Write Own", true, USER_TYPE.OTHER, "Users can update/delete only their files"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WRITE_ALL:
|
|
||||||
acls.add(new WorkspaceACL(acl.toString(), "Write Any", false, USER_TYPE.OTHER,"Any user can update/delete any file"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// acls.add(new WorkspaceACL(acl.toString(), acl.toString(), false, USER_TYPE.OTHER, ""));
|
|
||||||
// break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(acls.size()==0)
|
|
||||||
throw new Exception("No ACLs rules found!");
|
|
||||||
|
|
||||||
logger.trace("returning acls: "+acls);
|
|
||||||
|
|
||||||
return acls;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the gxt list trash content.
|
* Builds the gxt list trash content.
|
||||||
|
|
|
@ -35,7 +35,7 @@ import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||||
/**
|
/**
|
||||||
* The Class ImageServlet.
|
* The Class ImageServlet.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapaATisti.cnr.it)
|
||||||
* Oct 18, 2018
|
* Oct 18, 2018
|
||||||
*/
|
*/
|
||||||
public class ImageServlet extends HttpServlet{
|
public class ImageServlet extends HttpServlet{
|
||||||
|
|
Loading…
Reference in New Issue