|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnan.model.Message
A representation of an NNTP message in RFC 850 format.
Field Summary | |
static java.lang.String |
XML_BODY
XML tag for the body property. |
static java.lang.String |
XML_TAG
XML tag for serialization purposes. |
Constructor Summary | |
Message()
Creates a new Message object. |
|
Message(MessageHeader header,
java.lang.String body)
Creates a new Message object. |
Method Summary | |
void |
addAttachment(Attachment attachment)
Adds an attachment to this Message. |
Attachment |
getAttachment(int index)
Gets an Attachment from this message. |
int |
getAttachmentCount()
Gets the count of attachments on this message. |
java.lang.String |
getBody()
Gets the body of this Message. |
MessageHeader |
getHeader()
Gets the header of this Message. |
java.lang.String |
getQuotedBody()
Gets the quoted message body for use in replying. |
boolean |
isRead()
Asks if this message has been read. |
Attachment |
removeAttachment(int index)
Removes an attachment from this Message. |
void |
setBody(java.lang.String body)
Sets the body of this Message. |
void |
setHeader(MessageHeader header)
Sets the header of this Message. |
void |
setRead(boolean read)
Sets if this message has been read. |
java.lang.String |
toString()
Returns a String representation of this Message. |
org.dom4j.Document |
toXML()
Converts an object into an XML Document. |
void |
transpose(java.lang.Object object)
Transposes (copies over) the values of another object of the same type onto this one. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String XML_TAG
public static final java.lang.String XML_BODY
Constructor Detail |
public Message(MessageHeader header, java.lang.String body)
header
- The MessageHeader of this Message.body
- The body of this message.public Message()
Method Detail |
public java.lang.String getQuotedBody()
public java.lang.String getBody()
public void setBody(java.lang.String body)
body
- The body.public MessageHeader getHeader()
public void setHeader(MessageHeader header)
header
- The MessageHeader.public boolean isRead()
isRead
in interface Selected
public void setRead(boolean read)
setRead
in interface Selected
read
- true if read; false otherwise.public int getAttachmentCount()
public void addAttachment(Attachment attachment)
attachment
- The Attachment.public Attachment removeAttachment(int index) throws java.lang.IndexOutOfBoundsException
index
- The index of the attachment.
java.lang.IndexOutOfBoundsException
- if index is not valid (0 <=
index < size).public Attachment getAttachment(int index) throws java.lang.IndexOutOfBoundsException
index
- The index number of the Attachment.
java.lang.IndexOutOfBoundsException
- if the index is invalid (0 <
index < getAttachmentCount()
).public org.dom4j.Document toXML()
toXML
in interface XMLSerializable
public void transpose(java.lang.Object object)
transpose
in interface Transposer
object
- The object to transpose over this one.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |