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@177230 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9abf40926d
commit
53b6d61b8c
|
@ -13,7 +13,6 @@
|
|||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src/main/resources"/>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER/gwt-2.7.0"/>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-25-0"
|
||||
date="2019-02-04">
|
||||
<Change>Updated to StorageHub [ticket: #13226]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-24-1"
|
||||
date="${buildDate}">
|
||||
<Change>Updated regular expression to validate Folder and File names
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -20,7 +20,7 @@ import com.extjs.gxt.ui.client.widget.form.RadioGroup;
|
|||
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*
|
||||
*/
|
||||
public class ExplorerPanel extends LayoutContainer {
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.gcube.portlets.user.workspace.client.view.sharing;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
||||
|
|
|
@ -5,13 +5,14 @@ import java.util.List;
|
|||
import org.gcube.portlets.user.workspace.client.AppControllerExplorer;
|
||||
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||
import org.gcube.portlets.user.workspace.client.view.sharing.multisuggest.MultiDragContact;
|
||||
import org.gcube.portlets.user.workspace.client.view.sharing.multisuggest.MultiValuePanel;
|
||||
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxAlert;
|
||||
import org.gcube.portlets.user.workspace.shared.ListContact;
|
||||
import org.gcube.portlets.user.workspace.shared.WorkspaceACL;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.rpc.WorkspaceSharingServiceAsync;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.WorkspaceACL;
|
||||
|
||||
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
||||
import com.extjs.gxt.ui.client.Style.Scroll;
|
||||
|
@ -39,7 +40,7 @@ import com.google.gwt.user.client.ui.Label;
|
|||
/**
|
||||
* The Class DialogShareFolder.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jul 10, 2017
|
||||
*/
|
||||
public class DialogShareFolder extends Dialog {
|
||||
|
@ -122,7 +123,7 @@ public class DialogShareFolder extends Dialog {
|
|||
Label labelProperty = new Label("Permissions");
|
||||
hpPermission.add(labelProperty);
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.getACLs(new AsyncCallback<List<WorkspaceACL>>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getACLs(new AsyncCallback<List<WorkspaceACL>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<WorkspaceACL> result) {
|
||||
|
@ -373,7 +374,7 @@ public class DialogShareFolder extends Dialog {
|
|||
Label labelProperty = new Label("Permissions");
|
||||
hpPermission.add(labelProperty);
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.getACLs(new AsyncCallback<List<WorkspaceACL>>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getACLs(new AsyncCallback<List<WorkspaceACL>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<WorkspaceACL> result) {
|
||||
|
@ -599,7 +600,7 @@ public class DialogShareFolder extends Dialog {
|
|||
*/
|
||||
private void selectAclForFolder(FileModel folder){
|
||||
GWT.log("Loading ACL to: "+folder);
|
||||
AppControllerExplorer.rpcWorkspaceService.getACLBySharedFolderId(folder.getIdentifier(), new AsyncCallback<WorkspaceACL>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getACLsForSharedFolderId(folder.getIdentifier(), new AsyncCallback<WorkspaceACL>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable arg0) {
|
||||
|
@ -627,7 +628,7 @@ public class DialogShareFolder extends Dialog {
|
|||
*/
|
||||
public void getUsersManagers(final String sharedFolderId,final AsyncCallback<List<InfoContactModel>> callback) {
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.getUsersManagerToSharedFolder(sharedFolderId, new AsyncCallback<List<InfoContactModel>>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getAdministratorsByFolderId(sharedFolderId, new AsyncCallback<List<InfoContactModel>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable arg0) {
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.portlets.user.workspace.client.view.sharing;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.workspace.shared.WorkspaceACL;
|
||||
import org.gcube.portlets.user.workspace.shared.WorkspaceACL.USER_TYPE;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.WorkspaceACL;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.WorkspaceACL.USER_TYPE;
|
||||
|
||||
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
||||
import com.extjs.gxt.ui.client.widget.form.Radio;
|
||||
|
|
|
@ -4,8 +4,9 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.workspace.client.util.GetPermissionIconByACL;
|
||||
import org.gcube.portlets.user.workspace.shared.WorkspaceACL;
|
||||
import org.gcube.portlets.user.workspace.shared.WorkspaceACL.USER_TYPE;
|
||||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.WorkspaceACL;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.WorkspaceACL.USER_TYPE;
|
||||
|
||||
import com.extjs.gxt.ui.client.Style.ButtonScale;
|
||||
import com.extjs.gxt.ui.client.Style.IconAlign;
|
||||
|
|
|
@ -3,10 +3,10 @@ package org.gcube.portlets.user.workspace.client.view.sharing;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.workspace.client.AppControllerExplorer;
|
||||
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxAlert;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.rpc.WorkspaceSharingServiceAsync;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
@ -14,7 +14,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
|||
/**
|
||||
* The Class UserStore.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*/
|
||||
public class UserStore implements ContactFetcher{
|
||||
|
||||
|
@ -58,7 +58,7 @@ public class UserStore implements ContactFetcher{
|
|||
|
||||
listAllContact = new ArrayList<InfoContactModel>();
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.getAllContacts(new AsyncCallback<List<InfoContactModel>>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getAllContacts(new AsyncCallback<List<InfoContactModel>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<InfoContactModel> result) {
|
||||
|
@ -88,7 +88,7 @@ public class UserStore implements ContactFetcher{
|
|||
|
||||
// comboSharedUsers.mask("Loading users");
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.getListUserSharedByFolderSharedId(sharedFolderId, new AsyncCallback<List<InfoContactModel>>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getListUserSharedByFolderSharedId(sharedFolderId, new AsyncCallback<List<InfoContactModel>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -128,7 +128,7 @@ public class UserStore implements ContactFetcher{
|
|||
@Override
|
||||
public void getOwner(final String sharedFolderId,final AsyncCallback<InfoContactModel> callback) {
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.getOwnerByItemId(sharedFolderId, new AsyncCallback<InfoContactModel>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getOwnerByItemId(sharedFolderId, new AsyncCallback<InfoContactModel>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
|
|
@ -5,9 +5,9 @@ import java.util.List;
|
|||
|
||||
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
|
||||
import org.gcube.portlets.user.workspace.client.model.ExtendedInfoContactModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxConfirm;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
||||
import com.extjs.gxt.ui.client.Style.Orientation;
|
||||
|
@ -51,7 +51,7 @@ import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
|||
/**
|
||||
* The Class MultiDragContact.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 1, 2016
|
||||
*/
|
||||
public class MultiDragContact extends Dialog {
|
||||
|
|
|
@ -4,9 +4,10 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
|
||||
import org.gcube.portlets.user.workspace.client.util.MaskPanel;
|
||||
import org.gcube.portlets.user.workspace.client.view.sharing.ContactFetcher;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
|
|
|
@ -5,12 +5,13 @@ import java.util.List;
|
|||
import org.gcube.portlets.user.workspace.client.AppControllerExplorer;
|
||||
import org.gcube.portlets.user.workspace.client.event.UpdatedVREPermissionEvent;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||
import org.gcube.portlets.user.workspace.client.view.sharing.PanelTogglePermission;
|
||||
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.shared.WorkspaceACL;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.WorkspaceACL;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.rpc.WorkspaceSharingServiceAsync;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
||||
import com.extjs.gxt.ui.client.Style.Scroll;
|
||||
|
@ -25,7 +26,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
|||
import com.google.gwt.user.client.ui.Label;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*
|
||||
*/
|
||||
public class DialogPermission extends Dialog {
|
||||
|
@ -92,7 +93,7 @@ public class DialogPermission extends Dialog {
|
|||
getUsersManagers(folder.getIdentifier(), callback);
|
||||
|
||||
//TODO GET ACL FOR USER
|
||||
AppControllerExplorer.rpcWorkspaceService.getACLs(new AsyncCallback<List<WorkspaceACL>>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getACLs(new AsyncCallback<List<WorkspaceACL>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<WorkspaceACL> result) {
|
||||
|
@ -141,7 +142,7 @@ public class DialogPermission extends Dialog {
|
|||
INSTANCE.mask("Changing permissions");
|
||||
if(folder!=null && getSelectedACL().getId()!=null){
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.updateACLForVREbyGroupName(folder.getIdentifier(), getSelectedACL().getId(), new AsyncCallback<Void>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.updateACLForVREbyGroupName(folder.getIdentifier(), getSelectedACL().getId(), new AsyncCallback<Void>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -197,7 +198,7 @@ public class DialogPermission extends Dialog {
|
|||
|
||||
public void getUsersManagers(final String sharedFolderId,final AsyncCallback<List<InfoContactModel>> callback) {
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.getUsersManagerToSharedFolder(sharedFolderId, new AsyncCallback<List<InfoContactModel>>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getAdministratorsByFolderId(sharedFolderId, new AsyncCallback<List<InfoContactModel>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable arg0) {
|
||||
|
|
|
@ -20,7 +20,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
|||
/**
|
||||
* The Class SmartFolderPanel.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* @author Massimiliano Assante ISTI-CNR
|
||||
* @version 1.0 May 14th 2012
|
||||
*/
|
||||
|
|
|
@ -56,7 +56,7 @@ import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
|||
/**
|
||||
* The Class AsyncTreePanel.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Sep 15, 2016
|
||||
*/
|
||||
public class AsyncTreePanel extends LayoutContainer {
|
||||
|
@ -78,7 +78,7 @@ public class AsyncTreePanel extends LayoutContainer {
|
|||
/**
|
||||
* The Enum DragType.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Aug 29, 2016
|
||||
*/
|
||||
private enum DragType {INSERT, APPEND};
|
||||
|
|
|
@ -60,7 +60,7 @@ import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
|||
/**
|
||||
* The Class ContextMenuTree.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*/
|
||||
public class ContextMenuTree {
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.extjs.gxt.ui.client.widget.ProgressBar;
|
|||
//import com.google.gwt.user.client.Timer;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*
|
||||
*/
|
||||
public class BulkProgressBar extends ProgressBar {
|
||||
|
|
|
@ -19,7 +19,7 @@ import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
|||
/**
|
||||
* The Class DialogAddFolderAndSmart.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jul 10, 2017
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it Jul 10, 2017
|
||||
*/
|
||||
public class DialogAddFolderAndSmart extends Dialog {
|
||||
|
||||
|
@ -34,7 +34,7 @@ public class DialogAddFolderAndSmart extends Dialog {
|
|||
/**
|
||||
* The Enum AddType.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jul 10,
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it Jul 10,
|
||||
* 2017
|
||||
*/
|
||||
public enum AddType {
|
||||
|
|
|
@ -21,7 +21,7 @@ import com.google.gwt.user.client.ui.Label;
|
|||
/**
|
||||
* The Class DialogAddUrl.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Nov 29, 2016
|
||||
*/
|
||||
public class DialogAddUrl extends Dialog {
|
||||
|
|
|
@ -23,7 +23,7 @@ import com.google.gwt.user.client.ui.Widget;
|
|||
/**
|
||||
* The Class DialogConfirm.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Feb 19, 2015
|
||||
*/
|
||||
public class DialogConfirm extends DialogBox implements ClickHandler {
|
||||
|
|
|
@ -26,7 +26,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
|||
/**
|
||||
* The Class DialogEditProperties.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 11, 2015
|
||||
*/
|
||||
public class DialogEditProperties extends Dialog{
|
||||
|
|
|
@ -7,8 +7,9 @@ import org.gcube.portlets.user.workspace.client.AppControllerExplorer;
|
|||
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
|
||||
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.InfoContactModel;
|
||||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.rpc.WorkspaceSharingServiceAsync;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
||||
import com.extjs.gxt.ui.client.Style.Scroll;
|
||||
|
@ -31,7 +32,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
|||
import com.google.gwt.user.client.ui.Image;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*
|
||||
*/
|
||||
public class DialogGetInfo extends Dialog {
|
||||
|
@ -55,95 +56,95 @@ public class DialogGetInfo extends Dialog {
|
|||
private TextField<String> txtIsPublic = new TextField<String>();
|
||||
private TextField<String> txtThreddsSynched = new TextField<String>();
|
||||
private TextField<String> txtShared = new TextField<String>();
|
||||
// private TextArea textAreaSharedWith = new TextArea();
|
||||
// private TextArea textAreaSharedWith = new TextArea();
|
||||
private Html htmlUsersWidget = new Html();
|
||||
private Html htmlPropertiesWidget = new Html();
|
||||
private final NumberFormat number = ConstantsExplorer.numberFormatterKB;
|
||||
// private TextField<String> txtGcubeItemProperties;
|
||||
// private TextField<String> txtGcubeItemProperties;
|
||||
private HorizontalPanel hpGcubeProperties;
|
||||
private DialogEditProperties editProperties = null;
|
||||
|
||||
public DialogGetInfo(final FileModel fileModel) {
|
||||
|
||||
FormLayout layout = new FormLayout();
|
||||
layout.setLabelWidth(90);
|
||||
layout.setDefaultWidth(300);
|
||||
setLayout(layout);
|
||||
FormLayout layout = new FormLayout();
|
||||
layout.setLabelWidth(90);
|
||||
layout.setDefaultWidth(300);
|
||||
setLayout(layout);
|
||||
|
||||
setIcon(fileModel.getAbstractPrototypeIcon());
|
||||
setHeading(fileModel.getName() + " Properties");
|
||||
setIcon(fileModel.getAbstractPrototypeIcon());
|
||||
setHeading(fileModel.getName() + " Properties");
|
||||
|
||||
setButtonAlign(HorizontalAlignment.RIGHT);
|
||||
setModal(true);
|
||||
// setBodyBorder(true);
|
||||
setBodyStyle("padding: 9px; background: none");
|
||||
setWidth(widthDialog);
|
||||
setResizable(false);
|
||||
setButtons(Dialog.OK);
|
||||
setButtonAlign(HorizontalAlignment.RIGHT);
|
||||
setModal(true);
|
||||
// setBodyBorder(true);
|
||||
setBodyStyle("padding: 9px; background: none");
|
||||
setWidth(widthDialog);
|
||||
setResizable(false);
|
||||
setButtons(Dialog.OK);
|
||||
|
||||
txtName = new TextField<String>();
|
||||
txtName.setFieldLabel("Name");
|
||||
txtName.setReadOnly(true);
|
||||
textFieldSetValue(txtName,fileModel.getName());
|
||||
add(txtName);
|
||||
txtName = new TextField<String>();
|
||||
txtName.setFieldLabel("Name");
|
||||
txtName.setReadOnly(true);
|
||||
textFieldSetValue(txtName, fileModel.getName());
|
||||
add(txtName);
|
||||
|
||||
txtLocation = new TextField<String>();
|
||||
txtLocation.setFieldLabel("Location");
|
||||
txtLocation.setReadOnly(true);
|
||||
txtLocation = new TextField<String>();
|
||||
txtLocation.setFieldLabel("Location");
|
||||
txtLocation.setReadOnly(true);
|
||||
|
||||
if(fileModel.isRoot())
|
||||
txtLocation.setValue("/");
|
||||
else
|
||||
loadLocation(fileModel.getIdentifier());
|
||||
if (fileModel.isRoot())
|
||||
txtLocation.setValue("/");
|
||||
else
|
||||
loadLocation(fileModel.getIdentifier());
|
||||
|
||||
add(txtLocation);
|
||||
add(txtLocation);
|
||||
|
||||
if(fileModel.isDirectory()){
|
||||
txtIsPublic = new TextField<String>();
|
||||
txtIsPublic.setFieldLabel("Public Folder");
|
||||
txtIsPublic.setReadOnly(true);
|
||||
txtIsPublic.setValue(fileModel.isPublic()+"");
|
||||
add(txtIsPublic);
|
||||
if (fileModel.isDirectory()) {
|
||||
txtIsPublic = new TextField<String>();
|
||||
txtIsPublic.setFieldLabel("Public Folder");
|
||||
txtIsPublic.setReadOnly(true);
|
||||
txtIsPublic.setValue(fileModel.isPublic() + "");
|
||||
add(txtIsPublic);
|
||||
|
||||
if(fileModel.getSynchedThreddsStatus()!=null){
|
||||
txtThreddsSynched = new TextField<String>();
|
||||
txtThreddsSynched.setFieldLabel("Thredds Sync");
|
||||
txtThreddsSynched.setReadOnly(true);
|
||||
txtThreddsSynched.setValue(fileModel.getSynchedThreddsStatus()+"");
|
||||
add(txtThreddsSynched);
|
||||
if (fileModel.getSynchedThreddsStatus() != null) {
|
||||
txtThreddsSynched = new TextField<String>();
|
||||
txtThreddsSynched.setFieldLabel("Thredds Sync");
|
||||
txtThreddsSynched.setReadOnly(true);
|
||||
txtThreddsSynched.setValue(fileModel.getSynchedThreddsStatus() + "");
|
||||
add(txtThreddsSynched);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
txtAreaDescription.setFieldLabel("Description");
|
||||
txtAreaDescription.setHeight(30);
|
||||
txtAreaDescription.setReadOnly(true);
|
||||
add(txtAreaDescription);
|
||||
|
||||
txtAreaDescription.setFieldLabel("Description");
|
||||
txtAreaDescription.setHeight(30);
|
||||
txtAreaDescription.setReadOnly(true);
|
||||
add(txtAreaDescription);
|
||||
|
||||
//GCUBE PROPERTIES
|
||||
// GCUBE PROPERTIES
|
||||
hpGcubeProperties = new HorizontalPanel();
|
||||
hpGcubeProperties.setStyleAttribute("padding-top", "6px");
|
||||
hpGcubeProperties.setStyleAttribute("margin-bottom", "6px");
|
||||
Label labelProperties = new Label("Properties");
|
||||
labelProperties.setTitle("Gcube Properties");
|
||||
labelProperties.setStyleAttribute("padding-right", "47px");
|
||||
hpGcubeProperties.add(labelProperties);
|
||||
loadGcubeItemProperties(fileModel.getIdentifier());
|
||||
htmlPropertiesWidget.setHeight(heightTextArea);
|
||||
htmlPropertiesWidget.setWidth("275px");
|
||||
hpGcubeProperties.setStyleAttribute("padding-top", "6px");
|
||||
hpGcubeProperties.setStyleAttribute("margin-bottom", "6px");
|
||||
Label labelProperties = new Label("Properties");
|
||||
labelProperties.setTitle("Gcube Properties");
|
||||
labelProperties.setStyleAttribute("padding-right", "47px");
|
||||
hpGcubeProperties.add(labelProperties);
|
||||
loadGcubeItemProperties(fileModel.getIdentifier());
|
||||
htmlPropertiesWidget.setHeight(heightTextArea);
|
||||
htmlPropertiesWidget.setWidth("275px");
|
||||
|
||||
LayoutContainer lc = new LayoutContainer();
|
||||
lc.addStyleName("editPermissions");
|
||||
LayoutContainer lc = new LayoutContainer();
|
||||
lc.addStyleName("editPermissions");
|
||||
|
||||
Image imgProperties = Resources.getIconEdit().createImage(); //EDIT PROPERTIES
|
||||
imgProperties.setTitle("Edit Properties");
|
||||
lc.add(imgProperties);
|
||||
Image imgProperties = Resources.getIconEdit().createImage(); // EDIT
|
||||
// PROPERTIES
|
||||
imgProperties.setTitle("Edit Properties");
|
||||
lc.add(imgProperties);
|
||||
|
||||
hpGcubeProperties.add(lc);
|
||||
hpGcubeProperties.add(lc);
|
||||
|
||||
final Command cmdReloadProperties = new Command() {
|
||||
final Command cmdReloadProperties = new Command() {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
|
@ -151,112 +152,111 @@ public class DialogGetInfo extends Dialog {
|
|||
}
|
||||
};
|
||||
|
||||
imgProperties.addClickHandler(new ClickHandler() {
|
||||
imgProperties.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
if(editProperties==null)
|
||||
if (editProperties == null)
|
||||
editProperties = new DialogEditProperties(fileModel, cmdReloadProperties);
|
||||
|
||||
editProperties.show();
|
||||
|
||||
}
|
||||
});
|
||||
htmlPropertiesWidget.setStyleAttribute("margin-left", "5px");
|
||||
hpGcubeProperties.add(htmlPropertiesWidget);
|
||||
hpGcubeProperties.setScrollMode(Scroll.AUTOY);
|
||||
add(hpGcubeProperties);
|
||||
setVisibleGcubeProperties(false);
|
||||
htmlPropertiesWidget.setStyleAttribute("margin-left", "5px");
|
||||
hpGcubeProperties.add(htmlPropertiesWidget);
|
||||
hpGcubeProperties.setScrollMode(Scroll.AUTOY);
|
||||
add(hpGcubeProperties);
|
||||
setVisibleGcubeProperties(false);
|
||||
|
||||
if(fileModel.isDirectory()){
|
||||
txtAreaDescription.setValue(fileModel.getDescription());
|
||||
// add(txtAreaDescription);
|
||||
}else
|
||||
loadDescription(fileModel.getIdentifier());
|
||||
if (fileModel.isDirectory()) {
|
||||
txtAreaDescription.setValue(fileModel.getDescription());
|
||||
// add(txtAreaDescription);
|
||||
} else
|
||||
loadDescription(fileModel.getIdentifier());
|
||||
|
||||
txtType = new TextField<String>();
|
||||
txtType.setFieldLabel("Type");
|
||||
txtType.setReadOnly(true);
|
||||
textFieldSetValue(txtType,fileModel.getType());
|
||||
add(txtType);
|
||||
txtType = new TextField<String>();
|
||||
txtType.setFieldLabel("Type");
|
||||
txtType.setReadOnly(true);
|
||||
textFieldSetValue(txtType, fileModel.getType());
|
||||
add(txtType);
|
||||
|
||||
txtCategory = new TextField<String>();
|
||||
txtCategory.setFieldLabel("Category");
|
||||
txtCategory.setReadOnly(true);
|
||||
if(fileModel.getShortcutCategory()!=null)
|
||||
textFieldSetValue(txtCategory,fileModel.getShortcutCategory().getValue());
|
||||
add(txtCategory);
|
||||
txtCategory = new TextField<String>();
|
||||
txtCategory.setFieldLabel("Category");
|
||||
txtCategory.setReadOnly(true);
|
||||
if (fileModel.getShortcutCategory() != null)
|
||||
textFieldSetValue(txtCategory, fileModel.getShortcutCategory().getValue());
|
||||
add(txtCategory);
|
||||
|
||||
txtOwner = new TextField<String>();
|
||||
txtOwner.setFieldLabel("Owner");
|
||||
txtOwner.setReadOnly(true);
|
||||
loadOwner(fileModel.getIdentifier());
|
||||
add(txtOwner);
|
||||
txtOwner = new TextField<String>();
|
||||
txtOwner.setFieldLabel("Owner");
|
||||
txtOwner.setReadOnly(true);
|
||||
loadOwner(fileModel.getIdentifier());
|
||||
add(txtOwner);
|
||||
|
||||
txtCreated = new TextField<String>();
|
||||
txtCreated.setFieldLabel("Created");
|
||||
txtCreated.setReadOnly(true);
|
||||
txtCreated = new TextField<String>();
|
||||
txtCreated.setFieldLabel("Created");
|
||||
txtCreated.setReadOnly(true);
|
||||
|
||||
loadCreationDate(fileModel.getIdentifier());
|
||||
loadCreationDate(fileModel.getIdentifier());
|
||||
|
||||
add(txtCreated);
|
||||
add(txtCreated);
|
||||
|
||||
txtLastMofication = new TextField<String>();
|
||||
txtLastMofication.setFieldLabel("Last Mofication");
|
||||
txtLastMofication.setReadOnly(true);
|
||||
if(fileModel instanceof FileGridModel)
|
||||
textFieldSetValue(txtLastMofication, ((FileGridModel) fileModel).getLastModification().toString());
|
||||
else
|
||||
loadLastModificationDate(fileModel.getIdentifier());
|
||||
txtLastMofication = new TextField<String>();
|
||||
txtLastMofication.setFieldLabel("Last Mofication");
|
||||
txtLastMofication.setReadOnly(true);
|
||||
if (fileModel instanceof FileGridModel)
|
||||
textFieldSetValue(txtLastMofication, ((FileGridModel) fileModel).getLastModification().toString());
|
||||
else
|
||||
loadLastModificationDate(fileModel.getIdentifier());
|
||||
|
||||
add(txtLastMofication);
|
||||
add(txtLastMofication);
|
||||
|
||||
txtSize = new TextField<String>();
|
||||
txtSize.setFieldLabel("Size");
|
||||
txtSize.setReadOnly(true);
|
||||
txtSize = new TextField<String>();
|
||||
txtSize.setFieldLabel("Size");
|
||||
txtSize.setReadOnly(true);
|
||||
|
||||
if(fileModel instanceof FileGridModel)
|
||||
textFieldSetValue(txtSize,getFormattedSize(((FileGridModel) fileModel).getSize()));
|
||||
else
|
||||
loadSize(fileModel.getIdentifier());
|
||||
if (fileModel instanceof FileGridModel)
|
||||
textFieldSetValue(txtSize, getFormattedSize(((FileGridModel) fileModel).getSize()));
|
||||
else
|
||||
loadSize(fileModel.getIdentifier());
|
||||
|
||||
add(txtSize);
|
||||
add(txtSize);
|
||||
|
||||
//SHARED
|
||||
txtShared = new TextField<String>();
|
||||
txtShared.setFieldLabel("Shared");
|
||||
txtShared.setReadOnly(true);
|
||||
textFieldSetValue(txtShared,fileModel.isShared()+"");
|
||||
add(txtShared);
|
||||
// SHARED
|
||||
txtShared = new TextField<String>();
|
||||
txtShared.setFieldLabel("Shared");
|
||||
txtShared.setReadOnly(true);
|
||||
textFieldSetValue(txtShared, fileModel.isShared() + "");
|
||||
add(txtShared);
|
||||
|
||||
//USERS SHARED
|
||||
if(fileModel.isShared()){
|
||||
// USERS SHARED
|
||||
if (fileModel.isShared()) {
|
||||
|
||||
HorizontalPanel hp = new HorizontalPanel();
|
||||
hp.setStyleAttribute("padding-top", "6px");
|
||||
Label label = new Label("Shared with");
|
||||
label.setStyleAttribute("padding-right", "39px");
|
||||
hp.add(label);
|
||||
loadACLsDescriptionForSharedFolder(fileModel.getIdentifier());
|
||||
htmlUsersWidget.setHeight(heightTextArea);
|
||||
htmlUsersWidget.setWidth("297px");
|
||||
hp.add(htmlUsersWidget);
|
||||
hp.setScrollMode(Scroll.AUTOY);
|
||||
add(hp);
|
||||
}
|
||||
HorizontalPanel hp = new HorizontalPanel();
|
||||
hp.setStyleAttribute("padding-top", "6px");
|
||||
Label label = new Label("Shared with");
|
||||
label.setStyleAttribute("padding-right", "39px");
|
||||
hp.add(label);
|
||||
loadACLsDescriptionForSharedFolder(fileModel.getIdentifier());
|
||||
htmlUsersWidget.setHeight(heightTextArea);
|
||||
htmlUsersWidget.setWidth("297px");
|
||||
hp.add(htmlUsersWidget);
|
||||
hp.setScrollMode(Scroll.AUTOY);
|
||||
add(hp);
|
||||
}
|
||||
|
||||
|
||||
this.getButtonById(Dialog.OK).addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
this.getButtonById(Dialog.OK).addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
hide();
|
||||
}
|
||||
});
|
||||
this.show();
|
||||
this.show();
|
||||
}
|
||||
|
||||
private void setVisibleGcubeProperties(boolean bool){
|
||||
private void setVisibleGcubeProperties(boolean bool) {
|
||||
hpGcubeProperties.setVisible(bool);
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ public class DialogGetInfo extends Dialog {
|
|||
|
||||
@Override
|
||||
public void onSuccess(String result) {
|
||||
if(result!=null)
|
||||
if (result != null)
|
||||
txtAreaDescription.setValue(result);
|
||||
else
|
||||
txtAreaDescription.setValue("");
|
||||
|
@ -295,7 +295,7 @@ public class DialogGetInfo extends Dialog {
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
GWT.log("an error occured in loadLastModificationDateById "+itemId + " "+caught.getMessage());
|
||||
GWT.log("an error occured in loadLastModificationDateById " + itemId + " " + caught.getMessage());
|
||||
txtLastMofication.unmask();
|
||||
|
||||
}
|
||||
|
@ -303,7 +303,7 @@ public class DialogGetInfo extends Dialog {
|
|||
@Override
|
||||
public void onSuccess(Date result) {
|
||||
|
||||
if(result!=null)
|
||||
if (result != null)
|
||||
txtLastMofication.setValue(result.toString());
|
||||
else
|
||||
txtLastMofication.setValue(UNKNOWN);
|
||||
|
@ -314,37 +314,35 @@ public class DialogGetInfo extends Dialog {
|
|||
|
||||
}
|
||||
|
||||
private void textFieldSetValue(TextField<String> field, String value){
|
||||
private void textFieldSetValue(TextField<String> field, String value) {
|
||||
|
||||
if(value==null || value.isEmpty())
|
||||
if (value == null || value.isEmpty())
|
||||
field.setValue(UNKNOWN);
|
||||
else
|
||||
field.setValue(value);
|
||||
}
|
||||
|
||||
private void loadOwner(final String itemId){
|
||||
private void loadOwner(final String itemId) {
|
||||
|
||||
txtOwner.mask();
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.getOwnerByItemId(itemId, new AsyncCallback<InfoContactModel>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getOwnerByItemId(itemId, new AsyncCallback<InfoContactModel>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
GWT.log("an error occured in get Owner by Id "+itemId + " "+caught.getMessage());
|
||||
GWT.log("an error occured in get Owner by Id " + itemId + " " + caught.getMessage());
|
||||
txtOwner.unmask();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(InfoContactModel result) {
|
||||
textFieldSetValue(txtOwner,result.getName());
|
||||
txtOwner.unmask();
|
||||
textFieldSetValue(txtOwner, result.getName());
|
||||
txtOwner.unmask();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void loadGcubeItemProperties(final String itemId){
|
||||
private void loadGcubeItemProperties(final String itemId) {
|
||||
GWT.log("Load GcubeItemProperties");
|
||||
htmlPropertiesWidget.mask();
|
||||
AppControllerExplorer.rpcWorkspaceService.getHTMLGcubeItemProperties(itemId, new AsyncCallback<String>() {
|
||||
|
@ -352,135 +350,135 @@ public class DialogGetInfo extends Dialog {
|
|||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
htmlPropertiesWidget.unmask();
|
||||
GWT.log("an error occured in load properties by Id "+itemId + " "+caught.getMessage());
|
||||
GWT.log("an error occured in load properties by Id " + itemId + " " + caught.getMessage());
|
||||
setVisibleGcubeProperties(true);
|
||||
htmlPropertiesWidget.setHtml("Error on recovering properties");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String result) {
|
||||
// setVisibleGcubeProperties(true);
|
||||
// setVisibleGcubeProperties(true);
|
||||
htmlPropertiesWidget.unmask();
|
||||
if(result!=null){
|
||||
if (result != null) {
|
||||
setVisibleGcubeProperties(true);
|
||||
htmlPropertiesWidget.setHtml(result);
|
||||
}
|
||||
// else{
|
||||
// htmlPropertiesWidget.setHeight(20);
|
||||
// htmlPropertiesWidget.setHtml("None");
|
||||
// }
|
||||
// else{
|
||||
// htmlPropertiesWidget.setHeight(20);
|
||||
// htmlPropertiesWidget.setHtml("None");
|
||||
// }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void loadSize(final String itemId){
|
||||
private void loadSize(final String itemId) {
|
||||
GWT.log("Load size");
|
||||
txtSize.mask();
|
||||
AppControllerExplorer.rpcWorkspaceService.loadSizeByItemId(itemId, new AsyncCallback<Long>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
GWT.log("an error occured in load creation date by Id "+itemId + " "+caught.getMessage());
|
||||
GWT.log("an error occured in load creation date by Id " + itemId + " " + caught.getMessage());
|
||||
txtSize.unmask();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Long result) {
|
||||
GWT.log("Loaded size="+result);
|
||||
textFieldSetValue(txtSize,getFormattedSize(result));
|
||||
txtSize.unmask();
|
||||
GWT.log("Loaded size=" + result);
|
||||
textFieldSetValue(txtSize, getFormattedSize(result));
|
||||
txtSize.unmask();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void loadCreationDate(final String itemId){
|
||||
private void loadCreationDate(final String itemId) {
|
||||
|
||||
txtCreated.mask();
|
||||
AppControllerExplorer.rpcWorkspaceService.getItemCreationDateById(itemId, new AsyncCallback<Date>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
GWT.log("an error occured in load creation date by Id "+itemId + " "+caught.getMessage());
|
||||
GWT.log("an error occured in load creation date by Id " + itemId + " " + caught.getMessage());
|
||||
txtCreated.unmask();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Date result) {
|
||||
if(result!=null)
|
||||
textFieldSetValue(txtCreated,result.toString());
|
||||
if (result != null)
|
||||
textFieldSetValue(txtCreated, result.toString());
|
||||
|
||||
txtCreated.unmask();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void loadACLsDescriptionForSharedFolder(String sharedId){
|
||||
private void loadACLsDescriptionForSharedFolder(String sharedId) {
|
||||
|
||||
htmlUsersWidget.mask();
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.getACLsDescriptionForWorkspaceItemById(sharedId, new AsyncCallback<String>() {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.getACLsDescriptionForWorkspaceItemById(sharedId,
|
||||
new AsyncCallback<String>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
htmlUsersWidget.unmask();
|
||||
htmlUsersWidget.setHtml("Error on recovering users");
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
htmlUsersWidget.unmask();
|
||||
htmlUsersWidget.setHtml("Error on recovering users");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String result) {
|
||||
htmlUsersWidget.unmask();
|
||||
GWT.log("Loaded ACLs: "+result);
|
||||
htmlUsersWidget.setHtml(result);
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onSuccess(String result) {
|
||||
htmlUsersWidget.unmask();
|
||||
GWT.log("Loaded ACLs: " + result);
|
||||
htmlUsersWidget.setHtml(result);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private String getFormattedSize(long value){
|
||||
private String getFormattedSize(long value) {
|
||||
|
||||
if(value>0){
|
||||
double kb = value/1024;
|
||||
if(kb<1)
|
||||
kb=1;
|
||||
if (value > 0) {
|
||||
double kb = value / 1024;
|
||||
if (kb < 1)
|
||||
kb = 1;
|
||||
return number.format(kb);
|
||||
}else if(value==0){
|
||||
} else if (value == 0) {
|
||||
return EMPTY;
|
||||
}else
|
||||
} else
|
||||
return "";
|
||||
}
|
||||
|
||||
private void loadLocation(String itemId){
|
||||
private void loadLocation(String itemId) {
|
||||
|
||||
txtLocation.mask();
|
||||
AppControllerExplorer.rpcWorkspaceService.getListParentsByItemIdentifier(itemId, false, new AsyncCallback<List<FileModel>>() {
|
||||
AppControllerExplorer.rpcWorkspaceService.getListParentsByItemIdentifier(itemId, false,
|
||||
new AsyncCallback<List<FileModel>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
GWT.log("failure get list parents by item identifier "+caught);
|
||||
txtLocation.unmask();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<FileModel> result) {
|
||||
|
||||
String location="";
|
||||
if(result!=null){
|
||||
for (FileModel fileModel : result) {
|
||||
if(fileModel!=null)
|
||||
location+="/"+fileModel.getName();
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
GWT.log("failure get list parents by item identifier " + caught);
|
||||
txtLocation.unmask();
|
||||
}
|
||||
}
|
||||
if(location.isEmpty())
|
||||
location ="/";
|
||||
|
||||
txtLocation.setValue(location);
|
||||
txtLocation.unmask();
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onSuccess(List<FileModel> result) {
|
||||
|
||||
String location = "";
|
||||
if (result != null) {
|
||||
for (FileModel fileModel : result) {
|
||||
if (fileModel != null)
|
||||
location += "/" + fileModel.getName();
|
||||
}
|
||||
}
|
||||
if (location.isEmpty())
|
||||
location = "/";
|
||||
|
||||
txtLocation.setValue(location);
|
||||
txtLocation.unmask();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
|
@ -5,9 +5,11 @@ import org.gcube.portlets.user.workspace.client.event.RefreshFolderEvent;
|
|||
import org.gcube.portlets.user.workspace.client.event.SessionExpiredEvent;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||
import org.gcube.portlets.user.workspace.shared.AllowAccess;
|
||||
|
||||
import org.gcube.portlets.user.workspace.shared.PublicLink;
|
||||
import org.gcube.portlets.user.workspace.shared.SessionExpiredException;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.client.rpc.WorkspaceSharingServiceAsync;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.AllowAccess;
|
||||
|
||||
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
||||
import com.extjs.gxt.ui.client.Style.Scroll;
|
||||
|
@ -23,12 +25,10 @@ import com.google.gwt.core.client.GWT;
|
|||
import com.google.gwt.dom.client.Style.Unit;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
||||
|
||||
/**
|
||||
* The Class DialogGetLink.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Sep 13, 2016
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it Sep 13, 2016
|
||||
*/
|
||||
public class DialogGetLink extends Dialog {
|
||||
|
||||
|
@ -43,20 +43,26 @@ public class DialogGetLink extends Dialog {
|
|||
/**
|
||||
* The Enum Link_Type.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Sep 13, 2016
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it Sep 13,
|
||||
* 2016
|
||||
*/
|
||||
public enum Link_Type {PUBLIC_LINK, FOLDER_LINK};
|
||||
|
||||
public enum Link_Type {
|
||||
PUBLIC_LINK, FOLDER_LINK
|
||||
};
|
||||
|
||||
/**
|
||||
* Instantiates a new dialog get link.
|
||||
*
|
||||
* @param headingTxt the heading txt
|
||||
* @param item the item
|
||||
* @param version the version
|
||||
* @param type the type
|
||||
* @param setAsPublic the set as public
|
||||
* @param headingTxt
|
||||
* the heading txt
|
||||
* @param item
|
||||
* the item
|
||||
* @param version
|
||||
* the version
|
||||
* @param type
|
||||
* the type
|
||||
* @param setAsPublic
|
||||
* the set as public
|
||||
*/
|
||||
public DialogGetLink(String headingTxt, final FileModel item, String version, Link_Type type, boolean setAsPublic) {
|
||||
this.item = item;
|
||||
|
@ -74,15 +80,15 @@ public class DialogGetLink extends Dialog {
|
|||
setButtons(Dialog.CLOSE);
|
||||
setScrollMode(Scroll.AUTOY);
|
||||
|
||||
// label.setText(msgTitle);
|
||||
// label.setStyleName("myWebDavStyle");
|
||||
// label.setText(msgTitle);
|
||||
// label.setStyleName("myWebDavStyle");
|
||||
VerticalPanel vp1 = new VerticalPanel();
|
||||
vp1.setStyleAttribute("margin-top", "8px");
|
||||
txtCompleteURL = new TextField<String>();
|
||||
txtCompleteURL.setStyleAttribute("margin-top", "1px");
|
||||
txtCompleteURL.setWidth(widht-20);
|
||||
txtCompleteURL.setWidth(widht - 20);
|
||||
txtCompleteURL.setReadOnly(true);
|
||||
// txtCompleteURL.mask("Getting Link...");
|
||||
// txtCompleteURL.mask("Getting Link...");
|
||||
vp1.add(new Label("Link"));
|
||||
vp1.add(txtCompleteURL);
|
||||
|
||||
|
@ -90,69 +96,70 @@ public class DialogGetLink extends Dialog {
|
|||
vp2.setStyleAttribute("margin-top", "8px");
|
||||
txtShortURL = new TextField<String>();
|
||||
txtShortURL.setStyleAttribute("margin-top", "1px");
|
||||
txtShortURL.setWidth(widht-20);
|
||||
// txtShortURL.mask("Getting Link...");
|
||||
txtShortURL.setWidth(widht - 20);
|
||||
// txtShortURL.mask("Getting Link...");
|
||||
vp2.add(new Label("Short Link"));
|
||||
vp2.add(txtShortURL);
|
||||
|
||||
|
||||
switch (type) {
|
||||
case PUBLIC_LINK:
|
||||
|
||||
vp.mask("Getting Public Link...");
|
||||
setIcon(Resources.getIconPublicLink());
|
||||
|
||||
if(item.getIdentifier()!=null && !item.getIdentifier().isEmpty()){
|
||||
if (item.getIdentifier() != null && !item.getIdentifier().isEmpty()) {
|
||||
|
||||
if(version==null || version.isEmpty()){
|
||||
if (version == null || version.isEmpty()) {
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.getPublicLinkForFileItemId(item.getIdentifier(), true, new AsyncCallback<PublicLink>() {
|
||||
AppControllerExplorer.rpcWorkspaceService.getPublicLinkForFileItemId(item.getIdentifier(), true,
|
||||
new AsyncCallback<PublicLink>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(PublicLink publicLink) {
|
||||
vp.unmask();
|
||||
txtCompleteURL.setValue(publicLink.getCompleteURL());
|
||||
txtShortURL.setValue(publicLink.getShortURL());
|
||||
selectTxt();
|
||||
}
|
||||
@Override
|
||||
public void onSuccess(PublicLink publicLink) {
|
||||
vp.unmask();
|
||||
txtCompleteURL.setValue(publicLink.getCompleteURL());
|
||||
txtShortURL.setValue(publicLink.getShortURL());
|
||||
selectTxt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
vp.unmask();
|
||||
if(caught instanceof SessionExpiredException){
|
||||
GWT.log("Session expired");
|
||||
AppControllerExplorer.getEventBus().fireEvent(new SessionExpiredEvent());
|
||||
return;
|
||||
}
|
||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
vp.unmask();
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
GWT.log("Session expired");
|
||||
AppControllerExplorer.getEventBus().fireEvent(new SessionExpiredEvent());
|
||||
return;
|
||||
}
|
||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.getPublicLinkForFileItemIdToVersion(item.getIdentifier(), version, true, new AsyncCallback<PublicLink>() {
|
||||
AppControllerExplorer.rpcWorkspaceService.getPublicLinkForFileItemIdToVersion(item.getIdentifier(),
|
||||
version, true, new AsyncCallback<PublicLink>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(PublicLink publicLink) {
|
||||
vp.unmask();
|
||||
txtCompleteURL.setValue(publicLink.getCompleteURL());
|
||||
txtShortURL.setValue(publicLink.getShortURL());
|
||||
selectTxt();
|
||||
}
|
||||
@Override
|
||||
public void onSuccess(PublicLink publicLink) {
|
||||
vp.unmask();
|
||||
txtCompleteURL.setValue(publicLink.getCompleteURL());
|
||||
txtShortURL.setValue(publicLink.getShortURL());
|
||||
selectTxt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
vp.unmask();
|
||||
if(caught instanceof SessionExpiredException){
|
||||
GWT.log("Session expired");
|
||||
AppControllerExplorer.getEventBus().fireEvent(new SessionExpiredEvent());
|
||||
return;
|
||||
}
|
||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
vp.unmask();
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
GWT.log("Session expired");
|
||||
AppControllerExplorer.getEventBus().fireEvent(new SessionExpiredEvent());
|
||||
return;
|
||||
}
|
||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}else{
|
||||
} else {
|
||||
txtCompleteURL.unmask();
|
||||
new MessageBoxAlert("Error", "The item identifier is null", null);
|
||||
}
|
||||
|
@ -162,41 +169,44 @@ public class DialogGetLink extends Dialog {
|
|||
case FOLDER_LINK:
|
||||
|
||||
vp.mask("Updating Folder Link... checking permissions");
|
||||
if(item.isShared()){
|
||||
if (item.isShared()) {
|
||||
setIcon(Resources.getIconFolderSharedPublic());
|
||||
}else
|
||||
} else
|
||||
setIcon(Resources.getIconFolderPublic());
|
||||
|
||||
if(item.getIdentifier()!=null && !item.getIdentifier().isEmpty()){
|
||||
AppControllerExplorer.rpcWorkspaceService.accessToFolderLink(item.getIdentifier(), new AsyncCallback<AllowAccess>() {
|
||||
if (item.getIdentifier() != null && !item.getIdentifier().isEmpty()) {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
WorkspaceSharingServiceAsync.INSTANCE.accessToFolderLink(item.getIdentifier(),
|
||||
new AsyncCallback<AllowAccess>() {
|
||||
|
||||
vp.unmask();
|
||||
if(caught instanceof SessionExpiredException){
|
||||
GWT.log("Session expired");
|
||||
AppControllerExplorer.getEventBus().fireEvent(new SessionExpiredEvent());
|
||||
return;
|
||||
}
|
||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
||||
}
|
||||
vp.unmask();
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
GWT.log("Session expired");
|
||||
AppControllerExplorer.getEventBus().fireEvent(new SessionExpiredEvent());
|
||||
return;
|
||||
}
|
||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
|
||||
@Override
|
||||
public void onSuccess(AllowAccess result) {
|
||||
GWT.log("AllowAccess? "+result);
|
||||
vp.unmask();
|
||||
if(result.getAccessGranted()){
|
||||
String msg = DialogGetLink.this.setAsPublic?"Getting":"Removing";
|
||||
msg=msg+" Folder Link... permissions granted";
|
||||
vp.mask(msg);
|
||||
allowAccessToFolderLink(item.getIdentifier(), DialogGetLink.this.setAsPublic);
|
||||
}else
|
||||
new MessageBoxAlert("Permission Denied", result.getAccessAllowDenyMotivation(), null);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onSuccess(AllowAccess result) {
|
||||
GWT.log("AllowAccess? " + result);
|
||||
vp.unmask();
|
||||
if (result.getAccessGranted()) {
|
||||
String msg = DialogGetLink.this.setAsPublic ? "Getting" : "Removing";
|
||||
msg = msg + " Folder Link... permissions granted";
|
||||
vp.mask(msg);
|
||||
allowAccessToFolderLink(item.getIdentifier(), DialogGetLink.this.setAsPublic);
|
||||
} else
|
||||
new MessageBoxAlert("Permission Denied", result.getAccessAllowDenyMotivation(),
|
||||
null);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -208,13 +218,12 @@ public class DialogGetLink extends Dialog {
|
|||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
hide();
|
||||
hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// vp.add(label);
|
||||
// vp.add(label);
|
||||
vp.add(vp1);
|
||||
vp.add(vp2);
|
||||
|
||||
|
@ -226,41 +235,47 @@ public class DialogGetLink extends Dialog {
|
|||
/**
|
||||
* Allow access to folder link.
|
||||
*
|
||||
* @param folderId the folder id
|
||||
* @param setIsPublic the set is public
|
||||
* @param folderId
|
||||
* the folder id
|
||||
* @param setIsPublic
|
||||
* the set is public
|
||||
*/
|
||||
protected void allowAccessToFolderLink(String folderId, final boolean setIsPublic){
|
||||
protected void allowAccessToFolderLink(String folderId, final boolean setIsPublic) {
|
||||
|
||||
AppControllerExplorer.rpcWorkspaceService.markFolderAsPublicForFolderItemId(folderId, setIsPublic, new AsyncCallback<PublicLink>() {
|
||||
AppControllerExplorer.rpcWorkspaceService.markFolderAsPublicForFolderItemId(folderId, setIsPublic,
|
||||
new AsyncCallback<PublicLink>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(PublicLink publicLink) {
|
||||
@Override
|
||||
public void onSuccess(PublicLink publicLink) {
|
||||
|
||||
if(!setIsPublic && publicLink==null){
|
||||
DialogGetLink.this.hide();
|
||||
MessageBox.info("Folder Link Removed", "Folder Link to the folder: "+item.getName()+ " removed correctly", null);
|
||||
AppControllerExplorer.getEventBus().fireEvent(new RefreshFolderEvent(item.getParentFileModel(), true, false, false));
|
||||
return;
|
||||
}
|
||||
if (!setIsPublic && publicLink == null) {
|
||||
DialogGetLink.this.hide();
|
||||
MessageBox.info("Folder Link Removed",
|
||||
"Folder Link to the folder: " + item.getName() + " removed correctly", null);
|
||||
AppControllerExplorer.getEventBus()
|
||||
.fireEvent(new RefreshFolderEvent(item.getParentFileModel(), true, false, false));
|
||||
return;
|
||||
}
|
||||
|
||||
vp.unmask();
|
||||
txtCompleteURL.setValue(publicLink.getCompleteURL());
|
||||
txtShortURL.setValue(publicLink.getShortURL());
|
||||
selectTxt();
|
||||
AppControllerExplorer.getEventBus().fireEvent(new RefreshFolderEvent(item.getParentFileModel(), true, false, false));
|
||||
}
|
||||
vp.unmask();
|
||||
txtCompleteURL.setValue(publicLink.getCompleteURL());
|
||||
txtShortURL.setValue(publicLink.getShortURL());
|
||||
selectTxt();
|
||||
AppControllerExplorer.getEventBus()
|
||||
.fireEvent(new RefreshFolderEvent(item.getParentFileModel(), true, false, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
vp.unmask();
|
||||
if(caught instanceof SessionExpiredException){
|
||||
GWT.log("Session expired");
|
||||
AppControllerExplorer.getEventBus().fireEvent(new SessionExpiredEvent());
|
||||
return;
|
||||
}
|
||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
vp.unmask();
|
||||
if (caught instanceof SessionExpiredException) {
|
||||
GWT.log("Session expired");
|
||||
AppControllerExplorer.getEventBus().fireEvent(new SessionExpiredEvent());
|
||||
return;
|
||||
}
|
||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -276,9 +291,9 @@ public class DialogGetLink extends Dialog {
|
|||
/**
|
||||
* Select txt.
|
||||
*/
|
||||
public void selectTxt(){
|
||||
public void selectTxt() {
|
||||
|
||||
if(txtCompleteURL.getValue()!=null)
|
||||
if (txtCompleteURL.getValue() != null)
|
||||
txtCompleteURL.select(0, txtCompleteURL.getValue().length());
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@ import com.google.gwt.dom.client.Style.Unit;
|
|||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*
|
||||
*/
|
||||
public class DialogShareLink extends Dialog {
|
||||
|
|
|
@ -17,7 +17,7 @@ import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
|||
/**
|
||||
* The Class DialogText.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jul 10, 2017
|
||||
*/
|
||||
public class DialogText extends Dialog {
|
||||
|
|
|
@ -15,7 +15,7 @@ import com.google.gwt.dom.client.Style.Unit;
|
|||
import com.google.gwt.user.client.ui.Anchor;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*
|
||||
*/
|
||||
public class DialogWebDavUrl extends Dialog {
|
||||
|
|
|
@ -22,7 +22,7 @@ import com.google.gwt.user.client.ui.Image;
|
|||
/**
|
||||
* The Class ImagesPreviewController.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* May 24, 2017
|
||||
*/
|
||||
public class ImagesPreviewController {
|
||||
|
|
|
@ -4,7 +4,7 @@ import com.extjs.gxt.ui.client.widget.Info;
|
|||
import com.extjs.gxt.ui.client.widget.InfoConfig;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*
|
||||
*/
|
||||
public class InfoDisplay extends Info{
|
||||
|
|
|
@ -4,8 +4,8 @@ package org.gcube.portlets.user.workspace.client.view.windows;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jun 25, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 25, 2013
|
||||
*
|
||||
*/
|
||||
public class InfoDisplayMessage extends InfoDisplay{
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.extjs.gxt.ui.client.event.MessageBoxEvent;
|
|||
import com.extjs.gxt.ui.client.widget.MessageBox;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*
|
||||
*/
|
||||
public class MessageBoxAlert {
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.extjs.gxt.ui.client.event.MessageBoxEvent;
|
|||
import com.extjs.gxt.ui.client.widget.MessageBox;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*
|
||||
*/
|
||||
public class MessageBoxConfirm {
|
||||
|
|
|
@ -3,7 +3,7 @@ package org.gcube.portlets.user.workspace.client.view.windows;
|
|||
import com.extjs.gxt.ui.client.widget.MessageBox;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*
|
||||
*/
|
||||
public class MessageBoxWait {
|
||||
|
|
|
@ -3,8 +3,8 @@ package org.gcube.portlets.user.workspace.client.view.windows;
|
|||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Sep 4, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Sep 4, 2013
|
||||
*
|
||||
*/
|
||||
public final class NewBrowserWindow extends JavaScriptObject {
|
||||
|
|
|
@ -40,7 +40,7 @@ import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
|||
/**
|
||||
* The Class AccoutingInfoContainer.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Sep 28, 2016
|
||||
*/
|
||||
public class AccoutingInfoContainer extends LayoutContainer {
|
||||
|
|
|
@ -16,7 +16,7 @@ import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
|||
/**
|
||||
* The Class WindowAccountingInfo.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Nov 10, 2015
|
||||
*/
|
||||
public class WindowAccountingInfo extends Window {
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.gcube.portlets.user.workspace.client.workspace.exceptions;
|
|||
/**
|
||||
* The Class WrongItemTypeException.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 11, 2015
|
||||
*/
|
||||
public class WrongItemTypeException extends Exception{
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
package org.gcube.portlets.user.workspace.client.workspace.folder.item.gcube;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Feb 16, 2015
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Feb 16, 2015
|
||||
*
|
||||
*/
|
||||
public class WorkspaceHandledException extends Exception{
|
||||
|
|
|
@ -15,16 +15,16 @@ import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
|||
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceSharedFolder;
|
||||
import org.gcube.common.scope.impl.ScopeBean;
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.user.workspace.server.util.DifferenceBetweenInfoContactModel;
|
||||
import org.gcube.portlets.user.workspace.server.util.PortalContextInfo;
|
||||
import org.gcube.portlets.user.workspace.server.util.UserUtil;
|
||||
import org.gcube.portlets.user.workspace.server.util.WsUtil;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
/**
|
||||
* The Class NotificationsProducer.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*/
|
||||
public class NotificationsProducer {
|
||||
|
||||
|
|
|
@ -14,15 +14,15 @@ import org.gcube.common.homelibary.model.items.type.WorkspaceItemType;
|
|||
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceSharedFolder;
|
||||
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.WsUtil;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
/**
|
||||
* The Class NotificationsUtil.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @May 27, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* May 27, 2013
|
||||
*/
|
||||
public class NotificationsUtil {
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceSharedFolder;
|
|||
/**
|
||||
* The Class NotificationMapper.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapaATisti.cnr.it)
|
||||
* Oct 2, 2018
|
||||
*/
|
||||
public class NotificationMapperToStorageHub {
|
||||
|
|
|
@ -11,15 +11,15 @@ import org.gcube.common.storagehub.model.types.WorkspaceItemType;
|
|||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceFolder;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItem;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceSharedFolder;
|
||||
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.WsUtil;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
|
||||
/**
|
||||
* The Class NotificationFromStorageHub.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Oct 2, 2018
|
||||
*/
|
||||
public class NotificationStorageHubUtil {
|
||||
|
|
|
@ -13,15 +13,15 @@ import org.gcube.applicationsupportlayer.social.NotificationsManager;
|
|||
import org.gcube.common.scope.impl.ScopeBean;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItem;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceSharedFolder;
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.user.workspace.server.util.PortalContextInfo;
|
||||
import org.gcube.portlets.user.workspace.server.util.WsUtil;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
|
||||
/**
|
||||
* The Class NotificationsProducerToStorageHub.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapaATisti.cnr.it)
|
||||
* Oct 5, 2018
|
||||
*/
|
||||
public class NotificationsProducerToStorageHub {
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.gcube.common.homelibrary.home.workspace.accessmanager.ACLType;
|
|||
/**
|
||||
* The Class AclTypeComparator.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Mar 5, 2015
|
||||
*/
|
||||
public class AclTypeComparator implements Comparator<ACLType>{
|
||||
|
|
|
@ -3,7 +3,9 @@ package org.gcube.portlets.user.workspace.server.util;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -11,7 +13,7 @@ import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
|||
/**
|
||||
* The Class DifferenceBetweenInfoContactModel.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Nov 19, 2015
|
||||
*/
|
||||
public class DifferenceBetweenInfoContactModel {
|
||||
|
|
|
@ -11,7 +11,7 @@ import org.apache.log4j.Logger;
|
|||
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* @Apr 26, 2013
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.io.Serializable;
|
|||
/**
|
||||
* The Class PortalContextInfo.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Nov 25, 2016
|
||||
*/
|
||||
public class PortalContextInfo implements Serializable{
|
||||
|
|
|
@ -12,8 +12,8 @@ import org.apache.log4j.Logger;
|
|||
/**
|
||||
* The Class StringUtil.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jul 9, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jul 9, 2013
|
||||
*/
|
||||
public class StringUtil {
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.commons.io.IOUtils;
|
|||
/**
|
||||
* The Class ThumbnailGenerator.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapaATisti.cnr.it)
|
||||
* Oct 18, 2018
|
||||
*/
|
||||
public class ThumbnailGenerator {
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.apache.log4j.Logger;
|
|||
/**
|
||||
* The Class UrlEncoderUtil.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Sep 14, 2016
|
||||
*/
|
||||
public class UrlEncoderUtil {
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
import org.gcube.vomanagement.usermanagement.UserManager;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserRetrievalFault;
|
||||
|
@ -16,7 +16,7 @@ import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
|||
/**
|
||||
* The Class UserUtil.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Sep 14, 2016
|
||||
*/
|
||||
public class UserUtil {
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.InternalErrorEx
|
|||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.WorkspaceFolderNotFoundException;
|
||||
import org.gcube.portlets.user.urlshortener.UrlShortener;
|
||||
import org.gcube.portlets.user.workspace.client.model.FileModel;
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.user.workspace.server.GWTWorkspaceBuilder;
|
||||
import org.gcube.portlets.user.workspace.server.notifications.NotificationsProducer;
|
||||
import org.gcube.portlets.user.workspace.server.notifications.tostoragehub.NotificationsProducerToStorageHub;
|
||||
|
@ -32,14 +31,14 @@ import org.gcube.portlets.user.workspace.server.tostoragehub.StorageHubToWorkpac
|
|||
import org.gcube.portlets.user.workspace.server.util.resource.PropertySpecialFolderReader;
|
||||
import org.gcube.portlets.user.workspace.server.util.scope.ScopeUtilFilter;
|
||||
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||
|
||||
|
||||
/**
|
||||
* The Class WsUtil.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Nov 25, 2016
|
||||
*/
|
||||
public class WsUtil {
|
||||
|
|
|
@ -11,8 +11,8 @@ import org.apache.log4j.Logger;
|
|||
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Mar 5, 2014
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Mar 5, 2014
|
||||
*
|
||||
*/
|
||||
public class PropertySpecialFolderReader {
|
||||
|
|
|
@ -1,147 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.workspace.shared;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Nov 29, 2016
|
||||
*/
|
||||
public class AllowAccess implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -2180345568585856822L;
|
||||
|
||||
private String itemId;
|
||||
private Boolean accessGranted = false;
|
||||
private String accessAllowDenyMotivation;
|
||||
private String error;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public AllowAccess() {
|
||||
}
|
||||
|
||||
public AllowAccess(String itemId){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param itemId
|
||||
* @param accessGranted
|
||||
* @param accessAllowDenyMotivation
|
||||
* @param error
|
||||
*/
|
||||
public AllowAccess(
|
||||
String itemId, Boolean accessGranted, String accessAllowDenyMotivation,
|
||||
String error) {
|
||||
|
||||
super();
|
||||
this.itemId = itemId;
|
||||
this.accessGranted = accessGranted;
|
||||
this.accessAllowDenyMotivation = accessAllowDenyMotivation;
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the itemId
|
||||
*/
|
||||
public String getItemId() {
|
||||
|
||||
return itemId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the accessGranted
|
||||
*/
|
||||
public Boolean getAccessGranted() {
|
||||
|
||||
return accessGranted;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the accessAllowDenyMotivation
|
||||
*/
|
||||
public String getAccessAllowDenyMotivation() {
|
||||
|
||||
return accessAllowDenyMotivation;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the error
|
||||
*/
|
||||
public String getError() {
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param itemId the itemId to set
|
||||
*/
|
||||
public void setItemId(String itemId) {
|
||||
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param accessGranted the accessGranted to set
|
||||
*/
|
||||
public void setAccessGranted(Boolean accessGranted) {
|
||||
|
||||
this.accessGranted = accessGranted;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param accessAllowDenyMotivation the accessAllowDenyMotivation to set
|
||||
*/
|
||||
public void setAccessAllowDenyMotivation(String accessAllowDenyMotivation) {
|
||||
|
||||
this.accessAllowDenyMotivation = accessAllowDenyMotivation;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param error the error to set
|
||||
*/
|
||||
public void setError(String error) {
|
||||
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("AllowAccess [itemId=");
|
||||
builder.append(itemId);
|
||||
builder.append(", accessGranted=");
|
||||
builder.append(accessGranted);
|
||||
builder.append(", accessAllowDenyMotivation=");
|
||||
builder.append(accessAllowDenyMotivation);
|
||||
builder.append(", error=");
|
||||
builder.append(error);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -6,7 +6,7 @@ package org.gcube.portlets.user.workspace.shared;
|
|||
/**
|
||||
* The Interface ContactLogin.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Nov 4, 2015
|
||||
*/
|
||||
public interface ContactLogin {
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
package org.gcube.portlets.user.workspace.shared;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Feb 21, 2014
|
||||
*
|
||||
*/
|
||||
public class ExtendedWorkspaceACL extends WorkspaceACL{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 5272059977475806564L;
|
||||
|
||||
|
||||
private String loginOwner;
|
||||
private String workspaceItemId;
|
||||
|
||||
|
||||
private boolean isBaseSharedFolder;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public ExtendedWorkspaceACL() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* @param label
|
||||
* @param defaultValue
|
||||
* @param userType
|
||||
* @param description
|
||||
* @param loginOwner
|
||||
* @param workspaceItemId
|
||||
*/
|
||||
public ExtendedWorkspaceACL(String id, String label, boolean defaultValue, USER_TYPE userType, String description, String loginOwner, String workspaceItemId, boolean isBaseSharedFolder) {
|
||||
super(id, label, defaultValue, userType, description);
|
||||
this.loginOwner = loginOwner;
|
||||
this.workspaceItemId = workspaceItemId;
|
||||
this.isBaseSharedFolder = isBaseSharedFolder;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String getLoginOwner() {
|
||||
return loginOwner;
|
||||
}
|
||||
|
||||
public String getWorkspaceItemId() {
|
||||
return workspaceItemId;
|
||||
}
|
||||
|
||||
public void setLoginOwner(String loginOwner) {
|
||||
this.loginOwner = loginOwner;
|
||||
}
|
||||
|
||||
public void setWorkspaceItemId(String workspaceItemId) {
|
||||
this.workspaceItemId = workspaceItemId;
|
||||
}
|
||||
|
||||
public boolean isBaseSharedFolder() {
|
||||
return isBaseSharedFolder;
|
||||
}
|
||||
|
||||
public void setBaseSharedFolder(boolean isBaseSharedFolder) {
|
||||
this.isBaseSharedFolder = isBaseSharedFolder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("ExtendedWorkspaceACL [loginOwner=");
|
||||
builder.append(loginOwner);
|
||||
builder.append(", workspaceItemId=");
|
||||
builder.append(workspaceItemId);
|
||||
builder.append(", isBaseSharedFolder=");
|
||||
builder.append(isBaseSharedFolder);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ import java.io.Serializable;
|
|||
/**
|
||||
* The Class GarbageItem.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Oct 23, 2015
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it Oct 23, 2015
|
||||
*
|
||||
* USED TO SEND NOTIFICATION AFTER DELETE
|
||||
*/
|
||||
|
|
|
@ -6,44 +6,35 @@ package org.gcube.portlets.user.workspace.shared;
|
|||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Nov 4, 2015
|
||||
*/
|
||||
public class ListContact<T extends ContactLogin> extends ArrayList<T> implements Serializable{
|
||||
public class ListContact<T extends InfoContactModel> extends ArrayList<T> implements Serializable{
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 544202687567940083L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public ListContact() {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.util.ArrayList#contains(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(Object o) {
|
||||
public boolean contains(InfoContactModel infoContactModel) {
|
||||
|
||||
if(o==null)
|
||||
if(infoContactModel==null)
|
||||
return false;
|
||||
|
||||
ContactLogin contact = (ContactLogin) o;
|
||||
|
||||
if(contact.getLogin()==null)
|
||||
if(infoContactModel.getLogin()==null)
|
||||
return false;
|
||||
|
||||
|
||||
for (int i = 0; i < this.size(); i++){
|
||||
|
||||
ContactLogin log = get(i);
|
||||
if (log.getLogin()!=null && log.getLogin().compareTo(contact.getLogin())==0)
|
||||
InfoContactModel log = get(i);
|
||||
if (log.getLogin()!=null && log.getLogin().compareTo(infoContactModel.getLogin())==0)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.io.Serializable;
|
|||
/**
|
||||
* The Class PublicLink.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Sep 13, 2016
|
||||
*/
|
||||
public class PublicLink implements Serializable {
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.workspace.shared;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Mar 6, 2015
|
||||
*/
|
||||
public class ReportAssignmentACL implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7218122043660957432L;
|
||||
|
||||
private List<String> validLogins;
|
||||
private List<String> errors;
|
||||
private String aclType;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public ReportAssignmentACL() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the validLogins
|
||||
*/
|
||||
public List<String> getValidLogins() {
|
||||
return validLogins;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param validLogins the validLogins to set
|
||||
*/
|
||||
public void setValidLogins(List<String> validLogins) {
|
||||
this.validLogins = validLogins;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the errors
|
||||
*/
|
||||
public List<String> getErrors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param errors the errors to set
|
||||
*/
|
||||
public void setErrors(List<String> errors) {
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the aclType
|
||||
*/
|
||||
public String getAclType() {
|
||||
return aclType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param aclType the aclType to set
|
||||
*/
|
||||
public void setAclType(String aclType) {
|
||||
this.aclType = aclType;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("ReportValidationACL [validLogins=");
|
||||
builder.append(validLogins);
|
||||
builder.append(", errors=");
|
||||
builder.append(errors);
|
||||
builder.append(", aclType=");
|
||||
builder.append(aclType);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
|
@ -4,8 +4,8 @@
|
|||
package org.gcube.portlets.user.workspace.shared;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Sep 4, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Sep 4, 2013
|
||||
*
|
||||
*/
|
||||
public class SessionExpiredException extends Exception{
|
||||
|
|
|
@ -9,8 +9,8 @@ import java.util.List;
|
|||
import org.gcube.portlets.user.workspace.client.model.FileTrashedModel;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Feb 17, 2014
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Feb 17, 2014
|
||||
*
|
||||
*/
|
||||
public class TrashContent implements Serializable{
|
||||
|
|
|
@ -6,8 +6,8 @@ package org.gcube.portlets.user.workspace.shared;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Feb 17, 2014
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Feb 17, 2014
|
||||
*
|
||||
*/
|
||||
public class TrashOperationContent extends TrashContent{
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
package org.gcube.portlets.user.workspace.shared;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Feb 21, 2014
|
||||
*
|
||||
*/
|
||||
public class WorkspaceACL implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -1682851324671600049L;
|
||||
|
||||
private String id;
|
||||
private String label;
|
||||
private boolean defaultValue;
|
||||
private USER_TYPE userType;
|
||||
|
||||
private String description;
|
||||
|
||||
|
||||
public enum USER_TYPE{ADMINISTRATOR, GROUP, OWNER, OTHER};
|
||||
|
||||
public WorkspaceACL(String id, String label, boolean defaultValue, USER_TYPE userType, String description) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.label = label;
|
||||
this.defaultValue = defaultValue;
|
||||
this.userType = userType;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
|
||||
public WorkspaceACL() {
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public boolean getDefaultValue() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public void setDefaultValue(boolean defaultValue) {
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
public USER_TYPE getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(USER_TYPE userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("WorkspaceACL [id=");
|
||||
builder.append(id);
|
||||
builder.append(", label=");
|
||||
builder.append(label);
|
||||
builder.append(", defaultValue=");
|
||||
builder.append(defaultValue);
|
||||
builder.append(", userType=");
|
||||
builder.append(userType);
|
||||
builder.append(", description=");
|
||||
builder.append(description);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
|
@ -12,7 +12,7 @@ import com.google.gwt.user.client.rpc.IsSerializable;
|
|||
/**
|
||||
* The Class WorkspaceOperationResult.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapaATisti.cnr.it)
|
||||
* Oct 8, 2018
|
||||
*/
|
||||
public class WorkspaceOperationResult implements Serializable, IsSerializable{
|
||||
|
|
|
@ -8,8 +8,8 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Feb 17, 2014
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Feb 17, 2014
|
||||
*
|
||||
*/
|
||||
public enum WorkspaceTrashOperation {
|
||||
|
|
|
@ -6,8 +6,8 @@ package org.gcube.portlets.user.workspace.shared;
|
|||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Oct 31, 2014
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Oct 31, 2014
|
||||
*
|
||||
*/
|
||||
public class WorkspaceUserQuote implements Serializable{
|
||||
|
|
|
@ -8,8 +8,8 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Feb 17, 2014
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Feb 17, 2014
|
||||
*
|
||||
*/
|
||||
public enum WorkspaceVersioningOperation {
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.gcube.portlets.user.workspace.shared.accounting;
|
|||
/**
|
||||
* The Enum GxtAccountingEntryType.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Sep 28, 2016
|
||||
*/
|
||||
public enum GxtAccountingEntryType {
|
||||
|
|
|
@ -3,12 +3,14 @@ package org.gcube.portlets.user.workspace.shared.accounting;
|
|||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.gcube.portlets.user.workspace.client.model.InfoContactModel;
|
||||
import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @May 23, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* May 23, 2013
|
||||
*
|
||||
*/
|
||||
public class GxtAccountingField implements Serializable {
|
||||
|
|
|
@ -17,7 +17,7 @@ import com.extjs.gxt.ui.client.widget.treepanel.TreePanel;
|
|||
import com.google.gwt.user.client.Element;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
*
|
||||
*/
|
||||
public class BasicDNDExample extends LayoutContainer {
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.gcube.common.scope.impl.ScopeBean;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jul 14, 2015
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it Jul 14, 2015
|
||||
*/
|
||||
public class CreateSharedFolder {
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.net.URL;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* May 9, 2016
|
||||
*/
|
||||
public class DataMinerTest {
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.gcube.portlets.user.workspace.server.GWTWorkspaceBuilder;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Oct 28, 2015
|
||||
*/
|
||||
public class DeleteTest {
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.gcube.common.scope.api.ScopeProvider;
|
|||
import org.gcube.common.scope.impl.ScopeBean;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* @Dec 17, 2013
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -16,8 +16,8 @@ import org.gcube.common.homelibrary.home.workspace.folder.FolderItem;
|
|||
import org.gcube.common.homelibrary.home.workspace.folder.items.ExternalFile;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jun 18, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 18, 2013
|
||||
*
|
||||
*/
|
||||
public class DonwloadServletTest {
|
||||
|
|
|
@ -1,174 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.workspace;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||
import org.gcube.common.homelibrary.home.exceptions.HomeNotFoundException;
|
||||
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
||||
import org.gcube.common.homelibrary.home.exceptions.UserNotFoundException;
|
||||
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceFolder;
|
||||
import org.gcube.common.homelibrary.home.workspace.accessmanager.ACLType;
|
||||
import org.gcube.common.homelibrary.home.workspace.exceptions.ItemNotFoundException;
|
||||
import org.gcube.common.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException;
|
||||
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.shared.ReportAssignmentACL;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jan 29, 2014
|
||||
*
|
||||
*/
|
||||
public class EditPermissionsTest {
|
||||
|
||||
|
||||
// public static String DEFAULT_SCOPE = "/d4science.research-infrastructures.eu/gCubeApps"; //PRODUCTION
|
||||
public static String DEFAULT_SCOPE = "/gcube/devsec"; //DEV
|
||||
public static String TEST_USER = "francesco.mangiacrapa";
|
||||
// public static String ITEMID = "63832213-098d-42d1-8774-89b6349764c0"; //Activity T3.4 working drafts/T2-EC-IMAR-HO-14-015 iMarine Sustainability WP - Business Model tools.pdf
|
||||
// public static String ITEMID = "42fa2601-39d0-4951-aabf-27d2a2f1dca7";
|
||||
|
||||
// protected static Logger logger = Logger.getLogger(EditPermissionsTest.class);
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
ScopeBean scope = new ScopeBean(DEFAULT_SCOPE);
|
||||
ScopeProvider.instance.set(scope.toString());
|
||||
|
||||
System.out.println("init HL");
|
||||
try {
|
||||
|
||||
Workspace ws = HomeLibrary
|
||||
.getHomeManagerFactory()
|
||||
.getHomeManager()
|
||||
.getHome(TEST_USER)
|
||||
.getWorkspace();
|
||||
|
||||
WorkspaceFolder sharedFolder = (WorkspaceFolder) ws.getItem("bd5fa899-225d-4547-a3c5-79b5333cde20");
|
||||
|
||||
System.out.println(sharedFolder.getACLOwner());
|
||||
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
list.add("francesco.mangiacrapa");
|
||||
list.add("massimiliano.assante");
|
||||
list.add("pasquale.pagano");
|
||||
list.add("valentina.marioli");
|
||||
|
||||
validateACLToUser(sharedFolder, list, ACLType.READ_ONLY.toString());
|
||||
|
||||
} 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();
|
||||
} catch (ItemNotFoundException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static ReportAssignmentACL validateACLToUser(WorkspaceFolder folder, List<String> listLogins, String aclType) throws Exception {
|
||||
|
||||
ReportAssignmentACL reportValidation = new ReportAssignmentACL();
|
||||
|
||||
try {
|
||||
|
||||
Map<ACLType, List<String>> mapACL = folder.getACLOwner();
|
||||
|
||||
ACLType settingACL = ACLType.valueOf(aclType);
|
||||
|
||||
System.out.println("Tentative setting: "+settingACL);
|
||||
System.out.println("For Logins: "+listLogins);
|
||||
|
||||
AclTypeComparator comparator = new AclTypeComparator();
|
||||
|
||||
List<String> admins = mapACL.get(ACLType.ADMINISTRATOR);
|
||||
|
||||
for (String admin : admins) {
|
||||
listLogins.remove(admin);
|
||||
System.out.println("Reject username: "+admin +" as "+ACLType.ADMINISTRATOR);
|
||||
}
|
||||
|
||||
List<String> validLogins = new ArrayList<String>(listLogins);
|
||||
List<String> errors = new ArrayList<String>();
|
||||
|
||||
|
||||
for (String username : listLogins) {
|
||||
System.out.println("\nChecking username: "+username);
|
||||
for (ACLType aclHL : mapACL.keySet()) {
|
||||
|
||||
if(!aclHL.equals(ACLType.ADMINISTRATOR)){
|
||||
List<String> loginsHL = mapACL.get(aclHL);
|
||||
System.out.println("to ACLType: "+aclHL +", logins found: "+loginsHL);
|
||||
|
||||
if(loginsHL.contains(username)){
|
||||
int cmp = comparator.compare(settingACL, aclHL);
|
||||
System.out.println("Compare result between "+aclHL + " and "+settingACL +": "+cmp);
|
||||
if(cmp==-1){
|
||||
//CHANGE ACL IS NOT VALID
|
||||
System.out.println("Reject ACL: "+settingACL+ " to "+username);
|
||||
validLogins.remove(username);
|
||||
//TODO FULL NAME
|
||||
errors.add("Unable for "+username+ " the grant of the privilege '"+settingACL+", it's lower than (already assigned) "+ aclHL);
|
||||
break;
|
||||
}else if(cmp==0){
|
||||
//SAME ACL
|
||||
System.out.println("Skipping ACL: "+settingACL+ " to "+username);
|
||||
//TODO FULL NAME
|
||||
errors.add("Ignoring for "+username+ " the grant of the privilege '"+settingACL+", it's already assigned");
|
||||
validLogins.remove(username);
|
||||
break;
|
||||
}else if(cmp==1){
|
||||
//CHANGE ACL IS VALID
|
||||
System.out.println("Valid ACL: "+settingACL+ " to "+username);
|
||||
}
|
||||
}else{
|
||||
//CHANGE ACL IS VALID
|
||||
System.out.println("[Login not found], Set ACL: "+settingACL+ " to "+username);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("\n");
|
||||
for (String username : validLogins) {
|
||||
System.out.println("Set ACL: "+settingACL+ " to "+username);
|
||||
}
|
||||
|
||||
|
||||
System.out.println("\n");
|
||||
for (String error : errors) {
|
||||
System.out.println(error);
|
||||
}
|
||||
reportValidation.setAclType(aclType);
|
||||
reportValidation.setErrors(errors);
|
||||
reportValidation.setValidLogins(validLogins);
|
||||
return reportValidation;
|
||||
|
||||
} catch (InternalErrorException e) {
|
||||
throw new Exception("Sorry, an error occurred when validating ACL assignment, try again later");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -15,7 +15,7 @@ import org.gcube.common.scope.impl.ScopeBean;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 12, 2015
|
||||
*/
|
||||
public class GcubeProperties {
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
package org.gcube.portlets.user.workspace;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jun 28, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 28, 2013
|
||||
*
|
||||
*/
|
||||
import java.io.BufferedReader;
|
||||
|
|
|
@ -20,8 +20,8 @@ import org.apache.commons.httpclient.methods.PostMethod;
|
|||
import org.apache.commons.httpclient.params.HttpMethodParams;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jun 4, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 4, 2013
|
||||
*
|
||||
*/
|
||||
public class HttpCallerUtil {
|
||||
|
|
|
@ -23,8 +23,8 @@ import org.gcube.common.scope.impl.ScopeBean;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jan 29, 2014
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jan 29, 2014
|
||||
*
|
||||
*/
|
||||
public class ItemCreate {
|
||||
|
|
|
@ -22,8 +22,8 @@ import org.gcube.common.scope.impl.ScopeBean;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jan 29, 2014
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jan 29, 2014
|
||||
*
|
||||
*/
|
||||
public class ItemRetrieve {
|
||||
|
|
|
@ -21,8 +21,8 @@ import org.gcube.common.scope.api.ScopeProvider;
|
|||
import org.gcube.common.scope.impl.ScopeBean;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jul 3, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jul 3, 2013
|
||||
*
|
||||
*/
|
||||
public class PublicLinkTest {
|
||||
|
|
|
@ -15,8 +15,8 @@ import org.gcube.portlets.user.workspace.client.model.FileGridModel;
|
|||
import org.gcube.portlets.user.workspace.server.GWTWorkspaceBuilder;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jul 3, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jul 3, 2013
|
||||
*
|
||||
*/
|
||||
public class SearchTextTest {
|
||||
|
|
|
@ -23,8 +23,8 @@ import org.gcube.portlets.user.workspace.server.util.HttpRequestUtil;
|
|||
import org.gcube.portlets.user.workspace.server.util.StringUtil;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jul 3, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jul 3, 2013
|
||||
*
|
||||
*/
|
||||
public class SinglePublicLinkTest {
|
||||
|
|
|
@ -17,8 +17,8 @@ import org.gcube.portlets.user.workspace.server.GWTWorkspaceBuilder;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jan 29, 2014
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jan 29, 2014
|
||||
*
|
||||
*/
|
||||
public class SizeRetrieving {
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.gcube.portlets.user.workspace.server.GWTWorkspaceBuilder;
|
|||
/**
|
||||
* The Class SmartFolderTest.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Sep 29, 2016
|
||||
*/
|
||||
public class SmartFolderTest {
|
||||
|
|
|
@ -11,7 +11,7 @@ import org.gcube.portlets.user.workspace.server.util.StringUtil;
|
|||
/**
|
||||
* The Class TestEncodeDecodeBase64.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Sep 19, 2016
|
||||
*/
|
||||
public class TestEncodeDecodeBase64 {
|
||||
|
|
|
@ -20,8 +20,8 @@ import org.gcube.common.scope.impl.ScopeBean;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jan 29, 2014
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jan 29, 2014
|
||||
*
|
||||
*/
|
||||
public class TestSync {
|
||||
|
|
|
@ -13,8 +13,8 @@ import org.gcube.common.scope.api.ScopeProvider;
|
|||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @May 15, 2014
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* May 15, 2014
|
||||
*
|
||||
*/
|
||||
public class TestWithTime {
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.gcube.common.scope.impl.ScopeBean;
|
|||
/**
|
||||
* The Class UploadServletTest.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapaATisti.cnr.it)
|
||||
* Jul 23, 2018
|
||||
*/
|
||||
public class UploadServletTest {
|
||||
|
|
|
@ -26,8 +26,8 @@ import org.gcube.common.scope.api.ScopeProvider;
|
|||
import org.gcube.common.scope.impl.ScopeBean;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jun 20, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 20, 2013
|
||||
*
|
||||
*/
|
||||
public class UploadServletTestToken {
|
||||
|
|
|
@ -30,8 +30,8 @@ import org.gcube.resources.discovery.client.api.DiscoveryClient;
|
|||
import org.gcube.resources.discovery.client.queries.impl.XQuery;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jun 26, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 26, 2013
|
||||
*
|
||||
*/
|
||||
public class UriResolverReaderRR {
|
||||
|
|
|
@ -11,8 +11,8 @@ import java.util.Map;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jun 4, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 4, 2013
|
||||
*
|
||||
*/
|
||||
public class UrlEncoderUtil {
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
package org.gcube.portlets.user.workspace;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jun 28, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 28, 2013
|
||||
*
|
||||
*/
|
||||
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
|
||||
|
|
|
@ -16,8 +16,8 @@ import org.gcube.resources.discovery.client.api.DiscoveryClient;
|
|||
import org.gcube.resources.discovery.client.queries.impl.XQuery;
|
||||
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Jun 26, 2013
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
||||
* Jun 26, 2013
|
||||
*
|
||||
*/
|
||||
public class UrlShortenerReaderRR {
|
||||
|
|
Loading…
Reference in New Issue