git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/storagehub-client-wrapper@171854 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1b7f648c35
commit
6224980e90
|
@ -322,7 +322,7 @@ public final class WorkspaceStorageHubClientService implements Workspace{
|
||||||
return (WorkspaceFolder) HLMapper.toWorkspaceItem(item);
|
return (WorkspaceFolder) HLMapper.toWorkspaceItem(item);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
logger.error("Error on creting the folde: ",e);
|
logger.error("Error on creating the folder: ",e);
|
||||||
throw new InternalErrorException(e.getMessage());
|
throw new InternalErrorException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -242,6 +242,9 @@ public class HLMapper {
|
||||||
theTrashItem.setLenght(trashItem.getLenght());
|
theTrashItem.setLenght(trashItem.getLenght());
|
||||||
theTrashItem.setMimeType(trashItem.getMimeType());
|
theTrashItem.setMimeType(trashItem.getMimeType());
|
||||||
isFolder = trashItem.getFolder(); //DO NOT MOVE THIS SET
|
isFolder = trashItem.getFolder(); //DO NOT MOVE THIS SET
|
||||||
|
if(isFolder)
|
||||||
|
type = WorkspaceItemType.TRASH_FOLDER;
|
||||||
|
|
||||||
logger.trace("Wrapped TrashItem: "+theTrashItem);
|
logger.trace("Wrapped TrashItem: "+theTrashItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,48 +1,42 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.gcube.common.storagehubwrapper.shared.tohl;
|
package org.gcube.common.storagehubwrapper.shared.tohl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Enum WorkspaceItemType.
|
* The Enum WorkspaceItemType.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||||
* Jun 19, 2018
|
* Jun 19, 2018
|
||||||
*/
|
*/
|
||||||
public enum WorkspaceItemType {
|
public enum WorkspaceItemType {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A folder.
|
* A folder.
|
||||||
*/
|
*/
|
||||||
FOLDER,
|
FOLDER,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A shared folder
|
* A shared folder
|
||||||
*/
|
*/
|
||||||
SHARED_FOLDER,
|
SHARED_FOLDER,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A smart folder
|
* A smart folder
|
||||||
*/
|
*/
|
||||||
SMART_FOLDER,
|
SMART_FOLDER,
|
||||||
|
/**
|
||||||
|
* The vre folder.
|
||||||
|
*/
|
||||||
|
VRE_FOLDER,
|
||||||
/**
|
/**
|
||||||
* A folder item.
|
* A folder item.
|
||||||
*/
|
*/
|
||||||
FILE_ITEM,
|
FILE_ITEM,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A trash folder.
|
* A trash folder.
|
||||||
*/
|
*/
|
||||||
TRASH_FOLDER,
|
TRASH_FOLDER,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A trash item.
|
* A trash item.
|
||||||
*/
|
*/
|
||||||
TRASH_ITEM,
|
TRASH_ITEM
|
||||||
|
}
|
||||||
VRE_FOLDER;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -34,5 +34,6 @@ public class TrashItem extends WorkspaceItem implements TrashedItem{
|
||||||
Calendar deletedTime;
|
Calendar deletedTime;
|
||||||
String mimeType;
|
String mimeType;
|
||||||
long lenght;
|
long lenght;
|
||||||
|
//DO NOT ADD isFolder. The field is implemnted in the WorkspaceItem
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,19 +9,12 @@ import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Class WorkspaceFolderImpl.
|
|
||||||
*
|
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
||||||
* Jun 15, 2018
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new workspace folder impl.
|
* Instantiates a new workspace folder impl.
|
||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Setter
|
@Setter
|
||||||
|
@Getter
|
||||||
@ToString(callSuper=true)
|
@ToString(callSuper=true)
|
||||||
public class WorkspaceSharedFolder extends WorkspaceFolder implements org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceSharedFolder{
|
public class WorkspaceSharedFolder extends WorkspaceFolder implements org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceSharedFolder{
|
||||||
|
|
||||||
|
|
|
@ -1,52 +1,40 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.gcube.common.storagehubwrapper.shared.tohl.items;
|
package org.gcube.common.storagehubwrapper.shared.tohl.items;
|
||||||
|
|
||||||
import org.gcube.common.storagehub.model.types.GenericItemType;
|
import org.gcube.common.storagehub.model.types.GenericItemType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Enum FileItemType.
|
* The Enum FileItemType.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||||
* Jun 21, 2018
|
* Jun 21, 2018
|
||||||
*/
|
*/
|
||||||
public enum FileItemType implements GenericItemType{
|
public enum FileItemType implements GenericItemType {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Document.
|
* Document.
|
||||||
*/
|
*/
|
||||||
DOCUMENT,
|
DOCUMENT,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Image document.
|
* Image document.
|
||||||
*/
|
*/
|
||||||
IMAGE_DOCUMENT,
|
IMAGE_DOCUMENT,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PDF document.
|
* PDF document.
|
||||||
*/
|
*/
|
||||||
PDF_DOCUMENT,
|
PDF_DOCUMENT,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Url document.
|
* Url document.
|
||||||
*/
|
*/
|
||||||
URL_DOCUMENT,
|
URL_DOCUMENT,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Metadata.
|
* Metadata.
|
||||||
*/
|
*/
|
||||||
METADATA,
|
METADATA,
|
||||||
|
|
||||||
/**
|
|
||||||
* Trash item
|
|
||||||
*/
|
|
||||||
TRASH_ITEM,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A gCube item.
|
* A gCube item.
|
||||||
*/
|
*/
|
||||||
GCUBE_ITEM
|
GCUBE_ITEM
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue