reading the title of shared folder instead of name

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/storagehub-client-wrapper@171547 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2018-09-20 15:03:11 +00:00
parent 75ca47980e
commit facb49543b
2 changed files with 17 additions and 3 deletions

View File

@ -130,6 +130,9 @@ public class HLMapper {
WorkspaceItemType type = null;
boolean isFolder = false;
String itemName = item.getName();
//THE ITEM IS A KIND OF FOLDER
if (item instanceof FolderItem){
isFolder = true;
@ -140,6 +143,7 @@ public class HLMapper {
SharedFolder sharedfolder = (SharedFolder) item; //??
theItem = new WorkspaceSharedFolder();
type = WorkspaceItemType.SHARED_FOLDER;
itemName = sharedfolder.getTitle(); //IN CASE OF SHARED FOLDER THE NAME IS AN UUID, I'M USING THE TITLE
if (sharedfolder.isVreFolder()){
VreFolder vreFolder = (VreFolder) item;
theItem = new WorkspaceVREFolder();
@ -147,7 +151,6 @@ public class HLMapper {
type = WorkspaceItemType.VRE_FOLDER;
}
}
}
//THE ITEM IS A KIND OF FILE
@ -215,7 +218,7 @@ public class HLMapper {
type = WorkspaceItemType.TRASH_ITEM;
theItem.setId(item.getId());
theItem.setName(item.getName());
theItem.setName(itemName);
theItem.setPath(item.getPath());
theItem.setParentId(item.getParentId());
theItem.setTrashed(item.isTrashed());

View File

@ -201,6 +201,17 @@ public interface Workspace{
/**
* Checks if is item shared.
*
* @param itemId the item id
* @return true, if is item shared
* @throws Exception the exception
*/
public boolean isItemShared(String itemId) throws Exception;
@ -650,7 +661,7 @@ public interface Workspace{
* @throws InternalErrorException the internal error exception
* @throws ItemAlreadyExistException the item already exist exception
* @throws WrongDestinationException the wrong destination exception
* @throws InsufficientPrivilegesException
* @throws InsufficientPrivilegesException the insufficient privileges exception
*/
WorkspaceItem uploadArchive(
String folderId, InputStream is, String extractionFolderName)