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

All Known Subinterfaces:
AquaMapsItem, Document, DocumentLink, ExternalFile, ExternalImage, ExternalPDFFile, ExternalResourceLink, ExternalUrl, FolderItem, ImageDocument, ImageDocumentLink, InfoObjectLink, Metadata, PDFDocument, PDFDocumentLink, Query, Report, ReportTemplate, TabularDataLink, TimeSeries, UrlDocument, WorkflowReport, WorkflowTemplate, WorkspaceFolder, WorkspaceSharedFolder

public interface WorkspaceItem

Define a Workspace item like folder or folder-item.

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

Method Summary
 WorkspaceItem cloneItem(String cloneName)
          Clone this item.
 List<AccountingEntry> getAccounting()
           
 Capabilities getCapabilities()
          The item capabilities.
 List<? extends WorkspaceItem> getChildren()
          Return this item children.
 Calendar getCreationTime()
          This item creation time.
 String getDescription()
          This item description.
 String getId()
          This item id.
 String getIdSharedFolder()
           
 WorkspaceItemAction getLastAction()
          Return the last action on this Item.
 Calendar getLastModificationTime()
          This item last modification time.
 String getName()
          This item name.
 User getOwner()
          This item owner.
 WorkspaceFolder getParent()
          Return this item parent.
 String getPath()
          Return the current item path.
 Properties getProperties()
          The item properties.
 List<AccountingEntryRead> getReaders()
           
 WorkspaceItemType getType()
          Return this item type.
 boolean isMarkedAsRead()
           
 boolean isRoot()
          Says if this item is a root element.
 boolean isShared()
           
 void markAsRead(boolean read)
          Mark as read a shared item
 void move(WorkspaceFolder destination)
          Move this item to a new folder.
 void remove()
          Remove this item from the workspace.
 void removeChild(WorkspaceItem child)
          Remove a child from this item.
 void rename(String name)
          Change this item name.
 void setDescription(String description)
          Set a new item description.
 

Method Detail

getId

String getId()
             throws InternalErrorException
This item id.

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

getName

String getName()
               throws InternalErrorException
This item name.

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

getDescription

String getDescription()
                      throws InternalErrorException
This item description.

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

setDescription

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

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

rename

void rename(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

Calendar getCreationTime()
                         throws InternalErrorException
This item creation time.

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

getLastModificationTime

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

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

getLastAction

WorkspaceItemAction 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.

getAccounting

List<AccountingEntry> getAccounting()
Returns:
the list of {link

getType

WorkspaceItemType 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

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

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

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

removeChild

void removeChild(WorkspaceItem 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.

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

WorkspaceItem cloneItem(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.

isShared

boolean isShared()
                 throws InternalErrorException
Returns:
Throws:
InternalErrorException

isMarkedAsRead

boolean isMarkedAsRead()
                       throws InternalErrorException
Returns:
true if the element is shared and is marked as read, false otherwise.
Throws:
InternalErrorException

getReaders

List<AccountingEntryRead> getReaders()
                                     throws InternalErrorException
Returns:
the list of item readers.
Throws:
InternalErrorException

markAsRead

void markAsRead(boolean read)
                throws InternalErrorException
Mark as read a shared item

Throws:
InternalErrorException

getIdSharedFolder

String getIdSharedFolder()
                         throws InternalErrorException
Returns:
the id of the parent shared folder if the item is shared, null otherwise.
Throws:
InternalErrorException


Copyright © 2013. All Rights Reserved.