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

All Known Subinterfaces:
Annotation, Basket, BasketItem, Document, DocumentLink, ExternalFile, ExternalImage, ExternalPDFFile, ExternalUrl, ImageDocument, ImageDocumentLink, InfoObject, InfoObjectLink, Metadata, PDFDocument, PDFDocumentLink, Query, Report, ReportTemplate, UrlDocument, Workspace, WorkspaceFolder

public interface WorkspaceAreaItem

Define a Workspace item like workspace, basket or basket-item.

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

Method Summary
 WorkspaceAreaItem cloneItem(java.lang.String cloneName)
          Clone this item.
 Capabilities getCapabilities()
          The item capabilities.
 java.util.List<? extends WorkspaceAreaItem> getChildren()
          Return this item children.
 java.util.Calendar getCreationTime()
          This item creation time.
 java.lang.String getDescription()
          This item description.
 java.lang.String getId()
          This item id.
 WorkspaceAreaItemAction getLastAction()
          Return the last action on this Item.
 java.util.Calendar getLastModificationTime()
          This item last modification time.
 java.lang.String getName()
          This item name.
 User getOwner()
          This item owner.
 WorkspaceFolder getParent()
          Return this item parent.
 java.lang.String getPath()
          Return the current item path.
 Properties getProperties()
          The item properties.
 WorkspaceAreaItemType getType()
          Return this item type.
 boolean isRoot()
          Says if this item is a root element.
 void move(WorkspaceFolder destination)
          Move this item to a new folder.
 void remove()
          Remove this item from the workspace area.
 void removeChild(WorkspaceAreaItem child)
          Remove a child from this item.
 void rename(java.lang.String name)
          Change this item name.
 void setDescription(java.lang.String description)
          Set a new item description.
 

Method Detail

getId

java.lang.String getId()
                       throws InternalErrorException
This item id.

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

getName

java.lang.String getName()
                         throws InternalErrorException
This item name.

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

getDescription

java.lang.String getDescription()
                                throws InternalErrorException
This item description.

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

setDescription

void setDescription(java.lang.String description)
                    throws InternalErrorException
Set a new item description.

Parameters:
description - the new description.
Throws:
InternalErrorException - if an internal error occurs.

rename

void rename(java.lang.String name)
            throws InternalErrorException,
                   InsufficientPrivilegesException,
                   ItemAlreadyExistException
Change this item name.

Parameters:
name - the new name.
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 this name already exists in the containing folder.

getCreationTime

java.util.Calendar getCreationTime()
                                   throws InternalErrorException
This item creation time.

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

getLastModificationTime

java.util.Calendar getLastModificationTime()
                                           throws InternalErrorException
This item last modification time.

Returns:
the last modification time.
Throws:
InternalErrorException - if an internal error occurs.

getLastAction

WorkspaceAreaItemAction getLastAction()
                                      throws InternalErrorException
Return the last action on this Item.

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

getOwner

User getOwner()
              throws InternalErrorException
This item owner.

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

getCapabilities

Capabilities getCapabilities()
The item capabilities.

Returns:
the capabilities.

getProperties

Properties getProperties()
                         throws InternalErrorException
The item properties.

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

getType

WorkspaceAreaItemType getType()
Return this item type.

Returns:
the type.

getParent

WorkspaceFolder getParent()
                          throws InternalErrorException
Return this item parent.

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

getPath

java.lang.String getPath()
                         throws InternalErrorException
Return the current item path.

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

isRoot

boolean isRoot()
               throws InternalErrorException
Says if this item is a root element.

Returns:
true if this element is a root, false otherwise.
Throws:
InternalErrorException - if an internal error occurs.

getChildren

java.util.List<? extends WorkspaceAreaItem> getChildren()
                                                        throws InternalErrorException
Return this item children.

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

removeChild

void removeChild(WorkspaceAreaItem child)
                 throws InternalErrorException,
                        InsufficientPrivilegesException
Remove a child from this item.

Parameters:
child - the child to remove.
Throws:
InternalErrorException - if an internal error occurs.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.

remove

void remove()
            throws InternalErrorException,
                   InsufficientPrivilegesException
Remove this item from the workspace area.

Throws:
InternalErrorException - if an internal error occurs.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.

move

void move(WorkspaceFolder destination)
          throws InternalErrorException,
                 WrongDestinationException,
                 InsufficientPrivilegesException,
                 ItemAlreadyExistException
Move this item to a new folder.

Parameters:
destination - the destination folder.
Throws:
InternalErrorException - if an internal error occurs.
WrongDestinationException - if the destination folder have a wrong type.
InsufficientPrivilegesException - if the user don't have sufficient privileges to perform this operation.
ItemAlreadyExistException - if an item with the new name already exist in the destination folder.

cloneItem

WorkspaceAreaItem cloneItem(java.lang.String cloneName)
                            throws InternalErrorException,
                                   InsufficientPrivilegesException,
                                   ItemAlreadyExistException
Clone this item.

Parameters:
cloneName - the new clone name.
Returns:
the clone.
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 new name already exist.