This commit is contained in:
Francesco Mangiacrapa 2018-10-03 10:46:20 +00:00
parent 1b7f648c35
commit 6224980e90
6 changed files with 18 additions and 39 deletions

View File

@ -322,7 +322,7 @@ public final class WorkspaceStorageHubClientService implements Workspace{
return (WorkspaceFolder) HLMapper.toWorkspaceItem(item);
}
catch (Exception e) {
logger.error("Error on creting the folde: ",e);
logger.error("Error on creating the folder: ",e);
throw new InternalErrorException(e.getMessage());
}

View File

@ -242,6 +242,9 @@ public class HLMapper {
theTrashItem.setLenght(trashItem.getLenght());
theTrashItem.setMimeType(trashItem.getMimeType());
isFolder = trashItem.getFolder(); //DO NOT MOVE THIS SET
if(isFolder)
type = WorkspaceItemType.TRASH_FOLDER;
logger.trace("Wrapped TrashItem: "+theTrashItem);
}

View File

@ -1,48 +1,42 @@
/**
*
*/
package org.gcube.common.storagehubwrapper.shared.tohl;
/**
* The Enum WorkspaceItemType.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
* Jun 19, 2018
* Jun 19, 2018
*/
public enum WorkspaceItemType {
/**
* A folder.
*/
FOLDER,
/**
* A shared folder
*/
SHARED_FOLDER,
/**
* A smart folder
*/
SMART_FOLDER,
/**
* The vre folder.
*/
VRE_FOLDER,
/**
* A folder item.
*/
FILE_ITEM,
/**
* A trash folder.
*/
TRASH_FOLDER,
/**
* A trash item.
*/
TRASH_ITEM,
VRE_FOLDER;
}
TRASH_ITEM
}

View File

@ -34,5 +34,6 @@ public class TrashItem extends WorkspaceItem implements TrashedItem{
Calendar deletedTime;
String mimeType;
long lenght;
//DO NOT ADD isFolder. The field is implemnted in the WorkspaceItem
}

View File

@ -9,19 +9,12 @@ import lombok.Setter;
import lombok.ToString;
/**
* The Class WorkspaceFolderImpl.
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Jun 15, 2018
*/
@Getter
/**
* Instantiates a new workspace folder impl.
*/
@NoArgsConstructor
@Setter
@Getter
@ToString(callSuper=true)
public class WorkspaceSharedFolder extends WorkspaceFolder implements org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceSharedFolder{

View File

@ -1,52 +1,40 @@
/**
*
*/
package org.gcube.common.storagehubwrapper.shared.tohl.items;
import org.gcube.common.storagehub.model.types.GenericItemType;
/**
* The Enum FileItemType.
*
* @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,
/**
* Image document.
*/
IMAGE_DOCUMENT,
/**
* PDF document.
*/
PDF_DOCUMENT,
/**
* Url document.
*/
URL_DOCUMENT,
/**
* Metadata.
*/
METADATA,
/**
* Trash item
*/
TRASH_ITEM,
/**
* A gCube item.
*/
GCUBE_ITEM
}
}