Updated pom version at 6.12
Removed unused code and servlets git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@128590 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ca0f8a1754
commit
8a4dfa7acf
|
@ -23,5 +23,6 @@
|
||||||
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
46
pom.xml
46
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>workspace-tree-widget</artifactId>
|
<artifactId>workspace-tree-widget</artifactId>
|
||||||
<version>6.11.2-SNAPSHOT</version>
|
<version>6.12.0-SNAPSHOT</version>
|
||||||
<name>gCube Workspace Tree Widget</name>
|
<name>gCube Workspace Tree Widget</name>
|
||||||
<description>
|
<description>
|
||||||
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
||||||
|
@ -62,12 +62,13 @@
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<!-- <dependency> -->
|
||||||
<groupId>com.google.web.bindery</groupId>
|
<!-- <groupId>com.google.web.bindery</groupId> -->
|
||||||
<artifactId>requestfactory-server</artifactId>
|
<!-- <artifactId>requestfactory-server</artifactId> -->
|
||||||
<version>${gwtVersion}</version>
|
<!-- <version>${gwtVersion}</version> -->
|
||||||
<scope>runtime</scope>
|
<!-- <scope>runtime</scope> -->
|
||||||
</dependency>
|
<!-- </dependency> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Google Web Toolkit (GWT) -->
|
<!-- Google Web Toolkit (GWT) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -145,37 +146,15 @@
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- <dependency> -->
|
|
||||||
<!-- <groupId>org.apache.directory.studio</groupId> -->
|
|
||||||
<!-- <artifactId>org.apache.commons.io</artifactId> -->
|
|
||||||
<!-- <version>2.1</version> -->
|
|
||||||
<!-- </dependency> -->
|
|
||||||
|
|
||||||
<!-- <dependency> -->
|
|
||||||
<!-- <groupId>commons-io</groupId> -->
|
|
||||||
<!-- <artifactId>commons-io</artifactId> -->
|
|
||||||
<!-- <version>2.4</version> -->
|
|
||||||
<!-- </dependency> -->
|
|
||||||
|
|
||||||
<!-- HOME LIBRARY -->
|
<!-- HOME LIBRARY -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>home-library-model</artifactId>
|
<artifactId>home-library-model</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.gcube.common</groupId>
|
|
||||||
<artifactId>home-library-jcr</artifactId>
|
|
||||||
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
|
|
||||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>home-library</artifactId>
|
<artifactId>home-library</artifactId>
|
||||||
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
|
|
||||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
@ -184,17 +163,22 @@
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.common</groupId>
|
||||||
|
<artifactId>home-library-jcr</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-httpclient</groupId>
|
<groupId>commons-httpclient</groupId>
|
||||||
<artifactId>commons-httpclient</artifactId>
|
<artifactId>commons-httpclient</artifactId>
|
||||||
<version>3.1</version>
|
<!-- <version>3.1</version> -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.thoughtworks.xstream</groupId>
|
<groupId>com.thoughtworks.xstream</groupId>
|
||||||
<artifactId>xstream</artifactId>
|
<artifactId>xstream</artifactId>
|
||||||
<version>1.4.5</version>
|
<!-- <version>1.4.5</version> -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -15,12 +15,7 @@
|
||||||
|
|
||||||
<servlet path="/WorkspaceService" class="org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl" />
|
<servlet path="/WorkspaceService" class="org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl" />
|
||||||
<inherits name="org.gcube.portlets.widgets.workspaceuploader.WorkspaceUploader"></inherits>
|
<inherits name="org.gcube.portlets.widgets.workspaceuploader.WorkspaceUploader"></inherits>
|
||||||
<!--
|
|
||||||
<servlet path="/ImageService" class="org.gcube.portlets.user.workspace.server.ImageServlet" />
|
|
||||||
<servlet path="/MetadataService" class="org.gcube.portlets.user.workspace.server.MetadataServlet" />
|
|
||||||
-->
|
|
||||||
|
|
||||||
<inherits name='org.gcube.portlets.widgets.fileupload.FileUpload' />
|
|
||||||
|
|
||||||
<servlet path="/UploadService" class="org.gcube.portlets.user.workspace.server.UploadServlet" />
|
<servlet path="/UploadService" class="org.gcube.portlets.user.workspace.server.UploadServlet" />
|
||||||
<servlet path="/LocalUploadService" class="org.gcube.portlets.user.workspace.server.LocalUploadServlet" />
|
<servlet path="/LocalUploadService" class="org.gcube.portlets.user.workspace.server.LocalUploadServlet" />
|
||||||
|
@ -30,7 +25,6 @@
|
||||||
<!-- Specify the application specific style sheet. -->
|
<!-- Specify the application specific style sheet. -->
|
||||||
<stylesheet src='workspacetree.css' />
|
<stylesheet src='workspacetree.css' />
|
||||||
|
|
||||||
<!-- Specify the paths for translatable code -->
|
|
||||||
<source path='client'/>
|
<source path='client'/>
|
||||||
<source path='shared'/>
|
<source path='shared'/>
|
||||||
|
|
||||||
|
|
|
@ -372,15 +372,6 @@ public interface GWTWorkspaceService extends RemoteService{
|
||||||
*/
|
*/
|
||||||
public String itemExistsInWorkpaceFolder(String parentId, String itemName) throws Exception;
|
public String itemExistsInWorkpaceFolder(String parentId, String itemName) throws Exception;
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the list user shared by shared item.
|
|
||||||
*
|
|
||||||
* @param sharedItemId the shared item id
|
|
||||||
* @return the list user shared by shared item
|
|
||||||
* @throws Exception the exception
|
|
||||||
*/
|
|
||||||
public List<InfoContactModel> getListUserSharedBySharedItem(String sharedItemId) throws Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the item creation date by id.
|
* Gets the item creation date by id.
|
||||||
*
|
*
|
||||||
|
|
|
@ -361,16 +361,6 @@ public interface GWTWorkspaceServiceAsync {
|
||||||
void itemExistsInWorkpaceFolder(String parentId, String itemName,
|
void itemExistsInWorkpaceFolder(String parentId, String itemName,
|
||||||
AsyncCallback<String> callback);
|
AsyncCallback<String> callback);
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the list user shared by shared item.
|
|
||||||
*
|
|
||||||
* @param sharedItemId the shared item id
|
|
||||||
* @param callback the callback
|
|
||||||
* @return the list user shared by shared item
|
|
||||||
*/
|
|
||||||
void getListUserSharedBySharedItem(String sharedItemId,
|
|
||||||
AsyncCallback<List<InfoContactModel>> callback);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the item creation date by id.
|
* Gets the item creation date by id.
|
||||||
*
|
*
|
||||||
|
|
|
@ -298,7 +298,7 @@ public class GWTWorkspaceBuilder {
|
||||||
Map<String, DocumentMetadata> metadatas = (Map<String, DocumentMetadata>) new XStream().fromXML(image.getProperties().getPropertyValue(NodeProperty.METADATA.toString()));
|
Map<String, DocumentMetadata> metadatas = (Map<String, DocumentMetadata>) new XStream().fromXML(image.getProperties().getPropertyValue(NodeProperty.METADATA.toString()));
|
||||||
Map<String, GWTDocumentMetadata> gwtmetadatas = getMetadatas(metadatas, image.getId());
|
Map<String, GWTDocumentMetadata> gwtmetadatas = getMetadatas(metadatas, image.getId());
|
||||||
|
|
||||||
gwtImage = (GWTImageDocument) new GWTImageDocument(
|
gwtImage = new GWTImageDocument(
|
||||||
toDate(image.getCreationTime()),
|
toDate(image.getCreationTime()),
|
||||||
image.getId(),
|
image.getId(),
|
||||||
gwtProperties,
|
gwtProperties,
|
||||||
|
@ -619,6 +619,7 @@ public class GWTWorkspaceBuilder {
|
||||||
listContact.add(buildGxtInfoContactFromPortalLogin(portalLogin));
|
listContact.add(buildGxtInfoContactFromPortalLogin(portalLogin));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug("buildGxtInfoContactsFromPortalLogins return: "+ listContact.size());
|
||||||
return listContact;
|
return listContact;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -666,12 +667,14 @@ public class GWTWorkspaceBuilder {
|
||||||
*/
|
*/
|
||||||
protected FileModel buildGXTFileModelItem(WorkspaceItem item, FileModel parentFolderModel) throws InternalErrorException
|
protected FileModel buildGXTFileModelItem(WorkspaceItem item, FileModel parentFolderModel) throws InternalErrorException
|
||||||
{
|
{
|
||||||
logger.debug("buildGXTFileModelItem: "+item.getName());
|
// logger.debug("buildGXTFileModelItem: "+item.getName());
|
||||||
|
|
||||||
FileModel fileModel = null;
|
FileModel fileModel = null;
|
||||||
|
|
||||||
|
/*
|
||||||
if(parentFolderModel!=null)
|
if(parentFolderModel!=null)
|
||||||
parentFolderModel = (FolderModel) parentFolderModel;
|
parentFolderModel = parentFolderModel;
|
||||||
|
*/
|
||||||
|
|
||||||
switch (item.getType()) {
|
switch (item.getType()) {
|
||||||
|
|
||||||
|
@ -758,7 +761,7 @@ public class GWTWorkspaceBuilder {
|
||||||
switch (item.getType()) {
|
switch (item.getType()) {
|
||||||
|
|
||||||
case FOLDER:
|
case FOLDER:
|
||||||
fileGridModel = (FolderGridModel) new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, -1, true, false,false);
|
fileGridModel = new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, -1, true, false,false);
|
||||||
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER.toString());
|
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER.toString());
|
||||||
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_FOLDERS);
|
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_FOLDERS);
|
||||||
fileGridModel.setShareable(true);
|
fileGridModel.setShareable(true);
|
||||||
|
@ -772,7 +775,7 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
case SHARED_FOLDER:
|
case SHARED_FOLDER:
|
||||||
//ATTENTION: SEARCH ITEM IS NOT CASTABLE AT WorkspaceSharedFolder
|
//ATTENTION: SEARCH ITEM IS NOT CASTABLE AT WorkspaceSharedFolder
|
||||||
fileGridModel = (FolderGridModel) new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, -1, true, true, item.isVreFolder());
|
fileGridModel = new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, -1, true, true, item.isVreFolder());
|
||||||
fileGridModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
|
fileGridModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
|
||||||
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_SHARED_FOLDERS);
|
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_SHARED_FOLDERS);
|
||||||
fileGridModel.setShareable(true);
|
fileGridModel.setShareable(true);
|
||||||
|
@ -849,7 +852,7 @@ public class GWTWorkspaceBuilder {
|
||||||
switch (item.getType()) {
|
switch (item.getType()) {
|
||||||
|
|
||||||
case FOLDER:
|
case FOLDER:
|
||||||
fileGridModel = (FolderGridModel) new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModificationTime()), parentFileModel, -1, true, false,false);
|
fileGridModel = new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModificationTime()), parentFileModel, -1, true, false,false);
|
||||||
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER.toString());
|
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER.toString());
|
||||||
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_FOLDERS);
|
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_FOLDERS);
|
||||||
fileGridModel.setShareable(true);
|
fileGridModel.setShareable(true);
|
||||||
|
@ -865,7 +868,7 @@ public class GWTWorkspaceBuilder {
|
||||||
case SHARED_FOLDER:
|
case SHARED_FOLDER:
|
||||||
WorkspaceSharedFolder shared = (WorkspaceSharedFolder) item;
|
WorkspaceSharedFolder shared = (WorkspaceSharedFolder) item;
|
||||||
String name = shared.isVreFolder()?shared.getDisplayName():item.getName();
|
String name = shared.isVreFolder()?shared.getDisplayName():item.getName();
|
||||||
fileGridModel = (FolderGridModel) new FolderGridModel(item.getId(), name, toDate(item.getLastModificationTime()), parentFileModel, -1, true, true, shared.isVreFolder());
|
fileGridModel = new FolderGridModel(item.getId(), name, toDate(item.getLastModificationTime()), parentFileModel, -1, true, true, shared.isVreFolder());
|
||||||
fileGridModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
|
fileGridModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
|
||||||
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_SHARED_FOLDERS);
|
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_SHARED_FOLDERS);
|
||||||
fileGridModel.setShareable(true);
|
fileGridModel.setShareable(true);
|
||||||
|
@ -1752,7 +1755,7 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
af.setOperation(GxtAccountingEntryType.REMOVE);
|
af.setOperation(GxtAccountingEntryType.REMOVE);
|
||||||
AccountingEntryRemoval rem = (AccountingEntryRemoval) accountingEntry;
|
AccountingEntryRemoval rem = (AccountingEntryRemoval) accountingEntry;
|
||||||
String msg = (rem.getItemName()==null || rem.getItemName().isEmpty())?"":rem.getItemName()+" ";
|
String msg = rem.getItemName()==null || rem.getItemName().isEmpty()?"":rem.getItemName()+" ";
|
||||||
msg+= GxtAccountingEntryType.REMOVE.getName() +" by "+user.getName();
|
msg+= GxtAccountingEntryType.REMOVE.getName() +" by "+user.getName();
|
||||||
af.setDescription(msg);
|
af.setDescription(msg);
|
||||||
}
|
}
|
||||||
|
@ -1764,7 +1767,7 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
af.setOperation(GxtAccountingEntryType.RENAME);
|
af.setOperation(GxtAccountingEntryType.RENAME);
|
||||||
AccountingEntryRenaming ren = (AccountingEntryRenaming) accountingEntry;
|
AccountingEntryRenaming ren = (AccountingEntryRenaming) accountingEntry;
|
||||||
String msg = (ren.getOldItemName()==null || ren.getOldItemName().isEmpty())?"":ren.getOldItemName()+" ";
|
String msg = ren.getOldItemName()==null || ren.getOldItemName().isEmpty()?"":ren.getOldItemName()+" ";
|
||||||
msg+= GxtAccountingEntryType.RENAME.getName() +" to "+ ren.getNewItemName()+ " by "+user.getName();
|
msg+= GxtAccountingEntryType.RENAME.getName() +" to "+ ren.getNewItemName()+ " by "+user.getName();
|
||||||
af.setDescription(msg);
|
af.setDescription(msg);
|
||||||
}
|
}
|
||||||
|
@ -1776,7 +1779,7 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
af.setOperation(GxtAccountingEntryType.ADD);
|
af.setOperation(GxtAccountingEntryType.ADD);
|
||||||
AccountingEntryAdd acc = (AccountingEntryAdd) accountingEntry;
|
AccountingEntryAdd acc = (AccountingEntryAdd) accountingEntry;
|
||||||
String msg = (acc.getItemName()==null || acc.getItemName().isEmpty())?"":acc.getItemName()+" ";
|
String msg = acc.getItemName()==null || acc.getItemName().isEmpty()?"":acc.getItemName()+" ";
|
||||||
msg+=GxtAccountingEntryType.ADD.getName()+ " by "+user.getName();
|
msg+=GxtAccountingEntryType.ADD.getName()+ " by "+user.getName();
|
||||||
af.setDescription(msg);
|
af.setDescription(msg);
|
||||||
}
|
}
|
||||||
|
@ -1788,7 +1791,7 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
af.setOperation(GxtAccountingEntryType.UPDATE);
|
af.setOperation(GxtAccountingEntryType.UPDATE);
|
||||||
AccountingEntryUpdate upd = (AccountingEntryUpdate) accountingEntry;
|
AccountingEntryUpdate upd = (AccountingEntryUpdate) accountingEntry;
|
||||||
String msg = (upd.getItemName()==null || upd.getItemName().isEmpty())?"":upd.getItemName()+" ";
|
String msg = upd.getItemName()==null || upd.getItemName().isEmpty()?"":upd.getItemName()+" ";
|
||||||
msg+=GxtAccountingEntryType.UPDATE.getName()+" by "+user.getName();
|
msg+=GxtAccountingEntryType.UPDATE.getName()+" by "+user.getName();
|
||||||
af.setDescription(msg);
|
af.setDescription(msg);
|
||||||
}
|
}
|
||||||
|
@ -1821,7 +1824,7 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
af.setOperation(GxtAccountingEntryType.UNSHARE);
|
af.setOperation(GxtAccountingEntryType.UNSHARE);
|
||||||
AccountingEntryUnshare uns = (AccountingEntryUnshare) accountingEntry;
|
AccountingEntryUnshare uns = (AccountingEntryUnshare) accountingEntry;
|
||||||
String msg = (uns.getItemName()==null || uns.getItemName().isEmpty())?"":uns.getItemName()+" ";
|
String msg = uns.getItemName()==null || uns.getItemName().isEmpty()?"":uns.getItemName()+" ";
|
||||||
msg+=GxtAccountingEntryType.UNSHARE.getName()+" by "+user.getName();
|
msg+=GxtAccountingEntryType.UNSHARE.getName()+" by "+user.getName();
|
||||||
af.setDescription(msg);
|
af.setDescription(msg);
|
||||||
}
|
}
|
||||||
|
@ -1833,7 +1836,7 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
af.setOperation(GxtAccountingEntryType.RESTORE);
|
af.setOperation(GxtAccountingEntryType.RESTORE);
|
||||||
AccountingEntryRestore acc = (AccountingEntryRestore) accountingEntry;
|
AccountingEntryRestore acc = (AccountingEntryRestore) accountingEntry;
|
||||||
String msg = (acc.getItemName()==null || acc.getItemName().isEmpty())?"":acc.getItemName()+" ";
|
String msg = acc.getItemName()==null || acc.getItemName().isEmpty()?"":acc.getItemName()+" ";
|
||||||
msg+=GxtAccountingEntryType.RESTORE.getName()+" by "+user.getName();
|
msg+=GxtAccountingEntryType.RESTORE.getName()+" by "+user.getName();
|
||||||
af.setDescription(msg);
|
af.setDescription(msg);
|
||||||
}
|
}
|
||||||
|
@ -2073,9 +2076,9 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
double b = size;
|
double b = size;
|
||||||
double k = size/1024.0;
|
double k = size/1024.0;
|
||||||
double m = ((size/1024.0)/1024.0);
|
double m = size/1024.0/1024.0;
|
||||||
double g = (((size/1024.0)/1024.0)/1024.0);
|
double g = size/1024.0/1024.0/1024.0;
|
||||||
double t = ((((size/1024.0)/1024.0)/1024.0)/1024.0);
|
double t = size/1024.0/1024.0/1024.0/1024.0;
|
||||||
|
|
||||||
DecimalFormat dec = new DecimalFormat("0.00");
|
DecimalFormat dec = new DecimalFormat("0.00");
|
||||||
|
|
||||||
|
|
|
@ -1782,7 +1782,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
@Override
|
@Override
|
||||||
public List<InfoContactModel> getListUserSharedByFolderSharedId(String folderSharedId) throws Exception{
|
public List<InfoContactModel> getListUserSharedByFolderSharedId(String folderSharedId) throws Exception{
|
||||||
|
|
||||||
workspaceLogger.trace("getListUserSharedByFolderSharedId "+ folderSharedId);
|
workspaceLogger.debug("getListUserSharedByFolderSharedId "+ folderSharedId);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Workspace workspace = getWorkspace();
|
Workspace workspace = getWorkspace();
|
||||||
|
@ -1793,7 +1793,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
WorkspaceSharedFolder wsFolder = (WorkspaceSharedFolder) wsItem;
|
WorkspaceSharedFolder wsFolder = (WorkspaceSharedFolder) wsItem;
|
||||||
GWTWorkspaceBuilder builder = getGWTWorkspaceBuilder();
|
GWTWorkspaceBuilder builder = getGWTWorkspaceBuilder();
|
||||||
List<String> listPortalLogin = wsFolder.getUsers();
|
List<String> listPortalLogin = wsFolder.getUsers();
|
||||||
workspaceLogger.trace("getListUserSharedByFolderSharedId return "+ listPortalLogin.size() + " user");
|
workspaceLogger.debug("HL return "+ listPortalLogin.size() + " user/s");
|
||||||
|
|
||||||
if(isTestMode())
|
if(isTestMode())
|
||||||
return builder.buildGxtInfoContactFromPortalLoginTestMode(listPortalLogin);
|
return builder.buildGxtInfoContactFromPortalLoginTestMode(listPortalLogin);
|
||||||
|
@ -1815,7 +1815,8 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#getListUserSharedBySharedItem(java.lang.String)
|
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#getListUserSharedBySharedItem(java.lang.String)
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
|
/*@Override
|
||||||
public List<InfoContactModel> getListUserSharedBySharedItem(String sharedItemId) throws Exception{
|
public List<InfoContactModel> getListUserSharedBySharedItem(String sharedItemId) throws Exception{
|
||||||
workspaceLogger.trace("Get ListUserSharedBySharedItem "+ sharedItemId);
|
workspaceLogger.trace("Get ListUserSharedBySharedItem "+ sharedItemId);
|
||||||
try {
|
try {
|
||||||
|
@ -1845,7 +1846,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
||||||
workspaceLogger.error("Error in getListUserSharedByItemId ", e);
|
workspaceLogger.error("Error in getListUserSharedByItemId ", e);
|
||||||
throw new Exception(e.getMessage());
|
throw new Exception(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#unSharedFolderByFolderSharedId(java.lang.String)
|
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#unSharedFolderByFolderSharedId(java.lang.String)
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class NotificationsUtil {
|
||||||
|
|
||||||
Workspace workspace = WsUtil.getWorkspace(httpSession);
|
Workspace workspace = WsUtil.getWorkspace(httpSession);
|
||||||
|
|
||||||
List<InfoContactModel> listContacts = getListUserSharedByFolderSharedId(workspace, folderDestinationItem.getIdSharedFolder());
|
List<InfoContactModel> listContacts = getListUsersSharedByFolderSharedId(workspace, folderDestinationItem.getIdSharedFolder());
|
||||||
|
|
||||||
WorkspaceItem destinationSharedFolder = workspace.getItem(folderDestinationItem.getIdSharedFolder());
|
WorkspaceItem destinationSharedFolder = workspace.getItem(folderDestinationItem.getIdSharedFolder());
|
||||||
|
|
||||||
|
@ -96,9 +96,9 @@ public class NotificationsUtil {
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static List<InfoContactModel> getListUserSharedByFolderSharedId(Workspace workspace, String idSharedFolder) throws Exception {
|
public static List<InfoContactModel> getListUsersSharedByFolderSharedId(Workspace workspace, String idSharedFolder) throws Exception {
|
||||||
|
|
||||||
logger.trace("getListUserSharedByFolderSharedId "+ idSharedFolder);
|
logger.trace("getListUsersSharedByFolderSharedId "+ idSharedFolder);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ public class NotificationsUtil {
|
||||||
Workspace workspace = WsUtil.getWorkspace(httpSession);
|
Workspace workspace = WsUtil.getWorkspace(httpSession);
|
||||||
|
|
||||||
//get contacts
|
//get contacts
|
||||||
List<InfoContactModel> listContacts = getListUserSharedByFolderSharedId(workspace, idSharedFolder);
|
List<InfoContactModel> listContacts = getListUsersSharedByFolderSharedId(workspace, idSharedFolder);
|
||||||
|
|
||||||
WorkspaceItem sourceSharedFolder = workspace.getItem(idSharedFolder);
|
WorkspaceItem sourceSharedFolder = workspace.getItem(idSharedFolder);
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,7 @@ public class UriResolverReaderParameterForResolverIndex {
|
||||||
*/
|
*/
|
||||||
public UriResolverReaderParameterForResolverIndex(String scope, RESOLVER_TYPE resolverType) throws Exception {
|
public UriResolverReaderParameterForResolverIndex(String scope, RESOLVER_TYPE resolverType) throws Exception {
|
||||||
|
|
||||||
|
try{
|
||||||
logger.trace("UriResolverReaderParameter is istancing with scope: "+scope);
|
logger.trace("UriResolverReaderParameter is istancing with scope: "+scope);
|
||||||
ScopeUtilFilter scopeUtil = new ScopeUtilFilter(scope,true);
|
ScopeUtilFilter scopeUtil = new ScopeUtilFilter(scope,true);
|
||||||
ScopeProvider.instance.set(scopeUtil.getScopeRoot());
|
ScopeProvider.instance.set(scopeUtil.getScopeRoot());
|
||||||
|
@ -96,6 +97,12 @@ public class UriResolverReaderParameterForResolverIndex {
|
||||||
contentTypeParameter = ap2.propertyMap()!=null?ap2.propertyMap().get(CONTENT_TYPE_PARAMETER).value():"";
|
contentTypeParameter = ap2.propertyMap()!=null?ap2.propertyMap().get(CONTENT_TYPE_PARAMETER).value():"";
|
||||||
}
|
}
|
||||||
isAvailable = true;
|
isAvailable = true;
|
||||||
|
}catch(Exception e){
|
||||||
|
|
||||||
|
}finally{
|
||||||
|
ScopeProvider.instance.reset();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -115,6 +115,8 @@ public final class UrlShortener {
|
||||||
isAvailable = false;
|
isAvailable = false;
|
||||||
logger.error("an error occurred in reading RR: ", e);
|
logger.error("an error occurred in reading RR: ", e);
|
||||||
throw new Exception(NO_HTTP_URL_SHORTENER_AVAILABLE);
|
throw new Exception(NO_HTTP_URL_SHORTENER_AVAILABLE);
|
||||||
|
}finally{
|
||||||
|
ScopeProvider.instance.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,6 @@ public class WsUtil {
|
||||||
|
|
||||||
public static Workspace getWorkspace(final HttpSession httpSession) throws InternalErrorException, HomeNotFoundException, WorkspaceFolderNotFoundException
|
public static Workspace getWorkspace(final HttpSession httpSession) throws InternalErrorException, HomeNotFoundException, WorkspaceFolderNotFoundException
|
||||||
{
|
{
|
||||||
|
|
||||||
logger.trace("Get Workspace");
|
logger.trace("Get Workspace");
|
||||||
final ASLSession session = getAslSession(httpSession);
|
final ASLSession session = getAslSession(httpSession);
|
||||||
logger.trace("ASLSession scope: "+session.getScope() + " username: "+session.getUsername());
|
logger.trace("ASLSession scope: "+session.getScope() + " username: "+session.getUsername());
|
||||||
|
@ -170,82 +169,11 @@ public class WsUtil {
|
||||||
logger.trace("Scope provider instancied");
|
logger.trace("Scope provider instancied");
|
||||||
|
|
||||||
Workspace workspace = HomeLibrary.getUserWorkspace(session.getUsername());
|
Workspace workspace = HomeLibrary.getUserWorkspace(session.getUsername());
|
||||||
|
|
||||||
/*
|
|
||||||
if (session.getAttribute(METADATACONVERTER_ATTRIBUTE) == null){
|
|
||||||
|
|
||||||
logger.trace("Initializing the Metadata converter");
|
|
||||||
|
|
||||||
Thread mcLoader = new Thread(new Runnable(){
|
|
||||||
|
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
MetadataConverter mc = new MetadataConverter(logger);
|
|
||||||
mc.setup(session);
|
|
||||||
session.setAttribute(METADATACONVERTER_ATTRIBUTE, mc);
|
|
||||||
}catch (Exception e) {
|
|
||||||
logger.error("Error initializing the Metadata Converter: "+e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
mcLoader.start();
|
|
||||||
}
|
|
||||||
if (session.getAttribute(WORKSPACE_EVENT_COLLECTOR_ATTRIBUTE) == null){
|
|
||||||
|
|
||||||
|
|
||||||
logger.trace("Initializing the event collector");
|
|
||||||
|
|
||||||
//we prepare the event collector
|
|
||||||
WorkspaceEventCollector eventCollector = new WorkspaceEventCollector();
|
|
||||||
workspace.addWorkspaceListener(eventCollector);
|
|
||||||
session.setAttribute(WORKSPACE_EVENT_COLLECTOR_ATTRIBUTE, eventCollector);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (session.getAttribute(WORKSPACEBUILDER_ATTRIBUTE) == null)
|
|
||||||
{
|
|
||||||
logger.trace("Initializing the workspace area builder");
|
|
||||||
|
|
||||||
GWTWorkspaceBuilder builder = new GWTWorkspaceBuilder();
|
|
||||||
|
|
||||||
//ADDED 03/09/2013
|
|
||||||
builder.setUserLogged(new InfoContactModel(session.getUsername(), session.getUsername(), session.getUserFullName(), false));
|
|
||||||
|
|
||||||
session.setAttribute(WORKSPACEBUILDER_ATTRIBUTE, builder);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
return workspace;
|
return workspace;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// public static MetadataConverter getMetadataConverter(Logger logger, HttpSession httpSession)
|
|
||||||
// {
|
|
||||||
// MetadataConverter mc = (MetadataConverter) httpSession.getAttribute(METADATACONVERTER_ATTRIBUTE);
|
|
||||||
//
|
|
||||||
// if (mc==null)
|
|
||||||
// {
|
|
||||||
//
|
|
||||||
// mc = new MetadataConverter(logger);
|
|
||||||
// ASLSession session = getAslSession(httpSession);
|
|
||||||
// mc.setup(session);
|
|
||||||
// session.setAttribute(METADATACONVERTER_ATTRIBUTE, mc);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// mc.isReady();
|
|
||||||
//
|
|
||||||
// return mc;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public static WorkspaceEventCollector getEventCollector(HttpSession httpSession)
|
|
||||||
// {
|
|
||||||
// ASLSession session = getAslSession(httpSession);
|
|
||||||
// return (WorkspaceEventCollector) session.getAttribute(WsUtil.WORKSPACE_EVENT_COLLECTOR_ATTRIBUTE);
|
|
||||||
// }
|
|
||||||
|
|
||||||
public static GWTWorkspaceBuilder getGWTWorkspaceBuilder(HttpSession httpSession)
|
public static GWTWorkspaceBuilder getGWTWorkspaceBuilder(HttpSession httpSession)
|
||||||
{
|
{
|
||||||
ASLSession session = getAslSession(httpSession);
|
ASLSession session = getAslSession(httpSession);
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.portlets.user.workspace;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
* May 9, 2016
|
||||||
|
*/
|
||||||
|
public class DataMinerTest {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
String myToken = "4620e6d0-2313-4f48-9d54-eb3efd01a810";
|
||||||
|
try {
|
||||||
|
|
||||||
|
URL url = new URL("http://dataminer1-d-d4s.d4science.org/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token="+myToken+"&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.BIOCLIMATE_HCAF&DataInputs=HCAF_Table_List=http://goo.gl/LTqufC|http://goo.gl/LTqufC;HCAF_Table_Names=h1|h2");
|
||||||
|
url.openConnection();
|
||||||
|
}
|
||||||
|
catch (MalformedURLException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
catch (IOException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue