org.sakaiproject.component.legacy.discussion
Class BaseDiscussionService.BaseDiscussionMessageHeaderEdit

java.lang.Object
  extended byorg.sakaiproject.component.legacy.message.BaseMessageService.BaseMessageHeaderEdit
      extended byorg.sakaiproject.component.legacy.discussion.BaseDiscussionService.BaseDiscussionMessageHeaderEdit
All Implemented Interfaces:
AttachmentContainer, AttachmentContainerEdit, DiscussionMessageHeader, DiscussionMessageHeaderEdit, MessageHeader, MessageHeaderEdit
Enclosing class:
BaseDiscussionService

public class BaseDiscussionService.BaseDiscussionMessageHeaderEdit
extends BaseMessageService.BaseMessageHeaderEdit
implements DiscussionMessageHeaderEdit

DiscussionMessageHeaderEdit implementation


Nested Class Summary
 
Nested classes inherited from class org.sakaiproject.service.legacy.message.MessageHeader
MessageHeader.MessageAccess
 
Field Summary
protected  String m_category
          The category for the discussion message.
protected  String m_replyTo
          The message id to which this message is a reply to (message id string).
protected  String m_subject
          The subject for the discussion.
 
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
BaseDiscussionService.BaseDiscussionMessageHeaderEdit(Message msg, Element el)
          Construct, from an already existing XML DOM element.
BaseDiscussionService.BaseDiscussionMessageHeaderEdit(Message msg, MessageHeader other)
          Construct as a copy of another header.
BaseDiscussionService.BaseDiscussionMessageHeaderEdit(Message msg, String id)
          Construct.
 
Method Summary
 String getCategory()
          Access the category of the discussion.
 String getReplyTo()
          Access the local or resource id of the message this one is a reply to, used in threading.
 String getSubject()
          Access the subject of the discussion.
 void setCategory(String category)
          Set the category of the discussion.
 void setReplyTo(String id)
          Set the local or resource id of the message this one is a reply to, used in threading.
 void setSubject(String subject)
          Set the subject of the discussion.
 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 discussion.


m_category

protected String m_category
The category for the discussion message.


m_replyTo

protected String m_replyTo
The message id to which this message is a reply to (message id string).

Constructor Detail

BaseDiscussionService.BaseDiscussionMessageHeaderEdit

public BaseDiscussionService.BaseDiscussionMessageHeaderEdit(Message msg,
                                                             String id)
Construct.

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

BaseDiscussionService.BaseDiscussionMessageHeaderEdit

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

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

BaseDiscussionService.BaseDiscussionMessageHeaderEdit

public BaseDiscussionService.BaseDiscussionMessageHeaderEdit(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 discussion.

Specified by:
getSubject in interface DiscussionMessageHeader
Returns:
The subject of the discussion.

setSubject

public void setSubject(String subject)
Set the subject of the discussion.

Specified by:
setSubject in interface DiscussionMessageHeaderEdit
Parameters:
subject - The subject of the discussion.

getCategory

public String getCategory()
Access the category of the discussion.

Specified by:
getCategory in interface DiscussionMessageHeader
Returns:
The category of the discussion.

setCategory

public void setCategory(String category)
Set the category of the discussion.

Specified by:
setCategory in interface DiscussionMessageHeaderEdit
Parameters:
category - The category of the discussion.

getReplyTo

public String getReplyTo()
Access the local or resource id of the message this one is a reply to, used in threading.

Specified by:
getReplyTo in interface DiscussionMessageHeader
Returns:
The id of the message this one is a reply to, used in threading, or null if none.

setReplyTo

public void setReplyTo(String id)
Set the local or resource id of the message this one is a reply to, used in threading.

Specified by:
setReplyTo in interface DiscussionMessageHeaderEdit
Parameters:
id - The local or resource id of the message this one is a reply to, used in threading.
Returns:
The id of the message this one is a reply to, used in threading, or null if none.

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.