Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.mail
Interface EmailTokenManager

All Superinterfaces:
JiveManager
All Known Implementing Classes:
DbEmailTokenManager

public interface EmailTokenManager
extends JiveManager

Manages email tokens. Email tokens are set in emails sent from forums so that user authentication can be performed on reply emails. Implementors of this interface handle the token creation and encoding, parsing, and lookup of parsed user data.


Method Summary
 java.lang.String getMessageToken(long userID, long messageID)
          Uses the supplied user id and message id to build a token string which can be used to identify and authenticate that user and message.
 java.util.regex.Pattern getTokenPattern()
          Returns a Pattern which matches any email token generated by this EmailTokenManager instance.
 long[] getUserAndMessageID(java.lang.String messageToken)
          Uses the supplied token string to lookup a user id and forums message id.
 long getUserID(java.lang.String messageToken)
          Returns just the user id as found in the supplied token string.
 
Methods inherited from interface com.jivesoftware.base.JiveManager
destroy, initialize
 

Method Detail

getMessageToken

java.lang.String getMessageToken(long userID,
                                 long messageID)
                                 throws EmailMonitorException
Uses the supplied user id and message id to build a token string which can be used to identify and authenticate that user and message.

Parameters:
userID - the user id to encode.
messageID - the message id to encode.
Returns:
the unique token identifying the message and user.
Throws:
EmailMonitorException - if an attempt to create a new token fails.

getUserAndMessageID

long[] getUserAndMessageID(java.lang.String messageToken)
                           throws EmailMonitorException
Uses the supplied token string to lookup a user id and forums message id. Information in the supplied token will be used to authenticate the user.

Parameters:
messageToken - the token containing encoded data.
Returns:
a two element array consisting if user id and message id.
Throws:
EmailMonitorException - if an the token does not correspond to an existing user or message id or if the token has expirec.

getUserID

long getUserID(java.lang.String messageToken)
Returns just the user id as found in the supplied token string.

Parameters:
messageToken - the token string to search for a user id.
Returns:
the user id as found in the supplied token string.

getTokenPattern

java.util.regex.Pattern getTokenPattern()
Returns a Pattern which matches any email token generated by this EmailTokenManager instance.

Returns:
a Pattern which matches any email token generated by this EmailTokenManager instance.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.