Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.mail
Class CreateThread

java.lang.Object
  extended by com.jivesoftware.forum.mail.CreateThread
All Implemented Interfaces:
EmailAction

public class CreateThread
extends java.lang.Object
implements EmailAction

Creates a thread in a specific forum using information found in an email message.


Constructor Summary
CreateThread(java.lang.String subject, java.lang.String message, long forumID, java.util.Iterator attachments, AuthToken authToken)
          Sole constructor.
 
Method Summary
 void execute()
          Creates a thread using the parameters supplied in the constructor.
 long getActingUserID()
          Returns the id of the user this instance will act as.
 long getTargetObjectID()
          Returns the id of the object this action will act on.
 int getTargetObjectType()
          Returns the type of object this action will act on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateThread

public CreateThread(java.lang.String subject,
                    java.lang.String message,
                    long forumID,
                    java.util.Iterator attachments,
                    AuthToken authToken)
Sole constructor. Uses the supplied subject and messageI text to create a new ForumMessage and uses it to reply to the message specified by the supplied messageID as the User specified by the supplied AuthToken.

Parameters:
subject - the subject of the new message.
message - the body of the new message.
forumID - the id of the thread or message to reply to.
attachments - an Iterator of AttachmentData representing file attachments.
authToken - the AuthToken of the user to reply as.
Throws:
java.lang.IllegalArgumentException - if forumID is less than zero.
Method Detail

execute

public void execute()
             throws EmailMonitorException
Creates a thread using the parameters supplied in the constructor.

Specified by:
execute in interface EmailAction
Throws:
EmailMonitorException - if the specified forum or user does not exist or the user doesn't have permission to create a thread.

getActingUserID

public long getActingUserID()
Description copied from interface: EmailAction
Returns the id of the user this instance will act as. For example, if this action creates a message, the return value of this method would be the user id of the resultant message's author.

Specified by:
getActingUserID in interface EmailAction
Returns:
the id of the user this instance will act as.

getTargetObjectType

public int getTargetObjectType()
Description copied from interface: EmailAction
Returns the type of object this action will act on. The value will be one of the constants in JiveConstants. Note this is not necessarily the type of object that will be created - it is the type of object which will be modified. For example, if this action created a new thread, the object type would be JiveConstants.FORUM, and EmailAction.getTargetObjectID() would return the id of the forum in which the thread would be created.

Specified by:
getTargetObjectType in interface EmailAction
Returns:
the type of object this action will act on.

getTargetObjectID

public long getTargetObjectID()
Description copied from interface: EmailAction
Returns the id of the object this action will act on. For example, if this action created a new thread, the object id would be the the id of the forum in which the thread would be created.

Specified by:
getTargetObjectID in interface EmailAction
Returns:
the type of object this action will act on.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.