org.gcube.portlets.user.homelibrary.home.workspace
Interface Workspace

All Superinterfaces:
WorkspaceEventSource

public interface Workspace
extends WorkspaceEventSource

Author:
antonio

Method Summary
 void changeDescription(String itemId, String newDescription)
          Change an item description.
 WorkspaceItem cloneItem(String itemId, String cloneName)
          Clone an item in the same folder.
 WorkspaceItem copy(String itemId, String destinationFolderId)
          Copy an item from a folder to another folder.
 WorkspaceItem copy(String itemId, String newName, String destinationFolderId)
          Copy an item from a folder to another folder.
 Annotation createAnnotation(String name, String description, String oid, Map<String,String> data, String destinationfolderId)
          Create a new annotation.
 WorkspaceFolder createAquaMapsItem(String name, String description, String mapName, String mapType, String author, int numberOfSpecies, String boundingBox, float psoThreshold, int numberOfGeneratedImages, InputStream metadata, Map<String,InputStream> images, String destinationfolderId)
          Create a new AquaMaps Item into a folder.
 Document createDocument(String name, String description, String oid, String mimeType, InputStream documentData, Map<String,String> metadata, Map<String,String> annotations, String collectionName, String destinationfolderId)
          Create a new document into a folder.
 DocumentLink createDocumentLink(String name, String description, String oid, Map<String,String> metadata, Map<String,String> annotations, String collectionName, String mimeType, String destinationfolderId)
          Create a new document link into a folder.
 ExternalFile createExternalFile(String name, String description, String mimeType, InputStream fileData, String destinationFolderId)
          Create a new External File into a folder.
 ExternalImage createExternalImage(String name, String description, String mimeType, InputStream imageData, String destinationFolderId)
          Create a new External Image into a folder.
 ExternalPDFFile createExternalPDFFile(String name, String description, String mimeType, InputStream fileData, String destinationFolderId)
          Create a new External PDF File into a folder.
 ExternalResourceLink createExternalResourceLink(String name, String description, String mimeType, String resourceId, String pluginName, String destinationFolderId)
           
 ExternalUrl createExternalUrl(String name, String description, InputStream url, String destinationfolderId)
          Create a new External URL into a folder.
 ExternalUrl createExternalUrl(String name, String description, String url, String destinationFolderId)
          Create a new External URL into a folder.
 WorkspaceFolder createFolder(String name, String description, String destinationFolderId)
          Create a new folder with specified name.
 ImageDocument createImageDocument(String name, String description, String oid, String mimeType, InputStream imageData, Map<String,String> metadata, Map<String,String> annotations, String collectionName, String destinationfolderId)
          Create a new Image Document into a folder.
 ImageDocumentLink createImageDocumentLink(String name, String description, String oid, Map<String,String> metadata, Map<String,String> annotations, String collectionName, String mimeType, String destinationfolderId)
          Create a new Image Document link into a folder.
 Metadata createMetadata(String name, String description, String oid, String schema, String language, String data, String collectionName, String destinationfolderId)
          Create a new metadata info object.
 PDFDocument createPDFDocument(String name, String description, String oid, String mimeType, InputStream data, Map<String,String> metadata, Map<String,String> annotations, String collectionName, String destinationfolderId)
          Create a new PDF Document into a folder.
 PDFDocumentLink createPDFDocumentLink(String name, String description, String oid, Map<String,String> metadata, Map<String,String> annotations, String collectionName, String mimeType, String destinationfolderId)
          Create a new PDF Document link into a folder.
 Query createQuery(String name, String description, InputStream query, QueryType queryType, String destinationfolderId)
          Create a new query into a folder.
 Query createQuery(String name, String description, String query, QueryType queryType, String destinationfolderId)
          Create a new query into a folder.
 Report createReport(String name, String description, Calendar created, Calendar lastEdit, String author, String lastEditBy, String templateName, int numberOfSections, String status, InputStream reportData, String destinationfolderId)
          Create a new Report into a folder.
 ReportTemplate createReportTemplate(String name, String description, Calendar created, Calendar lastEdit, String author, String lastEditBy, int numberOfSections, String status, InputStream templateData, String destinationfolderId)
          Create a new Report Template into a folder.
 WorkspaceSharedFolder createSharedFolder(String name, String description, List<String> users, String destinationFolderId)
          Create a shared folder with a list of users
 WorkspaceSmartFolder createSmartFolder(String name, String description, String query)
          Create a smart folder
 TimeSeries createTimeSeries(String name, String description, String timeseriesId, String title, String creator, String timeseriesDescription, String timeseriesCreationDate, String publisher, String sourceId, String sourceName, String rights, long dimension, List<String> headerLabels, InputStream compressedCSV, String destinationfolderId)
          Create a new Time Series.
 UrlDocument createUrlDocument(String name, String description, String oid, String mimeType, InputStream documentData, Map<String,String> metadata, Map<String,String> annotations, String collectionName, String destinationfolderId)
          Create a new URL document into a folder.
 WorkflowReport createWorkflowReport(String name, String description, String workflowId, String workflowStatus, String workflowData, String destinationfolderId)
          Creates a Workflow Report.
 WorkflowTemplate createWorkflowTemplate(String name, String description, String workflowId, String workflowStatus, String workflowData, String destinationfolderId)
          Creates a Workflow Template.
 WorkspaceFolder decomposeAquaMapsItem(String itemId, String folderName, String destinationWorkspaceId)
          Decompose the specified AquaMaps item.
 boolean exists(String itemId)
          Check if an item with the specified id exists.
 boolean exists(String name, String folderId)
          Check if an item with the specified name exists in the specified folder.
 WorkspaceItem find(String path)
          Find an item using the specified path.
 WorkspaceItem find(String name, String folderId)
          Get an item with the specified name in the specified folder.
 List<WorkspaceSmartFolder> getAllSmartFolders()
          Returns all user smart folders
 Capabilities getCapabilities(String itemId)
          Return all capabilities associated with the item.
 FolderBulkCreatorManager getFolderBulkCreatorManager()
          Return this workspace folder bulk creator manager.
 List<SearchItem> getFolderItems(FolderItemType... types)
           
 List<SearchItem> getFolderItems(FolderItemType type)
           
 Home getHome()
          Returns the user home.
 WorkspaceItem getItem(String itemId)
          Return the item with the specified id.
 FolderBulkCreator getNewFolderBulkCreator(String folderId)
          Create a new folderBulkCreator for the specified folder.
 User getOwner()
          Returns the workspace owner.
 String getPathSeparator()
          Returns the item path separator.
 WorkspaceFolder getRoot()
          Returns the workspace root.
 WorkspaceFolder getRoot(org.gcube.common.core.scope.GCUBEScope scope)
           
 org.gcube.common.core.scope.GCUBEScope getScope()
           
 WorkspaceSmartFolder getSmartFolder(String folderId)
           
 String getUrlWebDav()
           
 WorkspaceMessageManager getWorkspaceMessageManager()
          SendRequest manager.
 List<WorkspaceItem> getWorkspaceTree(WorkspaceItem item)
           
 boolean isValidName(String name)
          Check if the specified name is a valid name.
 void moveItem(String itemId, String destinationFolderId)
          Move a workspaceItem to a specified destination.
 void remove(String itemName, String folderId)
          Remove an item from a folder.
 void removeChild(String childId, String folderId)
          Remove an item from a folder.
 void removeItem(String itemId)
          Remove an item.
 void renameItem(String itemId, String newName)
          Rename an item.
 List<SearchFolderItem> searchByMimeType(String mimeType)
           
 List<SearchItem> searchByName(String name)
           
 WorkspaceSharedFolder shareFolder(List<String> users, String destinationFolderId)
          Shared an exist WorkspaceFolder with a list of users
 
Methods inherited from interface org.gcube.portlets.user.homelibrary.home.workspace.events.WorkspaceEventSource
addWorkspaceListener, removeWorkspaceListener
 

Method Detail

getPathSeparator

String getPathSeparator()
Returns the item path separator.

Returns:
the path separator.

getHome

Home getHome()
Returns the user home.

Returns:
the home.

getOwner

User getOwner()
              throws InternalErrorException
Returns the workspace owner.

Returns:
the owner.
Throws:
InternalErrorException - if an internal error occurs.

getRoot

WorkspaceFolder getRoot()
Returns the workspace root.

Returns:
the root.

getWorkspaceTree

List<WorkspaceItem> getWorkspaceTree(WorkspaceItem item)
                                     throws InternalErrorException
Throws:
InternalErrorException

createSmartFolder

WorkspaceSmartFolder createSmartFolder(String name,
                                       String description,
                                       String query)
                                       throws ItemAlreadyExistException,
                                              InternalErrorException
Create a smart folder

Parameters:
name -
description -
query -
Returns:
Throws:
ItemAlreadyExistException
InternalErrorException

getAllSmartFolders

List<WorkspaceSmartFolder> getAllSmartFolders()
                                              throws InternalErrorException
Returns all user smart folders

Returns:
Throws:
InternalErrorException

getSmartFolder

WorkspaceSmartFolder getSmartFolder(String folderId)
                                    throws ItemNotFoundException,
                                           InternalErrorException
Throws:
ItemNotFoundException
InternalErrorException

createFolder

WorkspaceFolder createFolder(String name,
                             String description,
                             String destinationFolderId)
                             throws InternalErrorException,
                                    InsufficientPrivilegesException,
                                    ItemAlreadyExistException,
                                    WrongDestinationException,
                                    ItemNotFoundException,
                                    WorkspaceFolderNotFoundException
Create a new folder with specified name. The new folder is created into the specified folder.

Parameters:
name - the folder name.
description - the folder description.
destinationFolderId - the destination folder.
Returns:
the new folder.
Throws:
InternalErrorException - if an internal error occurs.
ItemNotFoundException - if the destination folder has not been found.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
ItemAlreadyExistException - if an item with the same exist in the destination folder.
WrongDestinationException - if the destination item is not a folder.
WorkspaceFolderNotFoundException - if the destination folder has not been found.

createExternalImage

ExternalImage createExternalImage(String name,
                                  String description,
                                  String mimeType,
                                  InputStream imageData,
                                  String destinationFolderId)
                                  throws InsufficientPrivilegesException,
                                         WorkspaceFolderNotFoundException,
                                         InternalErrorException,
                                         ItemAlreadyExistException,
                                         WrongDestinationException
Create a new External Image into a folder.

Parameters:
name - the external image name.
description - the external image description.
mimeType - the image mime type.
imageData - the external image data.
destinationFolderId - the destination folder.
Returns:
the new external image.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createExternalFile

ExternalFile createExternalFile(String name,
                                String description,
                                String mimeType,
                                InputStream fileData,
                                String destinationFolderId)
                                throws InsufficientPrivilegesException,
                                       WorkspaceFolderNotFoundException,
                                       InternalErrorException,
                                       ItemAlreadyExistException,
                                       WrongDestinationException
Create a new External File into a folder.

Parameters:
name - the external file name.
description - the external file description.
mimeType - the external file mime type.
fileData - the external file content.
destinationFolderId - the destination folder.
Returns:
the new external file.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createExternalPDFFile

ExternalPDFFile createExternalPDFFile(String name,
                                      String description,
                                      String mimeType,
                                      InputStream fileData,
                                      String destinationFolderId)
                                      throws InsufficientPrivilegesException,
                                             WorkspaceFolderNotFoundException,
                                             InternalErrorException,
                                             ItemAlreadyExistException,
                                             WrongDestinationException
Create a new External PDF File into a folder.

Parameters:
name - the external PDF file name.
description - the external PDF file description.
mimeType - the external PDF file mime type.
fileData - the external PDF file content.
destinationFolderId - the destination folder.
Returns:
the new external PDF file.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createExternalUrl

ExternalUrl createExternalUrl(String name,
                              String description,
                              String url,
                              String destinationFolderId)
                              throws InsufficientPrivilegesException,
                                     WorkspaceFolderNotFoundException,
                                     InternalErrorException,
                                     ItemAlreadyExistException,
                                     WrongDestinationException
Create a new External URL into a folder.

Parameters:
name - the external URL name.
description - the external URL description.
url - the external URL value.
destinationFolderId - the destination folder.
Returns:
the new external URL.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createExternalUrl

ExternalUrl createExternalUrl(String name,
                              String description,
                              InputStream url,
                              String destinationfolderId)
                              throws InsufficientPrivilegesException,
                                     InternalErrorException,
                                     ItemAlreadyExistException,
                                     WrongDestinationException,
                                     WorkspaceFolderNotFoundException
Create a new External URL into a folder.

Parameters:
name - the external URL name.
description - the external URL description.
url - the external URL.
destinationfolderId - the destination folder.
Returns:
the new external URL.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createReportTemplate

ReportTemplate createReportTemplate(String name,
                                    String description,
                                    Calendar created,
                                    Calendar lastEdit,
                                    String author,
                                    String lastEditBy,
                                    int numberOfSections,
                                    String status,
                                    InputStream templateData,
                                    String destinationfolderId)
                                    throws InsufficientPrivilegesException,
                                           InternalErrorException,
                                           ItemAlreadyExistException,
                                           WrongDestinationException,
                                           WorkspaceFolderNotFoundException
Create a new Report Template into a folder.

Parameters:
name - the template name.
description - the template description.
created - the template creation time.
lastEdit - the last edit time.
author - the template author.
lastEditBy - the last template editor.
numberOfSections - the number of sections.
status - the template status.
templateData - the template content.
destinationfolderId - the destination folder.
Returns:
the new template.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createReport

Report createReport(String name,
                    String description,
                    Calendar created,
                    Calendar lastEdit,
                    String author,
                    String lastEditBy,
                    String templateName,
                    int numberOfSections,
                    String status,
                    InputStream reportData,
                    String destinationfolderId)
                    throws InsufficientPrivilegesException,
                           InternalErrorException,
                           ItemAlreadyExistException,
                           WrongDestinationException,
                           WorkspaceFolderNotFoundException
Create a new Report into a folder.

Parameters:
name - the report name.
description - the report description.
created - the report creation time.
lastEdit - the last edit time.
author - the report author.
lastEditBy - the last report editor.
templateName - the source template name.
numberOfSections - the number of sections.
status - the report status.
reportData - the report content.
destinationfolderId - the destination folder.
Returns:
the new report.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createQuery

Query createQuery(String name,
                  String description,
                  String query,
                  QueryType queryType,
                  String destinationfolderId)
                  throws InsufficientPrivilegesException,
                         InternalErrorException,
                         ItemAlreadyExistException,
                         WrongDestinationException,
                         WorkspaceFolderNotFoundException
Create a new query into a folder.

Parameters:
name - the query name.
description - the query description.
query - the query value.
queryType - the query type.
destinationfolderId - the destination folder.
Returns:
the new query.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createQuery

Query createQuery(String name,
                  String description,
                  InputStream query,
                  QueryType queryType,
                  String destinationfolderId)
                  throws InsufficientPrivilegesException,
                         InternalErrorException,
                         ItemAlreadyExistException,
                         WrongDestinationException,
                         WorkspaceFolderNotFoundException
Create a new query into a folder.

Parameters:
name - the query name.
description - the query description.
query - the query.
queryType - the query type.
destinationfolderId - the destinatin folder.
Returns:
the new query.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createAquaMapsItem

WorkspaceFolder createAquaMapsItem(String name,
                                   String description,
                                   String mapName,
                                   String mapType,
                                   String author,
                                   int numberOfSpecies,
                                   String boundingBox,
                                   float psoThreshold,
                                   int numberOfGeneratedImages,
                                   InputStream metadata,
                                   Map<String,InputStream> images,
                                   String destinationfolderId)
                                   throws InsufficientPrivilegesException,
                                          InternalErrorException,
                                          ItemAlreadyExistException,
                                          WrongDestinationException,
                                          WorkspaceFolderNotFoundException
Create a new AquaMaps Item into a folder.

Parameters:
name - the item name.
description - the item description.
mapName - the map name.
mapType - the map type.
author - the item author.
numberOfSpecies - the number of species selected.
boundingBox - the bounding box.
psoThreshold - the PSO threshold.
numberOfGeneratedImages - the number of generated images.
metadata - the item metadata.
images - the item images.
destinationfolderId - the destination folder.
Returns:
the new AquaMaps item.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createAnnotation

Annotation createAnnotation(String name,
                            String description,
                            String oid,
                            Map<String,String> data,
                            String destinationfolderId)
                            throws InsufficientPrivilegesException,
                                   InternalErrorException,
                                   ItemAlreadyExistException,
                                   WorkspaceFolderNotFoundException
Create a new annotation.

Parameters:
name - the annotation name.
description - the annotation description.
oid - the annotation oid.
data - the annotation data.
destinationfolderId - the destination folder id.
Returns:
the create annotation.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.

createMetadata

Metadata createMetadata(String name,
                        String description,
                        String oid,
                        String schema,
                        String language,
                        String data,
                        String collectionName,
                        String destinationfolderId)
                        throws InsufficientPrivilegesException,
                               InternalErrorException,
                               ItemAlreadyExistException,
                               WrongDestinationException,
                               WorkspaceFolderNotFoundException
Create a new metadata info object.

Parameters:
name - the metadata name.
description - the metadata description.
oid - the metadata oid.
schema - the metadata schema.
language - the metadata language.
data - the metadata data.
collectionName - the metadata referred object collection name.
destinationfolderId - the destination folder.
Returns:
the new metadata.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createDocument

Document createDocument(String name,
                        String description,
                        String oid,
                        String mimeType,
                        InputStream documentData,
                        Map<String,String> metadata,
                        Map<String,String> annotations,
                        String collectionName,
                        String destinationfolderId)
                        throws InsufficientPrivilegesException,
                               InternalErrorException,
                               ItemAlreadyExistException,
                               WrongDestinationException,
                               WorkspaceFolderNotFoundException
Create a new document into a folder.

Parameters:
name - the document name.
description - the document description.
oid - the document oid (gcube).
mimeType - the document mime type.
documentData - the document content.
metadata - the document associated metadata.
annotations - the document associated annotations.
collectionName - the document's collection name.
destinationfolderId - the destination folder.
Returns:
the new document.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createImageDocument

ImageDocument createImageDocument(String name,
                                  String description,
                                  String oid,
                                  String mimeType,
                                  InputStream imageData,
                                  Map<String,String> metadata,
                                  Map<String,String> annotations,
                                  String collectionName,
                                  String destinationfolderId)
                                  throws InsufficientPrivilegesException,
                                         InternalErrorException,
                                         ItemAlreadyExistException,
                                         WrongDestinationException,
                                         WorkspaceFolderNotFoundException
Create a new Image Document into a folder.

Parameters:
name - the image document name.
description - the image document description.
oid - the image document oid (gcube).
mimeType - the image document mime type.
imageData - the image document content.
metadata - the image document associated metadata.
annotations - the image document associated annotations.
collectionName - the image document's collection name.
destinationfolderId - the image destination folder.
Returns:
the new image document.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createPDFDocument

PDFDocument createPDFDocument(String name,
                              String description,
                              String oid,
                              String mimeType,
                              InputStream data,
                              Map<String,String> metadata,
                              Map<String,String> annotations,
                              String collectionName,
                              String destinationfolderId)
                              throws InsufficientPrivilegesException,
                                     InternalErrorException,
                                     ItemAlreadyExistException,
                                     WrongDestinationException,
                                     WorkspaceFolderNotFoundException
Create a new PDF Document into a folder.

Parameters:
name - the PDF document name.
description - the PDF document description.
oid - the PDF document oid (gcube).
mimeType - the PDF document mime type.
data - the PDF document content.
metadata - the PDF document associated metadata.
annotations - the PDF document associated annotations.
collectionName - the PDF document's collection name.
destinationfolderId - the PDF destination folder.
Returns:
the new PDF document.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createUrlDocument

UrlDocument createUrlDocument(String name,
                              String description,
                              String oid,
                              String mimeType,
                              InputStream documentData,
                              Map<String,String> metadata,
                              Map<String,String> annotations,
                              String collectionName,
                              String destinationfolderId)
                              throws InsufficientPrivilegesException,
                                     WorkspaceFolderNotFoundException,
                                     InternalErrorException,
                                     ItemAlreadyExistException,
                                     WrongDestinationException
Create a new URL document into a folder.

Parameters:
name - the URL document name.
description - the URL document description.
oid - the URL document oid (gcube).
mimeType - the URL document mime type.
documentData - the URL document content.
metadata - the URL document associated metadata.
annotations - the document associated annotations.
collectionName - the document's collection name.
destinationfolderId - the destination folder.
Returns:
the new document.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createDocumentLink

DocumentLink createDocumentLink(String name,
                                String description,
                                String oid,
                                Map<String,String> metadata,
                                Map<String,String> annotations,
                                String collectionName,
                                String mimeType,
                                String destinationfolderId)
                                throws InsufficientPrivilegesException,
                                       WorkspaceFolderNotFoundException,
                                       InternalErrorException,
                                       ItemAlreadyExistException,
                                       WrongDestinationException
Create a new document link into a folder.

Parameters:
name - the document name.
description - the document description.
oid - the document oid (gcube).
metadata - the document associated metadata.
annotations - the document associated annotations.
collectionName - the document's collection name.
mimeType - the document mimeType.
destinationfolderId - the destination folder.
Returns:
the new document.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createImageDocumentLink

ImageDocumentLink createImageDocumentLink(String name,
                                          String description,
                                          String oid,
                                          Map<String,String> metadata,
                                          Map<String,String> annotations,
                                          String collectionName,
                                          String mimeType,
                                          String destinationfolderId)
                                          throws InsufficientPrivilegesException,
                                                 WorkspaceFolderNotFoundException,
                                                 InternalErrorException,
                                                 ItemAlreadyExistException,
                                                 WrongDestinationException
Create a new Image Document link into a folder.

Parameters:
name - the image document name.
description - the image document description.
oid - the image document oid (gcube).
metadata - the image document associated metadata.
annotations - the image document associated annotations.
collectionName - the image document's collection name.
mimeType - the image document mimeType.
destinationfolderId - the image destination folder.
Returns:
the new image document.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createPDFDocumentLink

PDFDocumentLink createPDFDocumentLink(String name,
                                      String description,
                                      String oid,
                                      Map<String,String> metadata,
                                      Map<String,String> annotations,
                                      String collectionName,
                                      String mimeType,
                                      String destinationfolderId)
                                      throws InsufficientPrivilegesException,
                                             WorkspaceFolderNotFoundException,
                                             InternalErrorException,
                                             ItemAlreadyExistException,
                                             WrongDestinationException
Create a new PDF Document link into a folder.

Parameters:
name - the pdf document name.
description - the pdf document description.
oid - the pdf document oid (gcube).
metadata - the pdf document associated metadata.
annotations - the pdf document associated annotations.
collectionName - the pdf document's collection name.
mimeType - the pdf document mimeType.
destinationfolderId - the pdf destination folder.
Returns:
the new pdf document.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a folder item with same name already exist.
WrongDestinationException - if the destination type is not a folder.

createTimeSeries

TimeSeries createTimeSeries(String name,
                            String description,
                            String timeseriesId,
                            String title,
                            String creator,
                            String timeseriesDescription,
                            String timeseriesCreationDate,
                            String publisher,
                            String sourceId,
                            String sourceName,
                            String rights,
                            long dimension,
                            List<String> headerLabels,
                            InputStream compressedCSV,
                            String destinationfolderId)
                            throws InsufficientPrivilegesException,
                                   InternalErrorException,
                                   ItemAlreadyExistException,
                                   WorkspaceFolderNotFoundException,
                                   WrongDestinationException
Create a new Time Series.

Parameters:
name - the item name.
description - the item description.
timeseriesId - the Time Series id.
title - the Time Series title.
creator - the Time Series creator.
timeseriesDescription - the Time Series description.
timeseriesCreationDate - the Time Series creation date.
publisher - the Time Series publisher.
sourceId - the Time Series source id.
sourceName - the Time Series source name.
rights - the Time Series rights.
dimension - the Time Series dimension.
headerLabels - the Time Series headers label.
compressedCSV - the Time Series csv compressed representation (with labels and UTF-8 encoded).
destinationfolderId - the time series destination folder.
Returns:
the created Time Series.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if an item with the specified name already exists.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
WrongDestinationException - if the destination type is not a folder.

createWorkflowReport

WorkflowReport createWorkflowReport(String name,
                                    String description,
                                    String workflowId,
                                    String workflowStatus,
                                    String workflowData,
                                    String destinationfolderId)
                                    throws InsufficientPrivilegesException,
                                           InternalErrorException,
                                           ItemAlreadyExistException,
                                           WorkspaceFolderNotFoundException,
                                           WrongDestinationException
Creates a Workflow Report.

Parameters:
name - the workflow Report name.
description - the workflow Report description.
workflowId - the workflow id.
workflowStatus - the workflow status.
workflowData - the workflow data.
destinationfolderId - the Workflow Report destination folder.
Returns:
the created Workflow Report.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if an item with the specified name already exists.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
WrongDestinationException - if the destination type is not a folder.

createWorkflowTemplate

WorkflowTemplate createWorkflowTemplate(String name,
                                        String description,
                                        String workflowId,
                                        String workflowStatus,
                                        String workflowData,
                                        String destinationfolderId)
                                        throws InsufficientPrivilegesException,
                                               InternalErrorException,
                                               ItemAlreadyExistException,
                                               WorkspaceFolderNotFoundException,
                                               WrongDestinationException
Creates a Workflow Template.

Parameters:
name - the workflow Template name.
description - the workflow Template description.
workflowId - the workflow id.
workflowStatus - the workflow status.
workflowData - the workflow data.
destinationfolderId - the Workflow Template destination folder.
Returns:
the created Workflow Template.
Throws:
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if an item with the specified name already exists.
WorkspaceFolderNotFoundException - if the destination folder has not been found.
WrongDestinationException - if the destination type is not a folder.

removeItem

void removeItem(String itemId)
                throws ItemNotFoundException,
                       InternalErrorException,
                       InsufficientPrivilegesException
Remove an item.

Parameters:
itemId - the item to remove.
Throws:
ItemNotFoundException - if the item has not been found.
InternalErrorException - if an internal error occurs.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.

moveItem

void moveItem(String itemId,
              String destinationFolderId)
              throws ItemNotFoundException,
                     WrongDestinationException,
                     InsufficientPrivilegesException,
                     InternalErrorException,
                     ItemAlreadyExistException,
                     WorkspaceFolderNotFoundException
Move a workspaceItem to a specified destination.

Parameters:
itemId - the item to move.
destinationFolderId - the destination folder.
Throws:
ItemNotFoundException - if the specified item has not been found.
WrongDestinationException - if the specified destination has not been found.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if the destination folder have a children with same name.
WorkspaceFolderNotFoundException - if the destination folder is not found.

renameItem

void renameItem(String itemId,
                String newName)
                throws ItemNotFoundException,
                       InternalErrorException,
                       ItemAlreadyExistException
Rename an item.

Parameters:
itemId - the item id.
newName - the new name.
Throws:
ItemNotFoundException - if the item has not been found.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if the user don't have sufficient privileges to perform this operation.

changeDescription

void changeDescription(String itemId,
                       String newDescription)
                       throws ItemNotFoundException,
                              InternalErrorException
Change an item description.

Parameters:
itemId - the item to update.
newDescription - the new item description.
Throws:
ItemNotFoundException - if the item has not been found.
InternalErrorException - if an internal error occurs.

getItem

WorkspaceItem getItem(String itemId)
                      throws ItemNotFoundException
Return the item with the specified id.

Parameters:
itemId - the item id.
Returns:
the item.
Throws:
ItemNotFoundException - if the item has not been found.

getCapabilities

Capabilities getCapabilities(String itemId)
                             throws ItemNotFoundException,
                                    InternalErrorException
Return all capabilities associated with the item.

Parameters:
itemId - the item to retrieve.
Returns:
the capabilities.
Throws:
ItemNotFoundException - if the item has not been found.
InternalErrorException - if an internal error occurs.

removeChild

void removeChild(String childId,
                 String folderId)
                 throws ItemNotFoundException,
                        InternalErrorException,
                        InsufficientPrivilegesException,
                        WrongParentTypeException
Remove an item from a folder.

Parameters:
childId - the item to remove.
folderId - the folder.
Throws:
ItemNotFoundException - if the item has not been found.
InternalErrorException - if an internal error occurs.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WrongParentTypeException - if the specified folder is neither a workspace nor a folder.

remove

void remove(String itemName,
            String folderId)
            throws ItemNotFoundException,
                   InternalErrorException,
                   InsufficientPrivilegesException,
                   WrongItemTypeException
Remove an item from a folder.

Parameters:
itemName - the item name.
folderId - the folder id.
Throws:
ItemNotFoundException - if the folder has not been found.
InternalErrorException - if an internal error occurs.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WrongItemTypeException - if the specified folder is neither a workspace nor a folder.

copy

WorkspaceItem copy(String itemId,
                   String newName,
                   String destinationFolderId)
                   throws ItemNotFoundException,
                          WrongDestinationException,
                          InternalErrorException,
                          ItemAlreadyExistException,
                          InsufficientPrivilegesException,
                          WorkspaceFolderNotFoundException
Copy an item from a folder to another folder.

Parameters:
itemId - the item to copy.
newName - the item new name.
destinationFolderId - the destination folder id.
Returns:
the item copy.
Throws:
ItemNotFoundException - if the item has not been found.
WrongDestinationException - if the destination have a wrong type.
ItemAlreadyExistException - if an item with same name already exist in the destination folder.
InternalErrorException - if an internal error occurs.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
WorkspaceFolderNotFoundException - if the destination folder has not been found.

copy

WorkspaceItem copy(String itemId,
                   String destinationFolderId)
                   throws ItemNotFoundException,
                          WrongDestinationException,
                          InternalErrorException,
                          ItemAlreadyExistException,
                          InsufficientPrivilegesException,
                          WorkspaceFolderNotFoundException
Copy an item from a folder to another folder. The item copy have the same name of the original.

Parameters:
itemId - the item to copy.
destinationFolderId - the destination folder id, can't be the same of the item (can't have the same name).
Returns:
the item copy.
Throws:
ItemNotFoundException - if the item has not been found.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
ItemAlreadyExistException - if an item with same name already exist in the destination folder.
InternalErrorException - if an internal error occurs.
WrongDestinationException - if the destination have a wrong type.
WorkspaceFolderNotFoundException - if the destination folder has not been found.

cloneItem

WorkspaceItem cloneItem(String itemId,
                        String cloneName)
                        throws ItemNotFoundException,
                               ItemAlreadyExistException,
                               InsufficientPrivilegesException,
                               InternalErrorException,
                               WrongDestinationException,
                               WorkspaceFolderNotFoundException
Clone an item in the same folder. This is a particular version of copy method where the destination folder is the same of original item.

Parameters:
itemId - the item to clone.
cloneName - the clone name.
Returns:
the clone.
Throws:
ItemNotFoundException - if the item has not been found.
ItemAlreadyExistException - if an item with same name already exist in the destination folder.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
InternalErrorException - if an internal error occurs.
WrongDestinationException - if the destination have a wrong type.
WorkspaceFolderNotFoundException - if the destination folder has not been found.

exists

boolean exists(String name,
               String folderId)
               throws InternalErrorException,
                      ItemNotFoundException,
                      WrongItemTypeException
Check if an item with the specified name exists in the specified folder.

Parameters:
name - the name to check.
folderId - the folder where to search the item.
Returns:
true if the item exists, false otherwise.
Throws:
InternalErrorException - if an error occurs.
ItemNotFoundException - if the folder has not been found.
WrongItemTypeException - if the folderId referrer to an item with type different from Workspace or folder.

exists

boolean exists(String itemId)
               throws InternalErrorException
Check if an item with the specified id exists.

Parameters:
itemId - the item id to check.
Returns:
true if the item exists, false otherwise.
Throws:
InternalErrorException - if an error occurs.

find

WorkspaceItem find(String name,
                   String folderId)
                   throws InternalErrorException,
                          ItemNotFoundException,
                          WrongItemTypeException
Get an item with the specified name in the specified folder.

Parameters:
name - the item name to find.
folderId - the folder where to search the item.
Returns:
the item if the item is found, null otherwise.
Throws:
InternalErrorException - if an error occurs.
ItemNotFoundException - if the folder has not been found.
WrongItemTypeException - if the folderId referrer to an item with type different from Workspace or folder.

find

WorkspaceItem find(String path)
                   throws InternalErrorException
Find an item using the specified path.

Parameters:
path - the item path.
Returns:
the item if the item is found, null otherwise.
Throws:
InternalErrorException - if an error occurs.

searchByName

List<SearchItem> searchByName(String name)
                              throws InternalErrorException
Throws:
InternalErrorException

searchByMimeType

List<SearchFolderItem> searchByMimeType(String mimeType)
                                        throws InternalErrorException
Parameters:
mimeType -
Returns:
Throws:
InternalErrorException

getFolderItems

List<SearchItem> getFolderItems(FolderItemType type)
                                throws InternalErrorException
Throws:
InternalErrorException

isValidName

boolean isValidName(String name)
Check if the specified name is a valid name.

Parameters:
name - the name to check.
Returns:
true if the name is valid, false otherwise.

getNewFolderBulkCreator

FolderBulkCreator getNewFolderBulkCreator(String folderId)
                                          throws WorkspaceFolderNotFoundException,
                                                 WrongItemTypeException,
                                                 InternalErrorException
Create a new folderBulkCreator for the specified folder.

Parameters:
folderId - the target folder.
Returns:
a new folderBulkCreator.
Throws:
WorkspaceFolderNotFoundException - if the target folder has not been found.
WrongItemTypeException - if the specified target is not a folder.
InternalErrorException - if an internal error occurs.

getFolderBulkCreatorManager

FolderBulkCreatorManager getFolderBulkCreatorManager()
Return this workspace folder bulk creator manager.

Returns:
the manager.

getWorkspaceMessageManager

WorkspaceMessageManager getWorkspaceMessageManager()
SendRequest manager.

Returns:
the manager.

decomposeAquaMapsItem

WorkspaceFolder decomposeAquaMapsItem(String itemId,
                                      String folderName,
                                      String destinationWorkspaceId)
                                      throws WrongItemTypeException,
                                             WorkspaceFolderNotFoundException,
                                             WrongDestinationException,
                                             InternalErrorException,
                                             ItemAlreadyExistException,
                                             InsufficientPrivilegesException,
                                             ItemNotFoundException
Decompose the specified AquaMaps item.

Parameters:
itemId - the aquamaps item id.
folderName - the destination folder name.
destinationWorkspaceId - the destination workspace name.
Returns:
the created folder-
Throws:
WrongItemTypeException - if the specified item is not a GPod item.
WorkspaceFolderNotFoundException - if the specified workspace is not found.
WrongDestinationException - if the specified target is not a workspace.
InternalErrorException - if an internal error occurs.
ItemAlreadyExistException - if a item with that name already exists into the specified workspace.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
ItemNotFoundException - if the aquamaps item has not found.

getFolderItems

List<SearchItem> getFolderItems(FolderItemType... types)
                                throws InternalErrorException
Parameters:
types -
Returns:
Throws:
InternalErrorException

getRoot

WorkspaceFolder getRoot(org.gcube.common.core.scope.GCUBEScope scope)
Parameters:
scope -
Returns:

getScope

org.gcube.common.core.scope.GCUBEScope getScope()
Returns:

getUrlWebDav

String getUrlWebDav()
                    throws InternalErrorException
Returns:
Throws:
InternalErrorException

createExternalResourceLink

ExternalResourceLink createExternalResourceLink(String name,
                                                String description,
                                                String mimeType,
                                                String resourceId,
                                                String pluginName,
                                                String destinationFolderId)
                                                throws InsufficientPrivilegesException,
                                                       InternalErrorException,
                                                       ItemAlreadyExistException,
                                                       WrongDestinationException,
                                                       WorkspaceFolderNotFoundException
Parameters:
name -
mimeType -
resourceId -
description -
destinationFolderId -
plugin -
Returns:
Throws:
WrongItemTypeException
WorkspaceFolderNotFoundException
WrongDestinationException
InternalErrorException
ItemAlreadyExistException
InsufficientPrivilegesException
ItemNotFoundException

createSharedFolder

WorkspaceSharedFolder createSharedFolder(String name,
                                         String description,
                                         List<String> users,
                                         String destinationFolderId)
                                         throws InternalErrorException,
                                                InsufficientPrivilegesException,
                                                ItemAlreadyExistException,
                                                WrongDestinationException,
                                                ItemNotFoundException,
                                                WorkspaceFolderNotFoundException
Create a shared folder with a list of users

Parameters:
name -
description -
users. - A list of portal logins.
destinationFolderId -
Returns:
the shared folder
Throws:
InternalErrorException
InsufficientPrivilegesException
ItemAlreadyExistException
WrongDestinationException
ItemNotFoundException
WorkspaceFolderNotFoundException

shareFolder

WorkspaceSharedFolder shareFolder(List<String> users,
                                  String destinationFolderId)
                                  throws InternalErrorException,
                                         InsufficientPrivilegesException,
                                         ItemAlreadyExistException,
                                         WrongDestinationException,
                                         ItemNotFoundException,
                                         WorkspaceFolderNotFoundException
Shared an exist WorkspaceFolder with a list of users

Parameters:
users. - A list of portal logins.
destinationFolderId -
Returns:
the shared folder
Throws:
InternalErrorException
InsufficientPrivilegesException
ItemAlreadyExistException
WrongDestinationException
ItemNotFoundException
WorkspaceFolderNotFoundException


Copyright © 2013. All Rights Reserved.