org.gcube.common.homelibrary.jcr.workspace
Class JCRWorkspaceItem
java.lang.Object
org.gcube.common.homelibrary.jcr.workspace.JCRWorkspaceItem
- All Implemented Interfaces:
- org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Direct Known Subclasses:
- JCRAbstractWorkspaceFolder, JCRGCubeItem, JCRWorkspaceFolderItem
public abstract class JCRWorkspaceItem
- extends Object
- implements org.gcube.common.homelibrary.home.workspace.WorkspaceItem
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem |
getChildren, getType, removeChild |
TITLE
public static final String TITLE
- See Also:
- Constant Field Values
CREATED
public static final String CREATED
- See Also:
- Constant Field Values
LAST_MODIFIED
public static final String LAST_MODIFIED
- See Also:
- Constant Field Values
OWNER
public static final String OWNER
- See Also:
- Constant Field Values
PORTAL_LOGIN
public static final String PORTAL_LOGIN
- See Also:
- Constant Field Values
LAST_MODIFIED_BY
protected static final String LAST_MODIFIED_BY
- See Also:
- Constant Field Values
DESCRIPTION
protected static final String DESCRIPTION
- See Also:
- Constant Field Values
LAST_ACTION
protected static final String LAST_ACTION
- See Also:
- Constant Field Values
READERS
protected static final String READERS
- See Also:
- Constant Field Values
NT_READERS
protected static final String NT_READERS
- See Also:
- Constant Field Values
ACCOUNTING
protected static final String ACCOUNTING
- See Also:
- Constant Field Values
NT_ACCOUNTING
protected static final String NT_ACCOUNTING
- See Also:
- Constant Field Values
USERS
public static final String USERS
- See Also:
- Constant Field Values
NT_WORKSPACE_FILE
public static final String NT_WORKSPACE_FILE
- See Also:
- Constant Field Values
NT_WORKSPACE_IMAGE
public static final String NT_WORKSPACE_IMAGE
- See Also:
- Constant Field Values
NT_WORKSPACE_PDF_FILE
public static final String NT_WORKSPACE_PDF_FILE
- See Also:
- Constant Field Values
workspace
protected final JCRWorkspace workspace
identifier
protected String identifier
creationDate
protected Calendar creationDate
remotePath
public String remotePath
deep
public int deep
logger
protected static org.slf4j.Logger logger
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
setOwnerNode
public void setOwnerNode(javax.jcr.Node nodeOwner)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
getOwner
public org.gcube.common.homelibrary.home.User getOwner()
- Specified by:
getOwner in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
save
public void save(javax.jcr.Node node)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
getId
public String getId()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getId in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getName
public String getName()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getName in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getDescription
public String getDescription()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getDescription in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
setDescription
public void setDescription(String description)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
setDescription in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
rename
public void rename(String name)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException,
org.gcube.common.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException,
org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
- Specified by:
rename in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
org.gcube.common.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException
org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
getCreationTime
public Calendar getCreationTime()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getCreationTime in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getLastModificationTime
public Calendar getLastModificationTime()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getLastModificationTime in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getLastAction
public org.gcube.common.homelibrary.home.workspace.WorkspaceItemAction getLastAction()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getLastAction in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getCapabilities
public org.gcube.common.homelibrary.home.workspace.acl.Capabilities getCapabilities()
- Specified by:
getCapabilities in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
getProperties
public org.gcube.common.homelibrary.home.workspace.Properties getProperties()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getProperties in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
addAccountingEntry
public void addAccountingEntry(org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntry entry)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getAccounting
public List<org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntry> getAccounting()
- Specified by:
getAccounting in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
getReadersNode
public List<org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryRead> getReadersNode()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getParent
public org.gcube.common.homelibrary.home.workspace.WorkspaceFolder getParent()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getParent in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getParent
protected JCRAbstractWorkspaceFolder getParent(javax.jcr.Node node)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
isShared
public boolean isShared()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
isShared in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getIdSharedFolder
public String getIdSharedFolder()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getIdSharedFolder in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getPath
public String getPath()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getPath in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getPath
public String getPath(javax.jcr.Node node)
throws javax.jcr.RepositoryException,
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
javax.jcr.RepositoryException
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
isRoot
public boolean isRoot()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
isRoot in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
isRoot
public boolean isRoot(javax.jcr.Node node)
throws javax.jcr.RepositoryException,
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
javax.jcr.RepositoryException
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
remove
public void remove()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException,
org.gcube.common.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException
- Specified by:
remove in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
org.gcube.common.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException
move
public void move(org.gcube.common.homelibrary.home.workspace.WorkspaceFolder destination)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException,
org.gcube.common.homelibrary.home.workspace.exceptions.WrongDestinationException,
org.gcube.common.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException,
org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
- Specified by:
move in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
org.gcube.common.homelibrary.home.workspace.exceptions.WrongDestinationException
org.gcube.common.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException
org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
cloneItem
public org.gcube.common.homelibrary.home.workspace.WorkspaceItem cloneItem(String cloneName)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException,
org.gcube.common.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException,
org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
- Specified by:
cloneItem in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
org.gcube.common.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException
org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
internalCopy
public javax.jcr.Node internalCopy(javax.jcr.Node nodeFolder,
String newName)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException,
org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException,
org.gcube.common.homelibrary.home.workspace.exceptions.WrongDestinationException,
javax.jcr.RepositoryException
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
org.gcube.common.homelibrary.home.workspace.exceptions.WrongDestinationException
javax.jcr.RepositoryException
internalMove
public void internalMove(javax.jcr.Node destinationFolderNode)
throws org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException,
org.gcube.common.homelibrary.home.exceptions.InternalErrorException,
javax.jcr.RepositoryException
- Throws:
org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
javax.jcr.RepositoryException
internalRename
public void internalRename(javax.jcr.Node node,
String newName)
throws org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException,
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
internalDescription
public void internalDescription(javax.jcr.Node node,
String newDescription)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
isMarkedAsRead
public boolean isMarkedAsRead()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
isMarkedAsRead in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getReaders
public List<org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryRead> getReaders()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getReaders in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
setShareHistory
public void setShareHistory(List<String> users,
String author)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
setUnshareHistory
public void setUnshareHistory(String user)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
setShare
public void setShare(List<String> users,
String author)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
setUnshare
public void setUnshare(String user)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
markAsRead
public void markAsRead(boolean read)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
markAsRead in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getRemotePath
public String getRemotePath()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
getRemotePath in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
setRemotePath
public void setRemotePath(String nodeFolderPath)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Specified by:
setRemotePath in interface org.gcube.common.homelibrary.home.workspace.WorkspaceItem
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
setOwnerToCurrentUser
public void setOwnerToCurrentUser(org.gcube.common.homelibrary.home.workspace.WorkspaceItem item)
throws javax.jcr.RepositoryException,
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
javax.jcr.RepositoryException
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
getUsers
public List<String> getUsers()
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
- Throws:
org.gcube.common.homelibrary.home.exceptions.InternalErrorException
Copyright © 2013. All Rights Reserved.