Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.mail
Class EmailActionBuilder

java.lang.Object
  extended by com.jivesoftware.forum.mail.EmailActionBuilder

public class EmailActionBuilder
extends java.lang.Object

A builder object for EmailAction instances. Different types may be returned based on the properties set before calling buildAction(). For instance, if JiveConstants.MESSAGE is supplied as the object type, the object id property will be used as a message id, and the resulting action will reply to that message.


Constructor Summary
EmailActionBuilder()
           
 
Method Summary
 EmailAction buildAction()
          Creates and returns an instance of EmailAction using the properties which have been set before calling this method.
 void clear()
          Resets all property values to their defaults, so an instance can be reused to create different actions.
 void setAuthToken(AuthToken authToken)
          Sets the AuthToken of the user to act as.
 void setMessageAttachments(java.util.Iterator attachments)
          Sets the Iterator of attachments found in the incoming message.
 void setMessageBody(java.lang.String body)
          Sets the body of the incoming message.
 void setMessageSubject(java.lang.String subject)
          Sets the subject of the incoming message.
 void setObjectID(long objectID)
          Sets an object id, which is used differently depending on the object type property.
 void setObjectType(int objectType)
          Sets the object type to act on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailActionBuilder

public EmailActionBuilder()
Method Detail

setAuthToken

public void setAuthToken(AuthToken authToken)
Sets the AuthToken of the user to act as.

Parameters:
authToken - the AuthToken of the user to act as.

setObjectType

public void setObjectType(int objectType)
Sets the object type to act on.

Parameters:
objectType - one of the constants defined in JiveConstants which identify a forum element, such as a message or thread.

setObjectID

public void setObjectID(long objectID)
Sets an object id, which is used differently depending on the object type property. Generally, it is used as the id of a parent element, e.g. the id of a parent message to reply to, or the id of a parent forum to create a thread in.

Parameters:
objectID - an object id.

setMessageSubject

public void setMessageSubject(java.lang.String subject)
Sets the subject of the incoming message. Used when creating replies and threads.

Parameters:
subject - the subject of the incoming message.

setMessageBody

public void setMessageBody(java.lang.String body)
Sets the body of the incoming message. Used when creating replies and threads.

Parameters:
body - the body of the incoming message.

setMessageAttachments

public void setMessageAttachments(java.util.Iterator attachments)
Sets the Iterator of attachments found in the incoming message. Used when creating replies and threads.

Parameters:
attachments - the attachments of the incoming message.

buildAction

public EmailAction buildAction()
Creates and returns an instance of EmailAction using the properties which have been set before calling this method. Throws EmailMonitorException if no action can be determined.

Returns:
an instance of EmailAction using the properties which have been set before calling this method, or null if no appropriate action can be determined.

clear

public void clear()
Resets all property values to their defaults, so an instance can be reused to create different actions.


Jive Forums Project Page

Copyright © 1999-2006 Jive Software.