org.gcube.portlets.user.homelibrary.jcr.workspace
Class JCRWorkspaceItem

java.lang.Object
  extended by org.gcube.portlets.user.homelibrary.jcr.workspace.JCRWorkspaceItem
All Implemented Interfaces:
org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Direct Known Subclasses:
JCRWorkspaceFolder, JCRWorkspaceFolderItem

public abstract class JCRWorkspaceItem
extends Object
implements org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem


Field Summary
protected  String identifier
           
protected static org.gcube.common.core.utils.logging.GCUBEClientLog logger
           
protected  JCRWorkspace workspace
           
 
Constructor Summary
JCRWorkspaceItem(JCRWorkspace workspace, javax.jcr.Node node)
           
JCRWorkspaceItem(JCRWorkspace workspace, javax.jcr.Node node, String name, String description)
           
 
Method Summary
 org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem cloneItem(String cloneName)
           
 org.gcube.portlets.user.homelibrary.home.workspace.acl.Capabilities getCapabilities()
           
 Calendar getCreationTime()
           
 String getDescription()
           
 String getId()
           
 org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItemAction getLastAction()
           
 Calendar getLastModificationTime()
           
 String getName()
           
 org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder getParent()
           
 String getPath()
           
 String getPath(javax.jcr.Node node)
           
 org.gcube.portlets.user.homelibrary.home.workspace.Properties getProperties()
           
 javax.jcr.Node internalCopy(javax.jcr.Node nodeFolder, String newName)
           
 void internalDescription(javax.jcr.Node node, String newDescription)
           
 void internalMove(javax.jcr.Node destinationFolderNode)
           
 void internalRename(javax.jcr.Node node, String newName)
           
 boolean isRoot()
           
 boolean isRoot(javax.jcr.Node node)
           
 void move(org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder destination)
           
 void remove()
           
 void rename(String name)
           
 void save(javax.jcr.Node node)
           
 void setDescription(String description)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
getChildren, getOwner, getType, removeChild
 

Field Detail

workspace

protected final JCRWorkspace workspace

identifier

protected String identifier

logger

protected static org.gcube.common.core.utils.logging.GCUBEClientLog logger
Constructor Detail

JCRWorkspaceItem

public JCRWorkspaceItem(JCRWorkspace workspace,
                        javax.jcr.Node node)
                 throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

JCRWorkspaceItem

public JCRWorkspaceItem(JCRWorkspace workspace,
                        javax.jcr.Node node,
                        String name,
                        String description)
                 throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException
Method Detail

save

public void save(javax.jcr.Node node)
          throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getId

public String getId()
             throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getId in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

getName

public String getName()
               throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getName in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

getDescription

public String getDescription()
                      throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getDescription in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

setDescription

public void setDescription(String description)
                    throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
setDescription in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

rename

public void rename(String name)
            throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException,
                   org.gcube.portlets.user.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException,
                   org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
Specified by:
rename in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException

getCreationTime

public Calendar getCreationTime()
                         throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getCreationTime in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

getLastModificationTime

public Calendar getLastModificationTime()
                                 throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getLastModificationTime in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

getLastAction

public org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItemAction getLastAction()
                                                                                     throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getLastAction in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

getCapabilities

public org.gcube.portlets.user.homelibrary.home.workspace.acl.Capabilities getCapabilities()
Specified by:
getCapabilities in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem

getProperties

public org.gcube.portlets.user.homelibrary.home.workspace.Properties getProperties()
                                                                            throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getProperties in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

getParent

public org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder getParent()
                                                                             throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getParent in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

getPath

public String getPath()
               throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getPath in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

getPath

public String getPath(javax.jcr.Node node)
               throws javax.jcr.RepositoryException,
                      org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Throws:
javax.jcr.RepositoryException
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

isRoot

public boolean isRoot()
               throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
isRoot in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

isRoot

public boolean isRoot(javax.jcr.Node node)
               throws javax.jcr.RepositoryException,
                      org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Throws:
javax.jcr.RepositoryException
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

remove

public void remove()
            throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException,
                   org.gcube.portlets.user.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException
Specified by:
remove in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException

move

public void move(org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder destination)
          throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException,
                 org.gcube.portlets.user.homelibrary.home.workspace.exceptions.WrongDestinationException,
                 org.gcube.portlets.user.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException,
                 org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
Specified by:
move in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.WrongDestinationException
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException

cloneItem

public org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem cloneItem(String cloneName)
                                                                           throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException,
                                                                                  org.gcube.portlets.user.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException,
                                                                                  org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
Specified by:
cloneItem in interface org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException

internalCopy

public javax.jcr.Node internalCopy(javax.jcr.Node nodeFolder,
                                   String newName)
                            throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException,
                                   org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException,
                                   org.gcube.portlets.user.homelibrary.home.workspace.exceptions.WrongDestinationException,
                                   javax.jcr.RepositoryException
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.WrongDestinationException
javax.jcr.RepositoryException

internalMove

public void internalMove(javax.jcr.Node destinationFolderNode)
                  throws org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException,
                         org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException,
                         javax.jcr.RepositoryException
Throws:
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
javax.jcr.RepositoryException

internalRename

public void internalRename(javax.jcr.Node node,
                           String newName)
                    throws org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException,
                           org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Throws:
org.gcube.portlets.user.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

internalDescription

public void internalDescription(javax.jcr.Node node,
                                String newDescription)
                         throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException


Copyright © 2012. All Rights Reserved.