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

All Superinterfaces:
WorkspaceItem
All Known Subinterfaces:
WorkspaceSharedFolder

public interface WorkspaceFolder
extends WorkspaceItem

Author:
Federico De Faveri defaveri@isti.cnr.it

Method Summary
 Annotation createAnnotationItem(String name, String description, String oid, Map<String,String> data)
          Create a new annotation into this folder.
 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)
          Create a new AquaMaps Item into this folder.
 Document createDocumentItem(String name, String description, String oid, String mimeType, InputStream documentData, Map<String,String> metadata, Map<String,String> annotations, String collectionName)
          Create a new document into this folder.
 DocumentLink createDocumentLinkItem(String name, String description, String oid, Map<String,String> metadata, Map<String,String> annotations, String collectionName, String mimeType)
          Create a new document link into this folder.
 ExternalFile createExternalFileItem(String name, String description, String mimeType, InputStream fileData)
          Create an External File into this folder.
 ExternalImage createExternalImageItem(String name, String description, String mimeType, InputStream imageData)
          Create a new External Image into this folder.
 ExternalPDFFile createExternalPDFFileItem(String name, String description, String mimeType, InputStream fileData)
          Create a new External PDF file into this folder.
 ExternalResourceLink createExternalResourceLink(String name, String description, String mimeType, String resourceIdString, String pluginName)
           
 ExternalUrl createExternalUrlItem(String name, String description, InputStream url)
          Create an External URL into this folder.
 ExternalUrl createExternalUrlItem(String name, String description, String url)
          Create an External URL into this folder.
 WorkspaceFolder createFolder(String name, String description)
          Create a new folder into this folder.
 ImageDocument createImageDocumentItem(String name, String description, String oid, String mimeType, InputStream imageData, Map<String,String> metadata, Map<String,String> annotations, String collectionName)
          Create a new image document into this folder.
 ImageDocumentLink createImageDocumentLinkItem(String name, String description, String oid, Map<String,String> metadata, Map<String,String> annotations, String collectionName, String mimeType)
          Create a new image document link into this folder.
 Metadata createMetadataItem(String name, String description, String oid, String schema, String language, String metadata, String collectionName)
          Create a new Metadata into this folder.
 PDFDocument createPDFDocumentItem(String name, String description, String oid, String mimeType, InputStream data, Map<String,String> metadata, Map<String,String> annotations, String collectionName)
          Create a new PDF document.
 PDFDocumentLink createPDFDocumentLinkItem(String name, String description, String oid, Map<String,String> metadata, Map<String,String> annotations, String collectionName, String mimeType)
          Create a new PDF document link.
 Query createQueryItem(String name, String description, InputStream query, QueryType queryType)
          Create a new Query into this folder.
 Query createQueryItem(String name, String description, String query, QueryType queryType)
          Create a new Query into this folder.
 Report createReportItem(String name, String description, Calendar created, Calendar lastEdit, String author, String lastEditBy, String templateName, int numberOfSections, String status, InputStream reportData)
          Create a Report into this folder.
 ReportTemplate createReportTemplateItem(String name, String description, Calendar created, Calendar lastEdit, String author, String lastEditBy, int numberOfSections, String status, InputStream templateData)
          Create a Report Template into this 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)
          Create a new Time Series.
 UrlDocument createUrlDocumentItem(String name, String description, String oid, String mimeType, InputStream documentData, Map<String,String> metadata, Map<String,String> annotations, String collectionName)
          Create a new URL document into this folder.
 WorkflowReport createWorkflowReport(String name, String description, String workflowId, String workflowStatus, String workflowData)
          Creates a Workflow Report.
 WorkflowTemplate createWorkflowTemplate(String name, String description, String workflowId, String workflowStatus, String workflowData)
          Creates a Workflow Template.
 boolean exists(String name)
          Check if an item with the specified name exists.
 WorkspaceItem find(String name)
          Get an item with the specified name.
 List<WorkspaceItem> getChildren()
          Return this item children.
 FolderBulkCreator getNewFolderBulkCreator()
          Create a new FolderBulkCreator for this folder.
 WorkspaceSharedFolder share(List<String> useers)
           
 
Methods inherited from interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
cloneItem, getAccounting, getCapabilities, getCreationTime, getDescription, getId, getLastAction, getLastModificationTime, getName, getOwner, getParent, getPath, getProperties, getType, isMarkedAsRead, isRoot, isShared, markAsRead, move, remove, removeChild, rename, setDescription
 

Method Detail

getChildren

List<WorkspaceItem> getChildren()
                                throws InternalErrorException
Return this item children.

Specified by:
getChildren in interface WorkspaceItem
Returns:
the children.
Throws:
InternalErrorException - if an internal error occurs.

exists

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

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

find

WorkspaceItem find(String name)
                   throws InternalErrorException
Get an item with the specified name.

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

createFolder

WorkspaceFolder createFolder(String name,
                             String description)
                             throws InternalErrorException,
                                    InsufficientPrivilegesException,
                                    ItemAlreadyExistException
Create a new folder into this folder.

Parameters:
name - the folder name.
description - the folder description.
Returns:
the new folder.
Throws:
InternalErrorException - if an internal error occurs.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
ItemAlreadyExistException - if an item with the specified name already exists in this folder.

createExternalImageItem

ExternalImage createExternalImageItem(String name,
                                      String description,
                                      String mimeType,
                                      InputStream imageData)
                                      throws InsufficientPrivilegesException,
                                             InternalErrorException,
                                             ItemAlreadyExistException
Create a new External Image into this folder.

Parameters:
name - the external image name.
description - the external image description.
mimeType - the external image mime type.
imageData - the external image data.
Returns:
the new external image.
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.

createExternalFileItem

ExternalFile createExternalFileItem(String name,
                                    String description,
                                    String mimeType,
                                    InputStream fileData)
                                    throws InsufficientPrivilegesException,
                                           InternalErrorException,
                                           ItemAlreadyExistException
Create an External File into this folder.

Parameters:
name - the external file name.
description - the external file description.
mimeType - the external file mime type.
fileData - the external file data.
Returns:
the new external file.
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.

createExternalPDFFileItem

ExternalPDFFile createExternalPDFFileItem(String name,
                                          String description,
                                          String mimeType,
                                          InputStream fileData)
                                          throws InsufficientPrivilegesException,
                                                 InternalErrorException,
                                                 ItemAlreadyExistException
Create a new External PDF file into this folder.

Parameters:
name - the external PDF name.
description - the external PDF description.
mimeType - the external PDF mime type.
fileData - the external PDF data.
Returns:
the new external PDF.
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.

createExternalUrlItem

ExternalUrl createExternalUrlItem(String name,
                                  String description,
                                  String url)
                                  throws InsufficientPrivilegesException,
                                         InternalErrorException,
                                         ItemAlreadyExistException
Create an External URL into this folder.

Parameters:
name - the external URL name.
description - the external URL description.
url - the URL.
Returns:
the new URL file.
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.

createExternalUrlItem

ExternalUrl createExternalUrlItem(String name,
                                  String description,
                                  InputStream url)
                                  throws InsufficientPrivilegesException,
                                         InternalErrorException,
                                         ItemAlreadyExistException
Create an External URL into this folder.

Parameters:
name - the external URL name.
description - the external URL description.
url - the URL.
Returns:
the new URL file.
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.

createReportTemplateItem

ReportTemplate createReportTemplateItem(String name,
                                        String description,
                                        Calendar created,
                                        Calendar lastEdit,
                                        String author,
                                        String lastEditBy,
                                        int numberOfSections,
                                        String status,
                                        InputStream templateData)
                                        throws InsufficientPrivilegesException,
                                               InternalErrorException,
                                               ItemAlreadyExistException
Create a Report Template into this 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 data.
Returns:
the 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.

createReportItem

Report createReportItem(String name,
                        String description,
                        Calendar created,
                        Calendar lastEdit,
                        String author,
                        String lastEditBy,
                        String templateName,
                        int numberOfSections,
                        String status,
                        InputStream reportData)
                        throws InsufficientPrivilegesException,
                               InternalErrorException,
                               ItemAlreadyExistException
Create a Report into this 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 data.
Returns:
the 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.

createQueryItem

Query createQueryItem(String name,
                      String description,
                      String query,
                      QueryType queryType)
                      throws InsufficientPrivilegesException,
                             InternalErrorException,
                             ItemAlreadyExistException
Create a new Query into this folder.

Parameters:
name - the query name.
description - the query description.
query - the query.
queryType - the query type.
Returns:
the new query.
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.

createQueryItem

Query createQueryItem(String name,
                      String description,
                      InputStream query,
                      QueryType queryType)
                      throws InsufficientPrivilegesException,
                             InternalErrorException,
                             ItemAlreadyExistException
Create a new Query into this folder.

Parameters:
name - the query name.
description - the query description.
query - the query.
queryType - the query type.
Returns:
the new query.
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.

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)
                                   throws InsufficientPrivilegesException,
                                          WorkspaceFolderNotFoundException,
                                          InternalErrorException,
                                          ItemAlreadyExistException,
                                          WrongDestinationException
Create a new AquaMaps Item into this 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.
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.

createAnnotationItem

Annotation createAnnotationItem(String name,
                                String description,
                                String oid,
                                Map<String,String> data)
                                throws InsufficientPrivilegesException,
                                       InternalErrorException,
                                       ItemAlreadyExistException
Create a new annotation into this folder.

Parameters:
name - the annotation name.
description - the annotation description.
oid - the oid of the object where the annotation come from.
data - the annotation data.
Returns:
the new annotation.
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.

createMetadataItem

Metadata createMetadataItem(String name,
                            String description,
                            String oid,
                            String schema,
                            String language,
                            String metadata,
                            String collectionName)
                            throws InsufficientPrivilegesException,
                                   InternalErrorException,
                                   ItemAlreadyExistException
Create a new Metadata into this folder.

Parameters:
name - the metadata name.
description - the metadata description.
oid - the oid of the object where the metadata come from.
schema - the metadata schema.
language - the metadata language.
metadata - the metadata data.
collectionName - the metadata referred object collection name.
Returns:
the new metadata.
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.

createDocumentItem

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

Parameters:
name - the document name.
description - the document description.
oid - the document oid.
mimeType - the document mime type.
documentData - the document data.
metadata - the document metadata.
annotations - the document annotations.
collectionName - the document collection name.
Returns:
the new document.
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.

createImageDocumentItem

ImageDocument createImageDocumentItem(String name,
                                      String description,
                                      String oid,
                                      String mimeType,
                                      InputStream imageData,
                                      Map<String,String> metadata,
                                      Map<String,String> annotations,
                                      String collectionName)
                                      throws InsufficientPrivilegesException,
                                             InternalErrorException,
                                             ItemAlreadyExistException
Create a new image document into this folder.

Parameters:
name - the document image name.
description - the document image description.
oid - the document image oid.
mimeType - the image document mime type.
imageData - the document image data.
metadata - the document image metadata.
annotations - the document image annotations.
collectionName - the document image collection name.
Returns:
the new document image.
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.

createPDFDocumentItem

PDFDocument createPDFDocumentItem(String name,
                                  String description,
                                  String oid,
                                  String mimeType,
                                  InputStream data,
                                  Map<String,String> metadata,
                                  Map<String,String> annotations,
                                  String collectionName)
                                  throws InsufficientPrivilegesException,
                                         InternalErrorException,
                                         ItemAlreadyExistException
Create a new PDF document.

Parameters:
name - the PDF document name.
description - the document PDF description.
oid - the document PDF oid.
mimeType - the document PDF mime type.
data - the document PDF data.
metadata - the document PDF metadata.
annotations - the document PDF annotations.
collectionName - the document collection name.
Returns:
the new PDF document.
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.

createUrlDocumentItem

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

Parameters:
name - the document name.
description - the document description.
oid - the document oid.
mimeType - the document mimeType.
documentData - the document data.
metadata - the document metadata.
annotations - the document annotations.
collectionName - the document collection name.
Returns:
the new document.
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.

createDocumentLinkItem

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

Parameters:
name - the document name.
description - the document description.
oid - the document oid.
metadata - the document metadata.
annotations - the document annotations.
collectionName - the document collection name.
mimeType - the document mimeType.
Returns:
the new document.
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.

createImageDocumentLinkItem

ImageDocumentLink createImageDocumentLinkItem(String name,
                                              String description,
                                              String oid,
                                              Map<String,String> metadata,
                                              Map<String,String> annotations,
                                              String collectionName,
                                              String mimeType)
                                              throws InsufficientPrivilegesException,
                                                     InternalErrorException,
                                                     ItemAlreadyExistException
Create a new image document link into this folder.

Parameters:
name - the document image name.
description - the document image description.
oid - the document image oid.
metadata - the document image metadata.
annotations - the document image annotations.
collectionName - the document image collection name.
mimeType - the image document mimeType.
Returns:
the new document image.
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.

createPDFDocumentLinkItem

PDFDocumentLink createPDFDocumentLinkItem(String name,
                                          String description,
                                          String oid,
                                          Map<String,String> metadata,
                                          Map<String,String> annotations,
                                          String collectionName,
                                          String mimeType)
                                          throws InsufficientPrivilegesException,
                                                 InternalErrorException,
                                                 ItemAlreadyExistException
Create a new PDF document link.

Parameters:
name - the pdf document name.
description - the document pdf description.
oid - the document pdf oid.
metadata - the document pdf metadata.
annotations - the document pdf annotations.
collectionName - the document collection name.
mimeType - the pdf document mimeType.
Returns:
the new pdf document.
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.

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)
                            throws InsufficientPrivilegesException,
                                   InternalErrorException,
                                   ItemAlreadyExistException
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).
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.

createWorkflowReport

WorkflowReport createWorkflowReport(String name,
                                    String description,
                                    String workflowId,
                                    String workflowStatus,
                                    String workflowData)
                                    throws InsufficientPrivilegesException,
                                           InternalErrorException,
                                           ItemAlreadyExistException
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.
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)
                                        throws InsufficientPrivilegesException,
                                               InternalErrorException,
                                               ItemAlreadyExistException
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.
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.

getNewFolderBulkCreator

FolderBulkCreator getNewFolderBulkCreator()
                                          throws InternalErrorException
Create a new FolderBulkCreator for this folder.

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

createExternalResourceLink

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

share

WorkspaceSharedFolder share(List<String> useers)
                            throws InsufficientPrivilegesException,
                                   WrongDestinationException,
                                   InternalErrorException
Throws:
InsufficientPrivilegesException
WrongDestinationException
InternalErrorException


Copyright © 2013. All Rights Reserved.