org.gcube.portlets.user.homelibrary.home.workspace.basket
Interface BasketBulkCreator


public interface BasketBulkCreator

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

Method Summary
 void commit()
          Commit all requested changes.
 void createAnnotation(java.lang.String annnotationOid, java.lang.String objectName)
          Create a new annotation into this basket.
 void createDocumentAlternativeItem(java.lang.String alternativeOid, java.lang.String collectionId, java.lang.String objectOid)
          Create a new document alternative into this basket.
 void createDocumentAlternativeItem(java.lang.String alternativeOid, java.lang.String collectionId, java.lang.String objectOid, java.lang.String itemName)
          Create a new document alternative into this basket.
 void createDocumentItem(java.lang.String oid, java.lang.String collectionId)
          Create a new document into this basket.
 void createDocumentItem(java.lang.String oid, java.lang.String itemName, java.lang.String collectionId)
          Create a new document into this basket.
 void createDocumentPartItem(java.lang.String partOid, java.lang.String collectionId, java.lang.String objectOid)
          Create a new document part into this basket.
 void createDocumentPartItem(java.lang.String partOid, java.lang.String collectionId, java.lang.String objectOid, java.lang.String itemName)
          Create a new document part into this basket.
 void createExternalUrl(java.lang.String url)
          Create an external url.
 void createMetadata(java.lang.String metadataOid, java.lang.String itemName)
          Create a new metadata into this basket.
 void createQuery(java.lang.String name, java.lang.String query, QueryType queryType)
          Create a new query.
 Basket getDestinationBasket()
          Return the destination basket where all items will be created.
 java.lang.String getId()
          Return this BasketBulkCreator id.
 int getNumberOfRequests()
          Return the number of requests processed by this BasketBulkCreator.
 

Method Detail

getId

java.lang.String getId()
Return this BasketBulkCreator id.

Returns:
the id.

createMetadata

void createMetadata(java.lang.String metadataOid,
                    java.lang.String itemName)
                    throws InsufficientPrivilegesException,
                           InternalErrorException,
                           ItemAlreadyExistException
Create a new metadata into this basket.

Parameters:
metadataOid - the metadata oid.
itemName - the basket item name.
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.

createAnnotation

void createAnnotation(java.lang.String annnotationOid,
                      java.lang.String objectName)
                      throws InsufficientPrivilegesException,
                             InternalErrorException,
                             ItemAlreadyExistException
Create a new annotation into this basket.

Parameters:
annnotationOid - the annotation oid.
objectName - the annotation refered object name.
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.

createDocumentPartItem

void createDocumentPartItem(java.lang.String partOid,
                            java.lang.String collectionId,
                            java.lang.String objectOid,
                            java.lang.String itemName)
                            throws InsufficientPrivilegesException,
                                   InternalErrorException,
                                   ItemAlreadyExistException
Create a new document part into this basket.

Parameters:
partOid - the document part oid.
collectionId - the main document collection id.
objectOid - the main document object oid.
itemName - the main document name.
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.

createDocumentPartItem

void createDocumentPartItem(java.lang.String partOid,
                            java.lang.String collectionId,
                            java.lang.String objectOid)
                            throws InsufficientPrivilegesException,
                                   InternalErrorException,
                                   ItemAlreadyExistException
Create a new document part into this basket. The item name is retrieved from the document name.

Parameters:
partOid - the document part oid.
collectionId - the main document collection id.
objectOid - the main document object oid.
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.

createDocumentAlternativeItem

void createDocumentAlternativeItem(java.lang.String alternativeOid,
                                   java.lang.String collectionId,
                                   java.lang.String objectOid,
                                   java.lang.String itemName)
                                   throws InsufficientPrivilegesException,
                                          InternalErrorException,
                                          ItemAlreadyExistException
Create a new document alternative into this basket.

Parameters:
alternativeOid - the document alternative oid.
collectionId - the main document collection id.
objectOid - the main document object oid.
itemName - the basket item name.
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.

createDocumentAlternativeItem

void createDocumentAlternativeItem(java.lang.String alternativeOid,
                                   java.lang.String collectionId,
                                   java.lang.String objectOid)
                                   throws InsufficientPrivilegesException,
                                          InternalErrorException,
                                          ItemAlreadyExistException
Create a new document alternative into this basket. The item name is retrieved from the document name.

Parameters:
alternativeOid - the document alternative oid.
collectionId - the main document collection id.
objectOid - the main document object oid.
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

void createDocumentItem(java.lang.String oid,
                        java.lang.String itemName,
                        java.lang.String collectionId)
                        throws InsufficientPrivilegesException,
                               InternalErrorException,
                               ItemAlreadyExistException
Create a new document into this basket.

Parameters:
oid - the document oid.
itemName - the basket item name.
collectionId - the document collection id.
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

void createDocumentItem(java.lang.String oid,
                        java.lang.String collectionId)
                        throws InsufficientPrivilegesException,
                               InternalErrorException,
                               ItemAlreadyExistException
Create a new document into this basket. The item name is retrieved from the document name.

Parameters:
oid - the document oid.
collectionId - the document collection id.
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.

createExternalUrl

void createExternalUrl(java.lang.String url)
Create an external url.

Parameters:
url - the url.

createQuery

void createQuery(java.lang.String name,
                 java.lang.String query,
                 QueryType queryType)
Create a new query.

Parameters:
name - the item name.
query - the query.
queryType - the query type.

commit

void commit()
            throws InternalErrorException
Commit all requested changes.

Throws:
InternalErrorException - if an internal error occurs.

getDestinationBasket

Basket getDestinationBasket()
Return the destination basket where all items will be created.

Returns:
the destination basket.

getNumberOfRequests

int getNumberOfRequests()
Return the number of requests processed by this BasketBulkCreator.

Returns:
the number of requests.