From 67aa4936ecf83629e2302fcdc2aaf28fff46cfd4 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Thu, 7 Nov 2019 11:14:41 +0000 Subject: [PATCH] Updated pom version at 6.28.0 Merged with branch version released for gCube 4.15 Changed the checks before sending notification git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@182226 82a268e6-3cf1-43bd-a215-b396298e98cf --- distro/changelog.xml | 8 ++++ pom.xml | 2 +- .../workspace/client/model/FileModel.java | 5 ++- .../client/view/tree/AsyncTreePanel.java | 38 +------------------ .../ObjectStorageHubToWorkpaceMapper.java | 6 ++- 5 files changed, 17 insertions(+), 42 deletions(-) diff --git a/distro/changelog.xml b/distro/changelog.xml index d55ed01..2a4fd12 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,12 @@ + + Merged with branch version + + Changed shared folder check to send notification + + diff --git a/pom.xml b/pom.xml index dc0440d..24bcb82 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.gcube.portlets.user workspace-tree-widget - 6.27.0-SNAPSHOT + 6.28.0-SNAPSHOT gCube Workspace Tree Widget gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/model/FileModel.java b/src/main/java/org/gcube/portlets/user/workspace/client/model/FileModel.java index 9d5dbc8..a4ad6c4 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/model/FileModel.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/model/FileModel.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.workspace.client.resources.Resources; import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel; import com.extjs.gxt.ui.client.data.BaseModelData; +import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.IsSerializable; import com.google.gwt.user.client.ui.AbstractImagePrototype; import com.google.gwt.user.client.ui.Image; @@ -295,7 +296,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ */ public AbstractImagePrototype getAbstractPrototypeIcon() { - //GWT.log("My prop: "+this.toString()); + GWT.log("My prop: "+this.toString()); AbstractImagePrototype absImgPr = Resources.getIconTable(); @@ -321,7 +322,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ if(this.isPublic()) //IS PLUBIC absImgPr = Resources.getIconFolderPublic(); else - absImgPr = Resources.getIconFolder(); //IS A PRIVATE FOLDER + absImgPr = Resources.getIconSharedFolder(); //IS A SHARED FOLDER DESCENDANT OF ROOT SHARED FOLDER } } diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/tree/AsyncTreePanel.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/tree/AsyncTreePanel.java index 1cdc219..7c9ce37 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/tree/AsyncTreePanel.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/tree/AsyncTreePanel.java @@ -209,7 +209,7 @@ public class AsyncTreePanel extends LayoutContainer { if(model.isPublic()) //IS PLUBIC return Resources.getIconFolderPublic(); else - return Resources.getIconFolder(); + return Resources.getIconSharedFolder(); //IS CHILDREN OF ROOT SHARED FOLDER } } @@ -347,42 +347,6 @@ public class AsyncTreePanel extends LayoutContainer { loadRootInStore(result, selectRoot); } }); - - -// if(this.scopeId !=null){ -// //Load Root with specific scope id -// AppControllerExplorer.rpcWorkspaceService.getRootForTree(scopeId, new AsyncCallback() { -// -// @Override -// public void onFailure(Throwable caught) { -// new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " getting root item. " +ConstantsExplorer.TRY_AGAIN, null); -// -// } -// -// @Override -// public void onSuccess(FolderModel result) { -// loadRootInStore(result, selectRoot); -// -// } -// }); -// } -// -// else{ -// //Load Root without filtering on scope id -// AppControllerExplorer.rpcWorkspaceService.getRootForTree(new AsyncCallback() { -// -// @Override -// public void onFailure(Throwable caught) { -// new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " getting root item. " +ConstantsExplorer.TRY_AGAIN, null); -// -// } -// -// @Override -// public void onSuccess(FolderModel result) { -// loadRootInStore(result, selectRoot); -// } -// }); -// } } diff --git a/src/main/java/org/gcube/portlets/user/workspace/server/tostoragehub/ObjectStorageHubToWorkpaceMapper.java b/src/main/java/org/gcube/portlets/user/workspace/server/tostoragehub/ObjectStorageHubToWorkpaceMapper.java index 9e01357..02c1908 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/server/tostoragehub/ObjectStorageHubToWorkpaceMapper.java +++ b/src/main/java/org/gcube/portlets/user/workspace/server/tostoragehub/ObjectStorageHubToWorkpaceMapper.java @@ -132,7 +132,8 @@ public class ObjectStorageHubToWorkpaceMapper { break; default: - logger.error("ALERT Conversion RETURNING null for item "+wrappedItem.getName()); + logger.warn("Default conversion to base item for item: "+wrappedItem); + fileModel = new FileModel(wrappedItem.getId(), wrappedItem.getName(), parentFolderModel, wrappedItem.isFolder(), wrappedItem.isShared()); break; } @@ -238,7 +239,8 @@ public class ObjectStorageHubToWorkpaceMapper { break; default: - logger.error("gxt conversion return null for item "+wrappedItem.getName()); + logger.warn("Default conversion to base item for item: "+wrappedItem); + fileGridModel = new FileGridModel(wrappedItem.getId(), wrappedItem.getName(), FormatterUtil.toDate(wrappedItem.getLastModificationTime()), parentFolderModel, -1, wrappedItem.isFolder(), wrappedItem.isShared()); break; }