Jive API (4.5.7.0) Core Javadocs

com.jivesoftware.base.event
Class GroupEvent

java.lang.Object
  extended by com.jivesoftware.base.event.v2.BaseJiveEvent<GroupEvent.Type,EntityDescriptor>
      extended by com.jivesoftware.base.event.GroupEvent
All Implemented Interfaces:
JiveEvent, java.io.Serializable

public class GroupEvent
extends com.jivesoftware.base.event.v2.BaseJiveEvent<GroupEvent.Type,EntityDescriptor>

A class for group events. This class will be passed to GroupListeners whenever a group 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
GDELETEDNone
USER_ADDEDA param named 'User' with a 'User' object as a payload
USER_DELETEDA param named 'User' with a 'User' object as a payload
ADMINISTRATOR_ADDEDA param named 'Administrator' with a 'User' object as a payload
ADMINISTRATOR_DELETEDA param named 'Administrator' with a 'User' object as a payload
MODIFIED
ReasonNameValue
Name was modifiedTypenameModify
Name was modifiedoriginalValueThe name before it was modified

Description was modifiedTypedescriptionModify
Description was modifiedoriginalValueThe description before it was modified

Property was modifiedTypepropertyModify
Property was modifiedPropertyKeyThe name of the property
Property was modifiedoriginalValueThe property value before it was modified

Property was addedTypepropertyAdd
Property was addedPropertyKeyThe name of the new property

Property was deletedTypepropertyDelete
Property was deletedPropertyKeyThe name of the property that is going to be deleted

See Also:
Serialized Form

Nested Class Summary
static class GroupEvent.Type
           
 
Field Summary
 
Fields inherited from class com.jivesoftware.base.event.v2.BaseJiveEvent
log
 
Constructor Summary
GroupEvent()
           
GroupEvent(GroupEvent.Type eventType, Group group, java.util.Map<java.lang.String,?> params)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 UserTemplate getAdministrator()
          Returns an administrator which was added or removed, only relevant for GroupEvent.Type.ADMINISTRATOR_ADDED and GroupEvent.Type.ADMINISTRATOR_DELETED.
 java.lang.Exception getFailureException()
          Returns the exception that indicates why a listener failed to handle an event.
 UserTemplate getMember()
          Returns a member which was added or removed, only relevant for GroupEvent.Type.USER_ADDED and GroupEvent.Type.USER_DELETED.
 int hashCode()
           
 void setFailureException(java.lang.Exception e)
          Sets the exception that indicates why a listener failed to handle an event.
 
Methods inherited from class com.jivesoftware.base.event.v2.BaseJiveEvent
getActor, getActorID, getDate, getEventType, getParams, getPayload, getType, getUuid, setActor, setDate, setParams, setPayload, setType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GroupEvent

public GroupEvent()

GroupEvent

public GroupEvent(GroupEvent.Type eventType,
                  Group group,
                  java.util.Map<java.lang.String,?> params)
Method Detail

getFailureException

public java.lang.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(java.lang.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.

getMember

public UserTemplate getMember()
Returns a member which was added or removed, only relevant for GroupEvent.Type.USER_ADDED and GroupEvent.Type.USER_DELETED.

Returns:
a member which was added or removed.
Since:
Jive SBS 4.0

getAdministrator

public UserTemplate getAdministrator()
Returns an administrator which was added or removed, only relevant for GroupEvent.Type.ADMINISTRATOR_ADDED and GroupEvent.Type.ADMINISTRATOR_DELETED.

Returns:
an administrator which was added or removed.
Since:
Jive SBS 4.0

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Jive Product Page

Copyright © 1999-2007 Jive Software.