org.gcube.portlets.user.homelibrary.jcr.sharing
Class JCRWorkspaceMessage

java.lang.Object
  extended by org.gcube.portlets.user.homelibrary.jcr.sharing.JCRWorkspaceMessage
All Implemented Interfaces:
org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage

public class JCRWorkspaceMessage
extends Object
implements org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage


Nested Class Summary
static class JCRWorkspaceMessage.WorkspaceMessageType
           
 
Constructor Summary
JCRWorkspaceMessage(JCRWorkspace workspace, javax.jcr.Node node, JCRWorkspaceMessage.WorkspaceMessageType type)
           
JCRWorkspaceMessage(JCRWorkspace workspace, javax.jcr.Node node, JCRWorkspaceMessage.WorkspaceMessageType type, String messageId, String subject, String body, org.gcube.portlets.user.homelibrary.home.User sender, List<String> attachmentIds, List<String> addresses)
           
 
Method Summary
 List<String> getAddresses()
           
 List<org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem> getAttachments()
           
 List<String> getAttachmentsIds()
           
 String getBody()
           
 String getId()
           
 org.gcube.portlets.user.homelibrary.home.User getSender()
           
 Calendar getSendTime()
           
 String getSubject()
           
 boolean isOpened()
           
 boolean isRead()
           
 void open()
           
 void saveAttachment(String attachmentId, String destinationFolderId)
           
 void saveAttachments(String destinationFolderId)
           
 void setStatus(boolean status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCRWorkspaceMessage

public JCRWorkspaceMessage(JCRWorkspace workspace,
                           javax.jcr.Node node,
                           JCRWorkspaceMessage.WorkspaceMessageType type)
                    throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

JCRWorkspaceMessage

public JCRWorkspaceMessage(JCRWorkspace workspace,
                           javax.jcr.Node node,
                           JCRWorkspaceMessage.WorkspaceMessageType type,
                           String messageId,
                           String subject,
                           String body,
                           org.gcube.portlets.user.homelibrary.home.User sender,
                           List<String> attachmentIds,
                           List<String> addresses)
                    throws javax.jcr.RepositoryException,
                           org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Throws:
javax.jcr.RepositoryException
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Method Detail

getId

public String getId()
Specified by:
getId in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage

getSender

public org.gcube.portlets.user.homelibrary.home.User getSender()
Specified by:
getSender in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage

getSendTime

public Calendar getSendTime()
Specified by:
getSendTime in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage

getSubject

public String getSubject()
Specified by:
getSubject in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage

getBody

public String getBody()
Specified by:
getBody in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage

getAttachmentsIds

public List<String> getAttachmentsIds()
Specified by:
getAttachmentsIds in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage

isRead

public boolean isRead()
Specified by:
isRead in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage

open

public void open()
          throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
open in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

setStatus

public void setStatus(boolean status)
               throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
setStatus in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

saveAttachments

public void saveAttachments(String destinationFolderId)
                     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.ItemNotFoundException
Specified by:
saveAttachments in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage
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.ItemNotFoundException

saveAttachment

public void saveAttachment(String attachmentId,
                           String destinationFolderId)
                    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.ItemNotFoundException
Specified by:
saveAttachment in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage
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.ItemNotFoundException

getAttachments

public List<org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem> getAttachments()
                                                                                      throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getAttachments in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

getAddresses

public List<String> getAddresses()
Specified by:
getAddresses in interface org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessage

isOpened

public boolean isOpened()


Copyright © 2013. All Rights Reserved.