Class DefaultItemManager
- java.lang.Object
-
- org.gcube.common.storagehub.client.proxies.DefaultManagerClient
-
- org.gcube.common.storagehub.client.proxies.DefaultItemManager
-
- All Implemented Interfaces:
ItemManagerClient,ManagerClient
public class DefaultItemManager extends DefaultManagerClient implements ItemManagerClient
-
-
Field Summary
-
Fields inherited from class org.gcube.common.storagehub.client.proxies.DefaultManagerClient
delegate
-
-
Constructor Summary
Constructors Constructor Description DefaultItemManager(org.gcube.common.clients.delegates.ProxyDelegate<org.gcube.common.gxrest.request.GXWebTargetAdapterRequest> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanWriteInto(String id)StringchangeACL(String id, String user, org.gcube.common.storagehub.model.acls.AccessType accessType)IntegerchildrenCount(String id)Deprecated.IntegerchildrenCount(String id, boolean showHidden)IntegerchildrenCount(String id, boolean showHidden, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType)IntegerchildrenCount(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType)Deprecated.Stringcopy(String id, String destinationFolderId, String newFilename)StringcreateFolder(String parentId, String name, String description)Deprecated.StringcreateFolder(String parentId, String name, String description, boolean hidden)StringcreateFolder(String parentId, String name, String description, boolean hidden, String pluginName, org.gcube.common.storagehub.model.plugins.PluginParameters parameters)StringcreateGcubeItem(String parentId, org.gcube.common.storagehub.model.items.GCubeItem item)StringcreateURL(String parentId, String name, String description, URL url)voiddelete(String id)Deprecated.voiddelete(String id, boolean force)voiddeleteFileVersion(String id, String versionName)StreamDescriptordownload(String id, String... excludeNodes)StreamDescriptordownloadSpecificVersion(String id, String version)List<? extends org.gcube.common.storagehub.model.items.Item>findChildrenByNamePattern(String id, String name, String... excludeNodes)org.gcube.common.storagehub.model.items.Itemget(String id, String... excludeNodes)List<org.gcube.common.storagehub.model.acls.ACL>getACL(String id)List<? extends org.gcube.common.storagehub.model.items.Item>getAnchestors(String id, String... excludeNodes)org.gcube.common.storagehub.model.items.ItemgetByRelativePath(String id, String path, String... excludeNodes)List<? extends org.gcube.common.storagehub.model.items.Item>getChildren(String id, boolean showHidden, String... excludeNodes)List<? extends org.gcube.common.storagehub.model.items.Item>getChildren(String id, int start, int limit, boolean showHidden, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, String... excludeNodes)List<? extends org.gcube.common.storagehub.model.items.Item>getChildren(String id, int start, int limit, boolean showHidden, String... excludeNodes)List<? extends org.gcube.common.storagehub.model.items.Item>getChildren(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, boolean showHidden, String... excludeNodes)List<? extends org.gcube.common.storagehub.model.items.Item>getChildren(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, String... excludeNodes)Deprecated.List<? extends org.gcube.common.storagehub.model.items.Item>getChildren(String id, String... excludeNodes)Deprecated.List<org.gcube.common.storagehub.model.service.Version>getFileVersions(String id)org.gcube.common.storagehub.model.types.FolderInfoTypegetFolderInfo(String id)URLgetPublickLink(String id)URLgetPublickLink(String id, String version)org.gcube.common.storagehub.model.items.ItemgetRootSharedFolder(String id)Stringmove(String id, String destinationFolderId)StringremoveAdmin(String id, String user)Stringrename(String id, String newName)StreamDescriptorresolvePublicLink(String identifier)List<? extends org.gcube.common.storagehub.model.items.Item>search(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, boolean showHidden, boolean excludeTrashed, String nameToMatch, String... excludeNodes)StringsetDescription(String id, String description)StringsetHidden(String id, Boolean value)StringsetMetadata(String id, org.gcube.common.storagehub.model.Metadata metadata)StringsetPublic(String id, boolean publish)StringshareFolder(String id, Set<String> users, org.gcube.common.storagehub.model.acls.AccessType accessType)StringunshareFolder(String id, Set<String> users)StringuploadArchive(InputStream stream, String parentId, String extractionFolderName)StringuploadArchive(InputStream stream, String parentId, String extractionFolderName, long contentLength)StringuploadFile(File file, String parentId, String fileName, String description)StringuploadFile(InputStream stream, String parentId, String fileName, String description)Deprecated.StringuploadFile(InputStream stream, String parentId, String fileName, String description, long contentLength)StringuploadFile(URI uri, String parentId, String fileName, String description)-
Methods inherited from class org.gcube.common.storagehub.client.proxies.DefaultManagerClient
impersonate, initQueryParameters, register
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gcube.common.storagehub.client.proxies.ManagerClient
impersonate, register
-
-
-
-
Method Detail
-
resolvePublicLink
public StreamDescriptor resolvePublicLink(String identifier) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
resolvePublicLinkin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getChildren
@Deprecated public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
Deprecated.- Specified by:
getChildrenin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getChildren
public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, boolean showHidden, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getChildrenin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getChildren
public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, int start, int limit, boolean showHidden, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getChildrenin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getChildren
public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, int start, int limit, boolean showHidden, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getChildrenin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getChildren
@Deprecated public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
Deprecated.- Specified by:
getChildrenin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getChildren
public List<? extends org.gcube.common.storagehub.model.items.Item> getChildren(String id, boolean showHidden, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getChildrenin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
search
public List<? extends org.gcube.common.storagehub.model.items.Item> search(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType, boolean showHidden, boolean excludeTrashed, String nameToMatch, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
searchin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
childrenCount
@Deprecated public Integer childrenCount(String id, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
Deprecated.- Specified by:
childrenCountin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
childrenCount
public Integer childrenCount(String id, boolean showHidden, Class<? extends org.gcube.common.storagehub.model.items.Item> onlyOfType) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
childrenCountin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
childrenCount
@Deprecated public Integer childrenCount(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
Deprecated.- Specified by:
childrenCountin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
childrenCount
public Integer childrenCount(String id, boolean showHidden) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
childrenCountin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
download
public StreamDescriptor download(String id, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
downloadin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
downloadSpecificVersion
public StreamDescriptor downloadSpecificVersion(String id, String version) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
downloadSpecificVersionin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getFileVersions
public List<org.gcube.common.storagehub.model.service.Version> getFileVersions(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getFileVersionsin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
deleteFileVersion
public void deleteFileVersion(String id, String versionName) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
deleteFileVersionin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
get
public org.gcube.common.storagehub.model.items.Item get(String id, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getFolderInfo
public org.gcube.common.storagehub.model.types.FolderInfoType getFolderInfo(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getFolderInfoin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getByRelativePath
public org.gcube.common.storagehub.model.items.Item getByRelativePath(String id, String path, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getByRelativePathin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getRootSharedFolder
public org.gcube.common.storagehub.model.items.Item getRootSharedFolder(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getRootSharedFolderin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getPublickLink
public URL getPublickLink(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getPublickLinkin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getPublickLink
public URL getPublickLink(String id, String version) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getPublickLinkin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
findChildrenByNamePattern
public List<? extends org.gcube.common.storagehub.model.items.Item> findChildrenByNamePattern(String id, String name, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
findChildrenByNamePatternin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
uploadFile
@Deprecated public String uploadFile(InputStream stream, String parentId, String fileName, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
Deprecated.- Specified by:
uploadFilein interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
uploadFile
public String uploadFile(InputStream stream, String parentId, String fileName, String description, long contentLength) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
uploadFilein interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
uploadFile
public String uploadFile(File file, String parentId, String fileName, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
uploadFilein interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
uploadFile
public String uploadFile(URI uri, String parentId, String fileName, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
uploadFilein interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
uploadArchive
public String uploadArchive(InputStream stream, String parentId, String extractionFolderName, long contentLength) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
uploadArchivein interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
uploadArchive
public String uploadArchive(InputStream stream, String parentId, String extractionFolderName) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
uploadArchivein interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
createFolder
@Deprecated public String createFolder(String parentId, String name, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
Deprecated.- Specified by:
createFolderin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
createFolder
public String createFolder(String parentId, String name, String description, boolean hidden, String pluginName, org.gcube.common.storagehub.model.plugins.PluginParameters parameters) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
createFolderin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
createFolder
public String createFolder(String parentId, String name, String description, boolean hidden) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
createFolderin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
createURL
public String createURL(String parentId, String name, String description, URL url) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
createURLin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
createGcubeItem
public String createGcubeItem(String parentId, org.gcube.common.storagehub.model.items.GCubeItem item) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
createGcubeItemin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
shareFolder
public String shareFolder(String id, Set<String> users, org.gcube.common.storagehub.model.acls.AccessType accessType) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
shareFolderin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
unshareFolder
public String unshareFolder(String id, Set<String> users) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
unshareFolderin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
delete
@Deprecated public void delete(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
Deprecated.- Specified by:
deletein interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
delete
public void delete(String id, boolean force) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
deletein interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getAnchestors
public List<? extends org.gcube.common.storagehub.model.items.Item> getAnchestors(String id, String... excludeNodes) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getAnchestorsin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
getACL
public List<org.gcube.common.storagehub.model.acls.ACL> getACL(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
getACLin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
canWriteInto
public boolean canWriteInto(String id) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
canWriteIntoin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
changeACL
public String changeACL(String id, String user, org.gcube.common.storagehub.model.acls.AccessType accessType) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
changeACLin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
removeAdmin
public String removeAdmin(String id, String user) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
removeAdminin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
copy
public String copy(String id, String destinationFolderId, String newFilename) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
copyin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
setPublic
public String setPublic(String id, boolean publish) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
setPublicin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
move
public String move(String id, String destinationFolderId) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
movein interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
rename
public String rename(String id, String newName) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
renamein interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
setHidden
public String setHidden(String id, Boolean value) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
setHiddenin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
setDescription
public String setDescription(String id, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
setDescriptionin interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
setMetadata
public String setMetadata(String id, org.gcube.common.storagehub.model.Metadata metadata) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
- Specified by:
setMetadatain interfaceItemManagerClient- Throws:
org.gcube.common.storagehub.model.exceptions.StorageHubException
-
-