Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.mail
Interface EmailParser

All Known Implementing Classes:
EmailParserImpl

public interface EmailParser

Parses the contents of a Message object in order to provide data used by the system to execute actions based on incoming email. This parser is a one-shot object, designed to be created and used per email message. Used by EmailMonitor to access information in the mail it reads.

See Also:
EmailMonitor

Method Summary
 java.lang.String getBody()
          Returns the body of the message
 long getObjectID()
          Returns the id of the object to act on
 int getObjectType()
          Returns one of the values in JiveConstants specifiying what type of object to act on.
 java.lang.String getSubject()
          Returns the subject of the message
 long getUserID()
          Returns the user id of the user on whose befalf the system will act.
 void parse(InboundMessage message)
          Parses the contents of the supplied Message and uses it to populate all the properties exposed by this object.
 boolean parseCompleted()
          Returns true if parse(com.jivesoftware.forum.mail.InboundMessage) has been called and successfully completed.
 

Method Detail

getUserID

long getUserID()
Returns the user id of the user on whose befalf the system will act.

Returns:
the user id of the user on whose befalf the system will act.

getObjectType

int getObjectType()
Returns one of the values in JiveConstants specifiying what type of object to act on.

Returns:
one of the values in JiveConstants specifiying what type of object to act on.

getObjectID

long getObjectID()
Returns the id of the object to act on

Returns:
the id of the object to act on

getSubject

java.lang.String getSubject()
Returns the subject of the message

Returns:
the subject of the message

getBody

java.lang.String getBody()
Returns the body of the message

Returns:
the body of the message

parseCompleted

boolean parseCompleted()
Returns true if parse(com.jivesoftware.forum.mail.InboundMessage) has been called and successfully completed.

Returns:
true if parse(com.jivesoftware.forum.mail.InboundMessage) has been called and successfully completed.

parse

void parse(InboundMessage message)
           throws EmailMonitorException
Parses the contents of the supplied Message and uses it to populate all the properties exposed by this object.

Parameters:
message - the InboundMessage to parse.
Throws:
EmailMonitorException - if parsing fails for any reason.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.