Jive API (3.0.13) Core Javadocs

com.jivesoftware.base.event
Class UserEvent

java.lang.Object
  extended by 
      extended by com.jivesoftware.base.event.UserEvent

public class UserEvent
extends

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
CREATEDNone
DELETEDNone
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


Nested Class Summary
static class UserEvent.Type
           
 
Field Summary
static String PROFILE_VIEW_TYPE
           
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()
           
UserEvent(UserEvent.Type eventType, UserTemplate user, Map<String,?> params)
           
 
Method Summary
 Exception getFailureException()
          Returns the exception that indicates why a listener failed to handle an event.
 long getIndirectObjectID()
          Get the id of the Indirect object, or -1 if the given event's Type is not ditransitive.
 int getIndirectObjectType()
          Get the type of the Indirect object, or -1 if the given event's Type is not ditransitive.
 String getMetadata()
          Return the metadata, or null if none is available.
 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_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

PROFILE_VIEW_TYPE

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

UserEvent

public UserEvent()

UserEvent

public UserEvent(UserEvent.Type eventType,
                 UserTemplate user,
                 Map<String,?> params)
Method Detail

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.

getIndirectObjectID

public long getIndirectObjectID()
Get the id of the Indirect object, or -1 if the given event's Type is not ditransitive.

Returns:
an long ID, or -1 if the given event's Type is not ditransitive.

getIndirectObjectType

public int getIndirectObjectType()
Get the type of the Indirect object, or -1 if the given event's Type is not ditransitive.

Returns:
an integer type, or -1 if the given event's Type is not ditransitive.

getMetadata

public String getMetadata()
Return the metadata, or null if none is available.

Returns:
A string, or null.

Jive Product Page

Copyright © 1999-2007 Jive Software.