public class FolderContainer extends ItemContainer<org.gcube.common.storagehub.model.items.FolderItem>
item, itemclient, itemId| Modifier | Constructor and Description |
|---|---|
protected |
FolderContainer(ItemManagerClient itemclient,
org.gcube.common.storagehub.model.items.FolderItem item) |
protected |
FolderContainer(ItemManagerClient itemclient,
String folderId) |
| Modifier and Type | Method and Description |
|---|---|
URLContainer |
addUrl(URL url,
String name,
String description)
creates a inside the folder represented by this FolderContainer
|
boolean |
canWrite() |
FolderContainer |
changeAcls(String user,
org.gcube.common.storagehub.model.acls.AccessType accessType)
changes of the {FolderItem} represented by this FolderContainer for a user
|
ListResolver |
findByName(String namePattern)
returns the children of this that matches the name pattern
|
List<org.gcube.common.storagehub.model.acls.ACL> |
getAcls()
returns the of the {FolderItem} represented by this FolderContainer
|
ContainerType |
getType() |
ListResolverTyped |
list()
returns the children of this
By default this method return all FolderContainers (asContainers) or Items (asItems) without accounting data, content data and metadata of the item
to add these information see
|
FolderContainer |
newFolder(String name,
String description)
create a new inside the represented by this FolderContainer
|
GenericItemContainer |
newGcubeItem(org.gcube.common.storagehub.model.items.GCubeItem item)
create a new hidden Folder inside the folder represented by this FolderContainer
|
FolderContainer |
newHiddenFolder(String name,
String description)
create a new hidden inside the folder represented by this FolderContainer
|
OpenResolver |
openByRelativePath(String relativePath)
returns the children of this that matches the name pattern
|
FolderContainer |
publish()
makes this Folder public.
|
ListResolver |
search(String nameTomatch)
returns the items that matches the name pattern searching recursively on all subfolders
|
ListResolver |
search(String nameTomatch,
boolean excludeTrashed)
returns the items that matches the name pattern searching recursively on all subfolders filtering the trashed Items
|
FolderContainer |
share(Set<String> users,
org.gcube.common.storagehub.model.acls.AccessType accessType)
shares this Folder with a list of users setting the same for everyone in the list.
|
FolderContainer |
unpublish()
unpublish this Folder.
|
FolderContainer |
unshare(Set<String> users)
remove share from this Folder for a list of users, for everyone or only for the caller.
|
FolderContainer |
uploadArchive(InputStream stream,
String extractionFolderName)
creates a set of in the workspace extracting the Archive
|
FileContainer |
uploadFile(InputStream stream,
String filename,
String description)
creates a inside the folder represented by this FolderContainer
|
delete, download, forceDelete, get, getAnchestors, getId, getRootSharedFolder, invalidateItem, move, rename, setHidden, setItem, setMetadata, setVisibleprotected FolderContainer(ItemManagerClient itemclient, org.gcube.common.storagehub.model.items.FolderItem item)
protected FolderContainer(ItemManagerClient itemclient, String folderId)
public ContainerType getType()
getType in class ItemContainer<org.gcube.common.storagehub.model.items.FolderItem>public ListResolverTyped list() throws org.gcube.common.storagehub.model.exceptions.StorageHubException
{@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to read this folderorg.gcube.common.storagehub.model.exceptions.StorageHubExceptionpublic FileContainer uploadFile(InputStream stream, String filename, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
stream - the file streamfilename - the name of the item in the workspacedescription - the description of the item in the workspace{@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to write in this folderorg.gcube.common.storagehub.model.exceptions.StorageHubExceptionpublic URLContainer addUrl(URL url, String name, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
url - the urlname - the name of the item in the workspacedescription - the description of the item in the workspace{@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to write in this folderorg.gcube.common.storagehub.model.exceptions.StorageHubExceptionpublic FolderContainer uploadArchive(InputStream stream, String extractionFolderName) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
stream - the file streamextractionFolderName - the root name of the folder where the archive will be extracted (A new folder with this name will be created){@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to write in this folderorg.gcube.common.storagehub.model.exceptions.StorageHubExceptionpublic FolderContainer newFolder(String name, String description) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
name - the name of the folderdescription - the description of the folder{@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to write in this folderorg.gcube.common.storagehub.model.exceptions.StorageHubExceptionpublic FolderContainer newHiddenFolder(String name, String description) throws Exception
name - the name of the folderdescription - the description of the folder{@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to write in this folderExceptionpublic GenericItemContainer newGcubeItem(org.gcube.common.storagehub.model.items.GCubeItem item) throws Exception
name - the name of the folderdescription - the description of the folder{@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to write in this folderExceptionpublic List<org.gcube.common.storagehub.model.acls.ACL> getAcls() throws Exception
{@StorageHubException}Exceptionpublic FolderContainer changeAcls(String user, org.gcube.common.storagehub.model.acls.AccessType accessType) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
{@InvalidItemException}{@UserNotAuthorizedException} - if user is not administrator of this folderorg.gcube.common.storagehub.model.exceptions.StorageHubExceptionpublic ListResolver findByName(String namePattern) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
{@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to read this folderorg.gcube.common.storagehub.model.exceptions.StorageHubExceptionpublic OpenResolver openByRelativePath(String relativePath) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
{@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to read this folderorg.gcube.common.storagehub.model.exceptions.StorageHubExceptionpublic ListResolver search(String nameTomatch, boolean excludeTrashed) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
{@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to read this folderorg.gcube.common.storagehub.model.exceptions.StorageHubExceptionpublic ListResolver search(String nameTomatch) throws org.gcube.common.storagehub.model.exceptions.StorageHubException
{@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to read this folderorg.gcube.common.storagehub.model.exceptions.StorageHubExceptionpublic FolderContainer share(Set<String> users, org.gcube.common.storagehub.model.acls.AccessType accessType) throws Exception
{@InvalidItemException}{@UserNotAuthorizedException} - if user is not authorized to share this folderExceptionpublic FolderContainer unshare(Set<String> users) throws Exception
{@InvalidItemException} - if this folder is not share{@UserNotAuthorizedException} - if user is not authorized to unshare this folderExceptionpublic FolderContainer unpublish() throws Exception
{@InvalidCallParameter} - if this is not a Folder{@UserNotAuthorizedException} - if user is not authorized to unpublish this folderExceptionpublic FolderContainer publish() throws Exception
{@InvalidCallParameter} - if this is not a Folder{@UserNotAuthorizedException} - if user is not authorized to publish this folderExceptionCopyright © 2020. All Rights Reserved.