org.sakaiproject.component.legacy.email
Class BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit

java.lang.Object
  extended byorg.sakaiproject.component.legacy.message.BaseMessageService.BaseMessageHeaderEdit
      extended byorg.sakaiproject.component.legacy.email.BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit
All Implemented Interfaces:
AttachmentContainer, AttachmentContainerEdit, MailArchiveMessageHeader, MailArchiveMessageHeaderEdit, MessageHeader, MessageHeaderEdit
Enclosing class:
BaseMailArchiveService

public class BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit
extends BaseMessageService.BaseMessageHeaderEdit
implements MailArchiveMessageHeaderEdit

MailArchiveMessageHeaderEdit implementation


Nested Class Summary
 
Nested classes inherited from class org.sakaiproject.service.legacy.message.MessageHeader
MessageHeader.MessageAccess
 
Field Summary
protected  Time m_dateSent
          The date: sent for the message.
protected  String m_fromAddress
          The from: address for the message.
protected  List m_mailHeaders
          The entire set of mail headers.
protected  String m_subject
          The subject for the mail message.
 
Fields inherited from class org.sakaiproject.component.legacy.message.BaseMessageService.BaseMessageHeaderEdit
m_access, m_attachments, m_date, m_draft, m_from, m_groups, m_id, m_message
 
Constructor Summary
BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit(Message msg, Element el)
          Construct, from an already existing XML DOM element.
BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit(Message msg, MessageHeader other)
          Construct as a copy of another header.
BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit(Message msg, String id)
          Construct.
 
Method Summary
 Time getDateSent()
          Access the date: sent of the message.
 String getFromAddress()
          Access the from: address of the message.
 List getMailHeaders()
          Access the entire set of mail headers the message.
 String getSubject()
          Access the subject of the mail message.
 void setDateSent(Time sent)
          Set the date: sent of the message.
 void setFromAddress(String from)
          Set the the from: address of the message.
 void setMailHeaders(List headers)
          Set the entire set of mail headers of the message.
 void setSubject(String subject)
          Set the subject of the mail message.
 Element toXml(Document doc, Stack stack)
          Serialize the resource into XML, adding an element to the doc under the top of the stack element.
 
Methods inherited from class org.sakaiproject.component.legacy.message.BaseMessageService.BaseMessageHeaderEdit
addAttachment, addGroup, clearAttachments, getAccess, getAttachments, getDate, getDraft, getFrom, getGroups, getId, removeAttachment, removeGroup, replaceAttachments, setAccess, setDate, setDraft, setFrom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sakaiproject.service.legacy.message.MessageHeader
getAccess, getDate, getDraft, getFrom, getGroups, getId
 
Methods inherited from interface org.sakaiproject.service.legacy.entity.AttachmentContainer
getAttachments
 
Methods inherited from interface org.sakaiproject.service.legacy.message.MessageHeaderEdit
addGroup, removeGroup, setAccess, setDate, setDraft, setFrom
 
Methods inherited from interface org.sakaiproject.service.legacy.entity.AttachmentContainerEdit
addAttachment, clearAttachments, removeAttachment, replaceAttachments
 

Field Detail

m_subject

protected String m_subject
The subject for the mail message.


m_fromAddress

protected String m_fromAddress
The from: address for the message.


m_dateSent

protected Time m_dateSent
The date: sent for the message.


m_mailHeaders

protected List m_mailHeaders
The entire set of mail headers.

Constructor Detail

BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit

public BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit(Message msg,
                                                               String id)
Construct.

Parameters:
id - The unique (within the channel) message id.

BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit

public BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit(Message msg,
                                                               Element el)
Construct, from an already existing XML DOM element.

Parameters:
el - The header in XML in a DOM element.

BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit

public BaseMailArchiveService.BaseMailArchiveMessageHeaderEdit(Message msg,
                                                               MessageHeader other)
Construct as a copy of another header.

Parameters:
other - The other message header to copy.
Method Detail

getSubject

public String getSubject()
Access the subject of the mail message.

Specified by:
getSubject in interface MailArchiveMessageHeader
Returns:
The subject of the mail message.

setSubject

public void setSubject(String subject)
Set the subject of the mail message.

Specified by:
setSubject in interface MailArchiveMessageHeaderEdit
Parameters:
subject - The subject of the mail message.

getFromAddress

public String getFromAddress()
Access the from: address of the message.

Specified by:
getFromAddress in interface MailArchiveMessageHeader
Returns:
The from: address of the message.

setFromAddress

public void setFromAddress(String from)
Set the the from: address of the message.

Specified by:
setFromAddress in interface MailArchiveMessageHeaderEdit
Parameters:
from - The from: address of the message.

getDateSent

public Time getDateSent()
Access the date: sent of the message.

Specified by:
getDateSent in interface MailArchiveMessageHeader
Returns:
The date: sent of the message.

setDateSent

public void setDateSent(Time sent)
Set the date: sent of the message.

Specified by:
setDateSent in interface MailArchiveMessageHeaderEdit
Parameters:
sent - The the date: sent of the message.

getMailHeaders

public List getMailHeaders()
Access the entire set of mail headers the message.

Specified by:
getMailHeaders in interface MailArchiveMessageHeader
Returns:
The entire set of mail headers of the message (List of String).

setMailHeaders

public void setMailHeaders(List headers)
Set the entire set of mail headers of the message.

Specified by:
setMailHeaders in interface MailArchiveMessageHeaderEdit
Parameters:
headers - The the entire set of mail headers of the message.

toXml

public Element toXml(Document doc,
                     Stack stack)
Serialize the resource into XML, adding an element to the doc under the top of the stack element.

Specified by:
toXml in interface MessageHeader
Overrides:
toXml in class BaseMessageService.BaseMessageHeaderEdit
Parameters:
doc - The DOM doc to contain the XML (or null for a string return).
stack - The DOM elements, the top of which is the containing element of the new "resource" element.
Returns:
The newly added element.