Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.base.event
Class UserEvent

java.lang.Object
  extended by com.jivesoftware.base.event.UserEvent
All Implemented Interfaces:
com.jivesoftware.community.JiveEvent

public class UserEvent
extends Object
implements com.jivesoftware.community.JiveEvent

A class for user events. This class will be passed to UserListeners whenever a user event is fired and contains all the pertinent information to the event.

Certain event types will populate the params Map with additional objects as outlined below:

Event TypeExtra Params
USER_CREATEDNone
USER_DELETEDNone
USER_MODIFIED
ReasonNameValue
Name was modifiednameModifyThe name before it was modified

Name visibility was modifiednameVisibleModifyThe name visibility before it was modified

Username was modifiedusernameModifyThe username before it was modified

Email was modifiedemailModifyThe email before it was modified

Email Visibility was modifiedemailVisibleModifyThe email visibility before it was modified

External was modifiedexternalModifyThe external value before it was modified

Federated was modifiedfederatedModifyThe federated value before it was modified

Enabled was modifiedenabledModifyThe enabled value before it was modified

Last Logged In was modifiedlastLoggedInModifyThe last logged in date before it was modified

Properties were modifiedpropertiesModifyA string array (String[]) with the name of the properties

Properties were addedpropertiesAddA string array (String[]) with the name of the properties

Properties were deletedpropertiesDeleteA string array (String[]) with the name of the properties


Field Summary
static int USER_AUTHENTICATING
          Event type for whenever a user begins authenticating.
static int USER_CREATED
          Event type for whenever a user is created.
static int USER_DELETED
          Event type for whenever a user is deleted.
static int USER_LOGGED_IN
          Event type for whenever a user has successfully authenticated.
static int USER_MODIFIED
          Event type for whenever a user is modified.
static String USER_MODIFIED_EMAIL
           
static String USER_MODIFIED_EMAIL_VISIBLE
           
static String USER_MODIFIED_ENABLED
           
static String USER_MODIFIED_EXTERNAL
           
static String USER_MODIFIED_FEDERATED
           
static String USER_MODIFIED_LAST_LOGGED_IN
           
static String USER_MODIFIED_NAME
           
static String USER_MODIFIED_NAME_FIRST
           
static String USER_MODIFIED_NAME_LAST
           
static String USER_MODIFIED_NAME_VISIBLE
           
static String USER_MODIFIED_PASSWORD
           
static String USER_MODIFIED_PROPERTIES
           
static String USER_MODIFIED_PROPERTIES_ADD
           
static String USER_MODIFIED_PROPERTIES_DELETED
           
static String USER_MODIFIED_STATUS
           
static String USER_MODIFIED_USERNAME
           
static String USER_STATUS_MODIFIED
           
 
Constructor Summary
UserEvent(int eventType, User user, Map<String,?> params)
           
 
Method Summary
 Date getDate()
           
 int getEventType()
           
 Exception getFailureException()
          Returns the exception that indicates why a listener failed to handle an event.
 Map<String,?> getParams()
           
 User getUser()
           
 void setFailureException(Exception e)
          Sets the exception that indicates why a listener failed to handle an event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_CREATED

public static final int USER_CREATED
Event type for whenever a user is created.

See Also:
Constant Field Values

USER_DELETED

public static final int USER_DELETED
Event type for whenever a user is deleted.

See Also:
Constant Field Values

USER_MODIFIED

public static final int USER_MODIFIED
Event type for whenever a user is modified.

See Also:
Constant Field Values

USER_LOGGED_IN

public static final int USER_LOGGED_IN
Event type for whenever a user has successfully authenticated.

See Also:
Constant Field Values

USER_AUTHENTICATING

public static final int USER_AUTHENTICATING
Event type for whenever a user begins authenticating. This event should be fired before any permissions have been assigned to the user.

See Also:
Constant Field Values

USER_MODIFIED_NAME

public static final String USER_MODIFIED_NAME
See Also:
Constant Field Values

USER_MODIFIED_NAME_FIRST

public static final String USER_MODIFIED_NAME_FIRST
See Also:
Constant Field Values

USER_MODIFIED_NAME_LAST

public static final String USER_MODIFIED_NAME_LAST
See Also:
Constant Field Values

USER_MODIFIED_NAME_VISIBLE

public static final String USER_MODIFIED_NAME_VISIBLE
See Also:
Constant Field Values

USER_MODIFIED_USERNAME

public static final String USER_MODIFIED_USERNAME
See Also:
Constant Field Values

USER_MODIFIED_PASSWORD

public static final String USER_MODIFIED_PASSWORD
See Also:
Constant Field Values

USER_MODIFIED_EMAIL

public static final String USER_MODIFIED_EMAIL
See Also:
Constant Field Values

USER_MODIFIED_EMAIL_VISIBLE

public static final String USER_MODIFIED_EMAIL_VISIBLE
See Also:
Constant Field Values

USER_MODIFIED_EXTERNAL

public static final String USER_MODIFIED_EXTERNAL
See Also:
Constant Field Values

USER_MODIFIED_FEDERATED

public static final String USER_MODIFIED_FEDERATED
See Also:
Constant Field Values

USER_MODIFIED_ENABLED

public static final String USER_MODIFIED_ENABLED
See Also:
Constant Field Values

USER_MODIFIED_LAST_LOGGED_IN

public static final String USER_MODIFIED_LAST_LOGGED_IN
See Also:
Constant Field Values

USER_MODIFIED_PROPERTIES

public static final String USER_MODIFIED_PROPERTIES
See Also:
Constant Field Values

USER_MODIFIED_PROPERTIES_ADD

public static final String USER_MODIFIED_PROPERTIES_ADD
See Also:
Constant Field Values

USER_MODIFIED_PROPERTIES_DELETED

public static final String USER_MODIFIED_PROPERTIES_DELETED
See Also:
Constant Field Values

USER_STATUS_MODIFIED

public static final String USER_STATUS_MODIFIED
See Also:
Constant Field Values

USER_MODIFIED_STATUS

public static final String USER_MODIFIED_STATUS
See Also:
Constant Field Values
Constructor Detail

UserEvent

public UserEvent(int eventType,
                 User user,
                 Map<String,?> params)
Method Detail

getEventType

public int getEventType()
Specified by:
getEventType in interface com.jivesoftware.community.JiveEvent

getUser

public User getUser()

getParams

public Map<String,?> getParams()
Specified by:
getParams in interface com.jivesoftware.community.JiveEvent

getDate

public Date getDate()
Specified by:
getDate in interface com.jivesoftware.community.JiveEvent

getFailureException

public Exception getFailureException()
Returns the exception that indicates why a listener failed to handle an event. This will return null if no exception occurred.

Sometimes the class triggering the event needs to know if any listeners for the event were unsuccessful for any reason. This is used internally by Jive classes and should be ignored by listener authors.

Returns:
the failure exception.

setFailureException

public void setFailureException(Exception e)
Sets the exception that indicates why a listener failed to handle an event.

Sometimes the class triggering the event needs to know if any listeners for the event were unsuccessful for any reason. Listeners can call this method to indicate that the event was not handled successfully in all cases. This is used internally by Jive classes ashould be ignored by listener authors.

Parameters:
e - the exception.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.