org.opennms.netmgt.config.mailtransporttest
Class SendmailMessage

java.lang.Object
  extended by org.opennms.netmgt.config.mailtransporttest.SendmailMessage
All Implemented Interfaces:
Serializable

public class SendmailMessage
extends Object
implements Serializable

Define the to, from, subject, and body of a message. If not defined, one will be defined for your benefit (or confusion ;-)

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
SendmailMessage()
           
 
Method Summary
 String getBody()
          Returns the value of field 'body'.
 String getFrom()
          Returns the value of field 'from'.
 String getSubject()
          Returns the value of field 'subject'.
 String getTo()
          Returns the value of field 'to'.
 boolean isValid()
          Method isValid.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void setBody(String body)
          Sets the value of field 'body'.
 void setFrom(String from)
          Sets the value of field 'from'.
 void setSubject(String subject)
          Sets the value of field 'subject'.
 void setTo(String to)
          Sets the value of field 'to'.
static SendmailMessage unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendmailMessage

public SendmailMessage()
Method Detail

getBody

public String getBody()
Returns the value of field 'body'.

Returns:
the value of field 'Body'.

getFrom

public String getFrom()
Returns the value of field 'from'.

Returns:
the value of field 'From'.

getSubject

public String getSubject()
Returns the value of field 'subject'.

Returns:
the value of field 'Subject'.

getTo

public String getTo()
Returns the value of field 'to'.

Returns:
the value of field 'To'.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

marshal

public void marshal(Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

setBody

public void setBody(String body)
Sets the value of field 'body'.

Parameters:
body - the value of field 'body'.

setFrom

public void setFrom(String from)
Sets the value of field 'from'.

Parameters:
from - the value of field 'from'.

setSubject

public void setSubject(String subject)
Sets the value of field 'subject'.

Parameters:
subject - the value of field 'subject'.

setTo

public void setTo(String to)
Sets the value of field 'to'.

Parameters:
to - the value of field 'to'.

unmarshal

public static SendmailMessage unmarshal(Reader reader)
                                 throws org.exolab.castor.xml.MarshalException,
                                        org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.config.mailtransporttest.SendmailMessage
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright ? 2008. All Rights Reserved.