implementing subtasks under #19669
This commit is contained in:
parent
eb703801a8
commit
2e43e8029f
11
.classpath
11
.classpath
|
@ -41,5 +41,16 @@
|
|||
<attribute name="m2e-apt" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path=".apt_generated">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path=".apt_generated_tests">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
/target/
|
||||
/.apt_generated/
|
||||
/.apt_generated_tests/
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
<wb-module deploy-name="storagehub-client-wrapper">
|
||||
<wb-resource deploy-path="/" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/.apt_generated"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
||||
|
|
|
@ -3,48 +3,57 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v0-7-1] [r4-23-0] - [2020-05-18]
|
||||
## [v1-0-0] [r4-25-0] - 2020-07-15
|
||||
|
||||
** Enhancements **
|
||||
#### Enhancements
|
||||
|
||||
[#19317] component moved from 0.y.z to 1.y.z version
|
||||
|
||||
[#19668] add the method updateDescriptionForItem
|
||||
|
||||
|
||||
## [v0-7-1] [r4-23-0] - 2020-05-18
|
||||
|
||||
#### Enhancements
|
||||
|
||||
[#19058] added the folder destination Id to restore operation
|
||||
|
||||
|
||||
## [v0-7-0] [r4-22-0] - [2020-04-16]
|
||||
## [v0-7-0] [r4-22-0] - 2020-04-16
|
||||
|
||||
** Enhancements **
|
||||
#### Enhancements
|
||||
|
||||
[Task #19087] provide a getItem (without getRoot inside) for Workspace-Explorer-App
|
||||
[#19087] provide a getItem (without getRoot inside) for Workspace-Explorer-App
|
||||
|
||||
|
||||
|
||||
## [v0-6-2] [r4-21-0] - [2020-03-11]
|
||||
## [v0-6-2] [r4-21-0] - 2020-03-11
|
||||
|
||||
** New features **
|
||||
#### New features
|
||||
|
||||
[#18174] Moved to new search facility provided by SHUB
|
||||
|
||||
|
||||
|
||||
## [0-6-1] - [2019-12-19]
|
||||
## [v0-6-1] - 2019-12-19
|
||||
|
||||
Ported to Git and Jenkins
|
||||
|
||||
|
||||
|
||||
## [0-6-0] - [2019-10-01]
|
||||
## [v0-6-0] - 2019-10-01
|
||||
|
||||
[Task #16688] Integrating new method added into SHUB
|
||||
|
||||
|
||||
|
||||
## [0-5-0] - [2019-08-01]
|
||||
## [v0-5-0] - 2019-08-01
|
||||
|
||||
Released due to exceptions thrown by SHUB
|
||||
|
||||
|
||||
|
||||
## [0-4-0] - [2019-06-01]
|
||||
## [v0-4-0] - 2019-06-01
|
||||
|
||||
Updated to new SHub interface
|
||||
|
||||
|
@ -52,7 +61,7 @@ Added method getMetadata
|
|||
|
||||
|
||||
|
||||
## [0-3-0] - [2018-03-01]
|
||||
## [v0-3-0] - 2018-03-01
|
||||
|
||||
[Task #12059] added delete item
|
||||
|
||||
|
@ -76,13 +85,13 @@ Added method getMetadata
|
|||
|
||||
|
||||
|
||||
## [0-2-0] - [2018-06-20]
|
||||
## [v0-2-0] - 2018-06-20
|
||||
|
||||
minor fixes
|
||||
|
||||
|
||||
|
||||
## [0-1-0] - [2018-06-20]
|
||||
## [v0-1-0] - 2018-06-20
|
||||
|
||||
[Task #12059] first release
|
||||
|
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
|||
</parent>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>storagehub-client-wrapper</artifactId>
|
||||
<version>0.7.1</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<name>storagehub-client-wrapper</name>
|
||||
<description>This is a wrapper of storagehub-client library. It allows to interact with storagehub in a simplified way by exposing several utilities. Moreover, It exposes by another inteface java beans as defined in (the old) HL interfaces</description>
|
||||
<scm>
|
||||
|
|
|
@ -926,6 +926,25 @@ public class StorageHubClientService {
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* Update description for item.
|
||||
*
|
||||
* @param itemId the item id
|
||||
* @param newDescription the new description
|
||||
* @return the description updated
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public String updateDescriptionForItem(String itemId, String newDescription) throws Exception {
|
||||
Validate.notNull(itemId, "Bad request the itemId is null");
|
||||
setContextProviders(scope, authorizationToken);
|
||||
|
||||
throw new Exception("Not implemented yet by SHUB");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* To string.
|
||||
*
|
||||
|
@ -949,4 +968,5 @@ public class StorageHubClientService {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -25,10 +25,7 @@ import org.gcube.common.storagehub.model.items.nodes.accounting.AccountEntry;
|
|||
import org.gcube.common.storagehub.model.service.Version;
|
||||
import org.gcube.common.storagehubwrapper.server.converter.HLMapper;
|
||||
import org.gcube.common.storagehubwrapper.server.tohl.Workspace;
|
||||
import org.gcube.common.storagehubwrapper.shared.ACLType;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItem;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceSharedFolder;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceVREFolder;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.InsufficientPrivilegesException;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.InternalErrorException;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.ItemAlreadyExistException;
|
||||
|
@ -1501,355 +1498,19 @@ public final class WorkspaceStorageHubClientService implements Workspace{
|
|||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* TODO
|
||||
*
|
||||
* FOLLOWING METHODS ARE NOT IMPLEMENTED;
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Change description.
|
||||
*
|
||||
* @param itemId the item id
|
||||
* @param newDescription the new description
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws InternalErrorException the internal error exception
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portal.storagehubwrapper.shared.Workspace#changeDescription(java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void changeDescription(String itemId, String newDescription)
|
||||
throws ItemNotFoundException, InternalErrorException {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
public String updateDescriptionForItem(String itemId, String newDescription) throws Exception {
|
||||
|
||||
String updatedDescription = null;
|
||||
try{
|
||||
updatedDescription = storageHubClientService.updateDescriptionForItem(itemId, newDescription);
|
||||
}catch(Exception e){
|
||||
String error = "Error on updating the description for item with id: "+itemId;
|
||||
LOGGER.error(error, e);
|
||||
throw new Exception(error);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Search by mime type.
|
||||
*
|
||||
* @param mimeType the mime type
|
||||
* @return the list
|
||||
* @throws InternalErrorException the internal error exception
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portal.storagehubwrapper.shared.Workspace#searchByMimeType(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public List<WorkspaceItem> searchByMimeType(String mimeType)
|
||||
throws InternalErrorException {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return updatedDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the shared folder.
|
||||
*
|
||||
* @param name the name
|
||||
* @param description the description
|
||||
* @param users the users
|
||||
* @param destinationFolderId the destination folder id
|
||||
* @return the workspace shared folder
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portal.storagehubwrapper.shared.Workspace#createSharedFolder(java.lang.String, java.lang.String, java.util.List, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public WorkspaceSharedFolder createSharedFolder(
|
||||
String name, String description, List<String> users,
|
||||
String destinationFolderId)
|
||||
throws InternalErrorException, InsufficientPrivilegesException,
|
||||
ItemAlreadyExistException, WrongDestinationException,
|
||||
ItemNotFoundException, WorkspaceFolderNotFoundException {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Share folder.
|
||||
*
|
||||
* @param users the users
|
||||
* @param destinationFolderId the destination folder id
|
||||
* @return the workspace shared folder
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portal.storagehubwrapper.shared.Workspace#shareFolder(java.util.List, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public WorkspaceSharedFolder shareFolder(
|
||||
List<String> users, String destinationFolderId)
|
||||
throws InternalErrorException, InsufficientPrivilegesException,
|
||||
ItemAlreadyExistException, WrongDestinationException,
|
||||
ItemNotFoundException, WorkspaceFolderNotFoundException {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Share.
|
||||
*
|
||||
* @param users the users
|
||||
* @param itemId the item id
|
||||
* @return the workspace shared folder
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portal.storagehubwrapper.shared.Workspace#share(java.util.List, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public WorkspaceSharedFolder share(List<String> users, String itemId)
|
||||
throws InternalErrorException, InsufficientPrivilegesException,
|
||||
ItemAlreadyExistException, WrongDestinationException,
|
||||
ItemNotFoundException, WorkspaceFolderNotFoundException {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the gcube item.
|
||||
*
|
||||
* @param name the name
|
||||
* @param description the description
|
||||
* @param scopes the scopes
|
||||
* @param creator the creator
|
||||
* @param itemType the item type
|
||||
* @param properties the properties
|
||||
* @param destinationFolderId the destination folder id
|
||||
* @return the workspace item
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portal.storagehubwrapper.shared.Workspace#createGcubeItem(java.lang.String, java.lang.String, java.util.List, java.lang.String, java.lang.String, java.util.Map, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public WorkspaceItem createGcubeItem(
|
||||
String name, String description, List<String> scopes, String creator,
|
||||
String itemType, Map<String, String> properties,
|
||||
String destinationFolderId)
|
||||
throws InsufficientPrivilegesException,
|
||||
WorkspaceFolderNotFoundException, InternalErrorException,
|
||||
ItemAlreadyExistException, WrongDestinationException,
|
||||
ItemNotFoundException {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unshare.
|
||||
*
|
||||
* @param itemId the item id
|
||||
* @return the workspace item
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portal.storagehubwrapper.shared.Workspace#unshare(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public WorkspaceItem unshare(String itemId)
|
||||
throws InternalErrorException, ItemNotFoundException {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the my special folders.
|
||||
*
|
||||
* @return the my special folders
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portal.storagehubwrapper.shared.Workspace#getMySpecialFolders()
|
||||
*/
|
||||
@Override
|
||||
public WorkspaceFolder getMySpecialFolders()
|
||||
throws InternalErrorException, ItemNotFoundException {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search by properties.
|
||||
*
|
||||
* @param properties the properties
|
||||
* @return the list
|
||||
* @throws InternalErrorException the internal error exception
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portal.storagehubwrapper.shared.Workspace#searchByProperties(java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public List<WorkspaceItem> searchByProperties(List<String> properties)
|
||||
throws InternalErrorException {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the VRE folder.
|
||||
*
|
||||
* @param scope the scope
|
||||
* @param description the description
|
||||
* @param displayName the display name
|
||||
* @param privilege the privilege
|
||||
* @return the workspace VRE folder
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portal.storagehubwrapper.shared.Workspace#createVREFolder(java.lang.String, java.lang.String, java.lang.String, org.gcube.portal.storagehubwrapper.shared.ACLType)
|
||||
*/
|
||||
@Override
|
||||
public WorkspaceVREFolder createVREFolder(
|
||||
String scope, String description, String displayName, ACLType privilege)
|
||||
throws InternalErrorException, InsufficientPrivilegesException,
|
||||
ItemAlreadyExistException, WrongDestinationException,
|
||||
ItemNotFoundException, WorkspaceFolderNotFoundException {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the public folders.
|
||||
*
|
||||
* @return the public folders
|
||||
* @throws InternalErrorException the internal error exception
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portal.storagehubwrapper.shared.Workspace#getPublicFolders()
|
||||
*/
|
||||
@Override
|
||||
public List<WorkspaceItem> getPublicFolders()
|
||||
throws InternalErrorException {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -10,11 +10,9 @@ import java.util.Map;
|
|||
|
||||
import org.gcube.common.storagehub.model.items.Item;
|
||||
import org.gcube.common.storagehub.model.items.nodes.accounting.AccountEntry;
|
||||
import org.gcube.common.storagehubwrapper.shared.ACLType;
|
||||
import org.gcube.common.storagehubwrapper.server.WorkspaceStorageHubClientService;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceFolder;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItem;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceSharedFolder;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceVREFolder;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.InsufficientPrivilegesException;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.InternalErrorException;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.ItemAlreadyExistException;
|
||||
|
@ -27,8 +25,6 @@ import org.gcube.common.storagehubwrapper.shared.tohl.items.ItemStreamDescriptor
|
|||
import org.gcube.common.storagehubwrapper.shared.tohl.items.PropertyMap;
|
||||
import org.gcube.common.storagehubwrapper.shared.tohl.items.URLItem;
|
||||
|
||||
|
||||
|
||||
// TODO: Auto-generated Javadoc
|
||||
/**
|
||||
* The Interface Workspace.
|
||||
|
@ -40,7 +36,6 @@ import org.gcube.common.storagehubwrapper.shared.tohl.items.URLItem;
|
|||
*/
|
||||
public interface Workspace {
|
||||
|
||||
|
||||
/**
|
||||
* Gets the owner.
|
||||
*
|
||||
|
@ -59,7 +54,6 @@ public interface Workspace{
|
|||
*/
|
||||
public WorkspaceFolder getRoot() throws InternalErrorException, Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the children.
|
||||
*
|
||||
|
@ -69,7 +63,6 @@ public interface Workspace{
|
|||
*/
|
||||
public List<? extends WorkspaceItem> getChildren(String id) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the parents by id.
|
||||
*
|
||||
|
@ -91,7 +84,6 @@ public interface Workspace{
|
|||
*/
|
||||
public WorkspaceItem getItem(String itemId) throws ItemNotFoundException, InternalErrorException, Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Return the item with the specified id.
|
||||
*
|
||||
|
@ -104,26 +96,34 @@ public interface Workspace{
|
|||
* @throws InternalErrorException the internal error exception
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public WorkspaceItem getItem(String itemId, boolean withAccounting, boolean withFileDetails, boolean withMapProperties) throws ItemNotFoundException, InternalErrorException, Exception;
|
||||
|
||||
public WorkspaceItem getItem(String itemId, boolean withAccounting, boolean withFileDetails,
|
||||
boolean withMapProperties) throws ItemNotFoundException, InternalErrorException, Exception;
|
||||
|
||||
/**
|
||||
* Create a new folder with specified name.
|
||||
* The new folder is created into the specified folder.
|
||||
* Create a new folder with specified name. The new folder is created into the
|
||||
* specified folder.
|
||||
*
|
||||
* @param name the folder name.
|
||||
* @param description the folder description.
|
||||
* @param destinationFolderId the destination folder.
|
||||
* @return the new folder.
|
||||
* @throws InternalErrorException if an internal error occurs.
|
||||
* @throws InsufficientPrivilegesException if the user don't have sufficient privileges to perform this operation.
|
||||
* @throws ItemAlreadyExistException if an item with the same exist in the destination folder.
|
||||
* @throws WrongDestinationException if the destination item is not a folder.
|
||||
* @throws ItemNotFoundException if the destination folder has not been found.
|
||||
* @throws WorkspaceFolderNotFoundException if the destination folder has not been found.
|
||||
* @throws InsufficientPrivilegesException if the user don't have sufficient
|
||||
* privileges to perform this
|
||||
* operation.
|
||||
* @throws ItemAlreadyExistException if an item with the same exist in
|
||||
* the destination folder.
|
||||
* @throws WrongDestinationException if the destination item is not a
|
||||
* folder.
|
||||
* @throws ItemNotFoundException if the destination folder has not
|
||||
* been found.
|
||||
* @throws WorkspaceFolderNotFoundException if the destination folder has not
|
||||
* been found.
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public WorkspaceFolder createFolder(String name, String description, String destinationFolderId) throws InternalErrorException, InsufficientPrivilegesException, ItemAlreadyExistException, WrongDestinationException, ItemNotFoundException, WorkspaceFolderNotFoundException, Exception;
|
||||
public WorkspaceFolder createFolder(String name, String description, String destinationFolderId)
|
||||
throws InternalErrorException, InsufficientPrivilegesException, ItemAlreadyExistException,
|
||||
WrongDestinationException, ItemNotFoundException, WorkspaceFolderNotFoundException, Exception;
|
||||
|
||||
/**
|
||||
* Create a new folder with properties.
|
||||
|
@ -134,14 +134,18 @@ public interface Workspace{
|
|||
* @param properties the properties
|
||||
* @return the new folder
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges
|
||||
* exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found
|
||||
* exception
|
||||
*/
|
||||
public WorkspaceFolder createFolder(String name, String description, String destinationFolderId, Map<String, String> properties) throws InternalErrorException, InsufficientPrivilegesException, ItemAlreadyExistException, WrongDestinationException, ItemNotFoundException, WorkspaceFolderNotFoundException;
|
||||
|
||||
public WorkspaceFolder createFolder(String name, String description, String destinationFolderId,
|
||||
Map<String, String> properties)
|
||||
throws InternalErrorException, InsufficientPrivilegesException, ItemAlreadyExistException,
|
||||
WrongDestinationException, ItemNotFoundException, WorkspaceFolderNotFoundException;
|
||||
|
||||
/**
|
||||
* Upload file.
|
||||
|
@ -153,7 +157,8 @@ public interface Workspace{
|
|||
* @return the workspace item
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public WorkspaceItem uploadFile(String folderId, InputStream inputStream, String fileName, String fileDescription) throws Exception;
|
||||
public WorkspaceItem uploadFile(String folderId, InputStream inputStream, String fileName, String fileDescription)
|
||||
throws Exception;
|
||||
|
||||
/**
|
||||
* Gets the shared folder members.
|
||||
|
@ -164,29 +169,33 @@ public interface Workspace{
|
|||
*/
|
||||
public List<String> getSharedFolderMembers(String folderid) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Check if an item with the specified name exists in the specified folder.
|
||||
*
|
||||
* @param name the name to check.
|
||||
* @param folderId the folder where to search the item.
|
||||
* @return <code>true</code> if the item exists, <code>false</code> otherwise.
|
||||
* @throws InternalErrorException if an error occurs.
|
||||
* @throws ItemNotFoundException if the folder has not been found.
|
||||
* @throws WrongItemTypeException if the folderId referrer to an item with type different from Workspace or folder.
|
||||
* @throws WrongItemTypeException if the folderId referrer to an item with type
|
||||
* different from Workspace or folder.
|
||||
*/
|
||||
public boolean exists(String name, String folderId) throws InternalErrorException, ItemNotFoundException, WrongItemTypeException;
|
||||
public boolean exists(String name, String folderId)
|
||||
throws InternalErrorException, ItemNotFoundException, WrongItemTypeException;
|
||||
|
||||
/**
|
||||
* Get an item with the specified name in the specified folder.
|
||||
*
|
||||
* @param name the item name to find.
|
||||
* @param folderId the folder where to search the item.
|
||||
* @return the item if the item is found, <code>null</code> otherwise.
|
||||
* @throws InternalErrorException if an error occurs.
|
||||
* @throws ItemNotFoundException if the folder has not been found.
|
||||
* @throws WrongItemTypeException if the folderId referrer to an item with type different from Workspace or folder.
|
||||
* @throws WrongItemTypeException if the folderId referrer to an item with type
|
||||
* different from Workspace or folder.
|
||||
*/
|
||||
public List<WorkspaceItem> find(String name, String folderId) throws InternalErrorException, ItemNotFoundException, WrongItemTypeException;
|
||||
|
||||
public List<WorkspaceItem> find(String name, String folderId)
|
||||
throws InternalErrorException, ItemNotFoundException, WrongItemTypeException;
|
||||
|
||||
/**
|
||||
* Gets the root shared folder.
|
||||
|
@ -197,8 +206,6 @@ public interface Workspace{
|
|||
*/
|
||||
public WorkspaceItem getRootSharedFolder(String itemId) throws Exception;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Checks if is item shared.
|
||||
*
|
||||
|
@ -208,7 +215,6 @@ public interface Workspace{
|
|||
*/
|
||||
public boolean isItemShared(String itemId) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the VRE folders id.
|
||||
*
|
||||
|
@ -227,7 +233,6 @@ public interface Workspace{
|
|||
*/
|
||||
public WorkspaceItem getTrash() throws InternalErrorException, ItemNotFoundException, Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Empty trash.
|
||||
*
|
||||
|
@ -235,7 +240,6 @@ public interface Workspace{
|
|||
*/
|
||||
public void emptyTrash() throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Restore thrash item.
|
||||
*
|
||||
|
@ -246,7 +250,6 @@ public interface Workspace{
|
|||
*/
|
||||
public WorkspaceItem restoreThrashItem(String itemId, String destinationFolderId) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the filtered children.
|
||||
*
|
||||
|
@ -257,8 +260,6 @@ public interface Workspace{
|
|||
*/
|
||||
public List<? extends WorkspaceItem> getFilteredChildren(String id, Class<? extends Item> aType) throws Exception;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Rename an item.
|
||||
*
|
||||
|
@ -267,12 +268,13 @@ public interface Workspace{
|
|||
* @return the workspace item
|
||||
* @throws ItemNotFoundException if the item has not been found.
|
||||
* @throws InternalErrorException if an internal error occurs.
|
||||
* @throws ItemAlreadyExistException if the user don't have sufficient privileges to perform this operation.
|
||||
* @throws ItemAlreadyExistException if the user don't have sufficient
|
||||
* privileges to perform this operation.
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public WorkspaceItem renameItem(String itemId, String newName) throws ItemNotFoundException, InternalErrorException, ItemAlreadyExistException, InsufficientPrivilegesException, Exception;
|
||||
|
||||
public WorkspaceItem renameItem(String itemId, String newName) throws ItemNotFoundException, InternalErrorException,
|
||||
ItemAlreadyExistException, InsufficientPrivilegesException, Exception;
|
||||
|
||||
/**
|
||||
* Gets the public link to the latest version of file item.
|
||||
|
@ -293,7 +295,6 @@ public interface Workspace{
|
|||
*/
|
||||
public URL getPublicLinkForFile(String fileItemId, String version) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the list versions for file.
|
||||
*
|
||||
|
@ -303,7 +304,6 @@ public interface Workspace{
|
|||
*/
|
||||
public List<WorkspaceFileVersion> getListVersionsForFile(String fileItemId) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the thumbnail data.
|
||||
*
|
||||
|
@ -313,7 +313,6 @@ public interface Workspace{
|
|||
*/
|
||||
public ItemStreamDescriptor getThumbnailData(String itemId) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the metadata.
|
||||
*
|
||||
|
@ -323,7 +322,6 @@ public interface Workspace{
|
|||
*/
|
||||
public Map<String, Object> getMetadata(String itemId) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Get the disk usage of a worskpace.
|
||||
*
|
||||
|
@ -340,7 +338,6 @@ public interface Workspace{
|
|||
*/
|
||||
public long getTotalItems() throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the accounting.
|
||||
*
|
||||
|
@ -350,7 +347,6 @@ public interface Workspace{
|
|||
*/
|
||||
public List<AccountEntry> getAccounting(String itemId) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Gets the gcube item properties.
|
||||
*
|
||||
|
@ -360,7 +356,6 @@ public interface Workspace{
|
|||
*/
|
||||
public PropertyMap getGcubeItemProperties(String gcubeItemId) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Update metadata.
|
||||
*
|
||||
|
@ -370,7 +365,6 @@ public interface Workspace{
|
|||
*/
|
||||
public void updateMetadata(String itemId, Map<String, Object> mapObjs) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Creates the URL.
|
||||
*
|
||||
|
@ -383,7 +377,6 @@ public interface Workspace{
|
|||
*/
|
||||
public URLItem createURL(String name, String description, String url, String destinationFolderId) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Sets the folder as public.
|
||||
*
|
||||
|
@ -394,7 +387,6 @@ public interface Workspace{
|
|||
*/
|
||||
public boolean setFolderAsPublic(String folderId, boolean bool) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Move items.
|
||||
*
|
||||
|
@ -409,10 +401,8 @@ public interface Workspace{
|
|||
* @throws Exception the exception
|
||||
*/
|
||||
List<WorkspaceItem> moveItems(List<String> itemIds, String folderDestinationId)
|
||||
throws ItemNotFoundException, WrongDestinationException,
|
||||
InsufficientPrivilegesException, InternalErrorException,
|
||||
ItemAlreadyExistException, Exception;
|
||||
|
||||
throws ItemNotFoundException, WrongDestinationException, InsufficientPrivilegesException,
|
||||
InternalErrorException, ItemAlreadyExistException, Exception;
|
||||
|
||||
/**
|
||||
* Delete item.
|
||||
|
@ -423,16 +413,21 @@ public interface Workspace{
|
|||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
/* Delete item.
|
||||
/*
|
||||
* Delete item.
|
||||
*
|
||||
* @param itemId the item id
|
||||
*
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
*
|
||||
* @throws InternalErrorException the internal error exception
|
||||
*
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public void deleteItem(String itemId) throws ItemNotFoundException, InternalErrorException, InsufficientPrivilegesException, Exception;
|
||||
|
||||
public void deleteItem(String itemId)
|
||||
throws ItemNotFoundException, InternalErrorException, InsufficientPrivilegesException, Exception;
|
||||
|
||||
/**
|
||||
* Move item.
|
||||
|
@ -442,14 +437,17 @@ public interface Workspace{
|
|||
* @return the workspace item
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges
|
||||
* exception
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found
|
||||
* exception
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public WorkspaceItem moveItem(String itemId, String destinationFolderId) throws ItemNotFoundException, WrongDestinationException, InsufficientPrivilegesException, InternalErrorException, ItemAlreadyExistException, WorkspaceFolderNotFoundException, Exception;
|
||||
|
||||
public WorkspaceItem moveItem(String itemId, String destinationFolderId)
|
||||
throws ItemNotFoundException, WrongDestinationException, InsufficientPrivilegesException,
|
||||
InternalErrorException, ItemAlreadyExistException, WorkspaceFolderNotFoundException, Exception;
|
||||
|
||||
/**
|
||||
* Copy file.
|
||||
|
@ -465,11 +463,9 @@ public interface Workspace{
|
|||
* @throws Exception the exception
|
||||
*/
|
||||
WorkspaceItem copyFile(String itemId, String folderDestinationId)
|
||||
throws ItemNotFoundException, WrongDestinationException,
|
||||
InternalErrorException, ItemAlreadyExistException,
|
||||
throws ItemNotFoundException, WrongDestinationException, InternalErrorException, ItemAlreadyExistException,
|
||||
InsufficientPrivilegesException, Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Copy file items.
|
||||
*
|
||||
|
@ -483,10 +479,8 @@ public interface Workspace{
|
|||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
List<WorkspaceItem> copyFileItems(
|
||||
List<String> itemIds, String folderDestinationId)
|
||||
throws ItemNotFoundException, WrongDestinationException,
|
||||
InternalErrorException, ItemAlreadyExistException,
|
||||
List<WorkspaceItem> copyFileItems(List<String> itemIds, String folderDestinationId)
|
||||
throws ItemNotFoundException, WrongDestinationException, InternalErrorException, ItemAlreadyExistException,
|
||||
InsufficientPrivilegesException, Exception;
|
||||
|
||||
/**
|
||||
|
@ -498,8 +492,6 @@ public interface Workspace{
|
|||
*/
|
||||
boolean canUserWriteIntoFolder(String folderId) throws Exception;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Search.
|
||||
*
|
||||
|
@ -529,8 +521,10 @@ public interface Workspace{
|
|||
boolean withMapProperties) throws ItemNotFoundException, InternalErrorException, Exception;
|
||||
|
||||
/**
|
||||
* Gets the parents for explorer by id. This call is the same of {@link WorkspaceStorageHubClientService#getParentsById(String)}
|
||||
* except to getRoot called inside (to check if a parent is root or not). {@link WorkspaceItem#isRoot()} returns always false.
|
||||
* Gets the parents for explorer by id. This call is the same of
|
||||
* {@link WorkspaceStorageHubClientService#getParentsById(String)} except to
|
||||
* getRoot called inside (to check if a parent is root or not).
|
||||
* {@link WorkspaceItem#isRoot()} returns always false.
|
||||
*
|
||||
* @param id the id
|
||||
* @return the parents for explorer by id
|
||||
|
@ -539,257 +533,19 @@ public interface Workspace{
|
|||
*/
|
||||
List<? extends WorkspaceItem> getParentsForExplorerById(String id) throws InternalErrorException, Exception;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* TODO
|
||||
*
|
||||
* FOLLOWING METHODS ARE NOT IMPLEMENTED;
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Change an item description.
|
||||
* @param itemId the item to update.
|
||||
* @param newDescription the new item description.
|
||||
* @throws ItemNotFoundException if the item has not been found.
|
||||
* @throws InternalErrorException if an internal error occurs.
|
||||
*/
|
||||
public void changeDescription(String itemId, String newDescription) throws ItemNotFoundException, InternalErrorException;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Search By MimeType.
|
||||
*
|
||||
* @param mimeType the mime type
|
||||
* @return a list of SearchFolderItem
|
||||
* @throws InternalErrorException the internal error exception
|
||||
*/
|
||||
public List<WorkspaceItem> searchByMimeType(String mimeType)
|
||||
throws InternalErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* Create a shared folder with a list of users.
|
||||
*
|
||||
* @param name the name
|
||||
* @param description the description
|
||||
* @param users A list of portal logins
|
||||
* @param destinationFolderId the destination folder id
|
||||
* @return the shared folder
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
*/
|
||||
public WorkspaceSharedFolder createSharedFolder(String name, String description,
|
||||
List<String> users, String destinationFolderId)
|
||||
throws InternalErrorException, InsufficientPrivilegesException,
|
||||
ItemAlreadyExistException, WrongDestinationException,
|
||||
ItemNotFoundException, WorkspaceFolderNotFoundException;
|
||||
|
||||
|
||||
/**
|
||||
* Shared an exist {@link WorkspaceFolder} with a list of users.
|
||||
*
|
||||
* @param users A list of portal logins.
|
||||
* @param destinationFolderId the destination folder id
|
||||
* @return the shared folder
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
*/
|
||||
public WorkspaceSharedFolder shareFolder(List<String> users, String destinationFolderId)
|
||||
throws InternalErrorException, InsufficientPrivilegesException,
|
||||
ItemAlreadyExistException, WrongDestinationException,
|
||||
ItemNotFoundException, WorkspaceFolderNotFoundException;
|
||||
|
||||
|
||||
/**
|
||||
* Shared an exist {@link WorkspaceFolder} with a list of users.
|
||||
*
|
||||
* @param users A list of portal logins.
|
||||
* @param itemId the item id
|
||||
* @return the shared folder
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
*/
|
||||
public WorkspaceSharedFolder share(List<String> users, String itemId)
|
||||
throws InternalErrorException, InsufficientPrivilegesException,
|
||||
ItemAlreadyExistException, WrongDestinationException,
|
||||
ItemNotFoundException, WorkspaceFolderNotFoundException;
|
||||
|
||||
/**
|
||||
* Create a GCubeItem.
|
||||
*
|
||||
* @param name the name
|
||||
* @param description the description
|
||||
* @param scopes the scopes
|
||||
* @param creator the creator
|
||||
* @param itemType the item type
|
||||
* @param properties the properties
|
||||
* @param destinationFolderId the destination folder id
|
||||
* @return a GCubeItem
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
*/
|
||||
public WorkspaceItem createGcubeItem(String name, String description,
|
||||
List<String> scopes, String creator, String itemType, Map<String, String> properties,
|
||||
String destinationFolderId) throws InsufficientPrivilegesException,
|
||||
WorkspaceFolderNotFoundException, InternalErrorException,
|
||||
ItemAlreadyExistException, WrongDestinationException, ItemNotFoundException;
|
||||
|
||||
/**
|
||||
* Unshare a shared item.
|
||||
* Download file.
|
||||
*
|
||||
* @param itemId the item id
|
||||
* @return the workspace item
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @param fileName the file name
|
||||
* @param versionName the version name. If is null or empty returns the
|
||||
* latest version of file
|
||||
* @param nodeIdsToExclude the node ids to exclude
|
||||
* @return the item stream descriptor
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public WorkspaceItem unshare(String itemId) throws InternalErrorException, ItemNotFoundException;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get MySpecialFolders.
|
||||
*
|
||||
* @return my special folders
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
*/
|
||||
public WorkspaceFolder getMySpecialFolders() throws InternalErrorException, ItemNotFoundException;
|
||||
|
||||
|
||||
/**
|
||||
* Search By Properties.
|
||||
*
|
||||
* @param properties the properties
|
||||
* @return a list of WorkspaceItem
|
||||
* @throws InternalErrorException the internal error exception
|
||||
*/
|
||||
public List<WorkspaceItem> searchByProperties(List<String> properties)
|
||||
throws InternalErrorException;
|
||||
|
||||
|
||||
/**
|
||||
* Removes the items.
|
||||
*
|
||||
* @param id the id
|
||||
* @return the map of errors (id,error)
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
*/
|
||||
public Map<String, String> removeItems(String... id) throws ItemNotFoundException,
|
||||
InternalErrorException, InsufficientPrivilegesException;
|
||||
|
||||
|
||||
/**
|
||||
* Create a VRE folder.
|
||||
*
|
||||
* @param scope the scope
|
||||
* @param description the description
|
||||
* @param displayName the display name
|
||||
* @param privilege the privilege
|
||||
* @return a new VRE folder
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
* @throws ItemAlreadyExistException the item already exist exception
|
||||
* @throws WrongDestinationException the wrong destination exception
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws WorkspaceFolderNotFoundException the workspace folder not found exception
|
||||
*/
|
||||
public WorkspaceVREFolder createVREFolder(String scope, String description,
|
||||
String displayName, ACLType privilege) throws InternalErrorException,
|
||||
InsufficientPrivilegesException, ItemAlreadyExistException,
|
||||
WrongDestinationException, ItemNotFoundException,
|
||||
WorkspaceFolderNotFoundException;
|
||||
|
||||
|
||||
/**
|
||||
* Get public folders.
|
||||
*
|
||||
* @return a list of public folder
|
||||
* @throws InternalErrorException the internal error exception
|
||||
*/
|
||||
List<WorkspaceItem> getPublicFolders() throws InternalErrorException;
|
||||
|
||||
ItemStreamDescriptor downloadFile(String itemId, String fileName, String versionName, String nodeIdsToExclude)
|
||||
throws Exception;
|
||||
|
||||
/**
|
||||
* Upload archive.
|
||||
|
@ -800,24 +556,7 @@ public interface Workspace{
|
|||
* @return the workspace item
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
WorkspaceItem uploadArchive(
|
||||
String folderId, InputStream is, String extractionFolderName)
|
||||
throws Exception;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Download file.
|
||||
*
|
||||
* @param itemId the item id
|
||||
* @param fileName the file name
|
||||
* @param versionName the version name. If is null or empty returns the latest version of file
|
||||
* @param nodeIdsToExclude the node ids to exclude
|
||||
* @return the item stream descriptor
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
ItemStreamDescriptor downloadFile(String itemId, String fileName, String versionName, String nodeIdsToExclude) throws Exception;
|
||||
|
||||
WorkspaceItem uploadArchive(String folderId, InputStream is, String extractionFolderName) throws Exception;
|
||||
|
||||
/**
|
||||
* Download folder.
|
||||
|
@ -828,9 +567,29 @@ public interface Workspace{
|
|||
* @return the item stream descriptor
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
ItemStreamDescriptor downloadFolder(
|
||||
String folderId, String folderName, String nodeIdsToExclude)
|
||||
throws Exception;
|
||||
ItemStreamDescriptor downloadFolder(String folderId, String folderName, String nodeIdsToExclude) throws Exception;
|
||||
|
||||
/**
|
||||
* Removes the items.
|
||||
*
|
||||
* @param id the id
|
||||
* @return the map of errors (id,error)
|
||||
* @throws ItemNotFoundException the item not found exception
|
||||
* @throws InternalErrorException the internal error exception
|
||||
* @throws InsufficientPrivilegesException the insufficient privileges exception
|
||||
*/
|
||||
public Map<String, String> removeItems(String... id)
|
||||
throws ItemNotFoundException, InternalErrorException, InsufficientPrivilegesException;
|
||||
|
||||
/**
|
||||
* Update description for item.
|
||||
*
|
||||
* @param itemId the item id
|
||||
* @param newDescription the new description
|
||||
* @return the description updated read by SHUB
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public String updateDescriptionForItem(String itemId, String newDescription) throws Exception;
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue