org.exoplatform.social.client.api.event
Class CRUDLifecycleEvent<M>

java.lang.Object
  extended by org.exoplatform.social.client.api.event.Event
      extended by org.exoplatform.social.client.api.event.CRUDLifecycleEvent<M>
Type Parameters:
M - The object which implements Model interface

public final class CRUDLifecycleEvent<M>
extends Event

General event for notifying listeners of significant changes on a service that implements the CRUDLifecycle interface.

Author:
thanh_vucong

Constructor Summary
CRUDLifecycleEvent(CRUDLifecycle<M> source, String type)
          Constructs a new CRUDLifecycleEvent with the specified parameters.
CRUDLifecycleEvent(CRUDLifecycle<M> source, String type, M data)
          Constructs a new LifecycleEvent with the specified parameters.
 
Method Summary
 M getData()
          Returns the event data of this event.
 CRUDLifecycle<M> getSource()
          Returns the CRUDLifecycle on which this event occurred.
 String getType()
          Returns the event type of this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRUDLifecycleEvent

public CRUDLifecycleEvent(CRUDLifecycle<M> source,
                          String type)
Constructs a new CRUDLifecycleEvent with the specified parameters.

Parameters:
source - Component on which this event occurred
type - Event type (required)

CRUDLifecycleEvent

public CRUDLifecycleEvent(CRUDLifecycle<M> source,
                          String type,
                          M data)
Constructs a new LifecycleEvent with the specified parameters.

Parameters:
source - Component on which this event occurred
type - Event type (required)
data - Event data (if any)
Method Detail

getType

public String getType()
Returns the event type of this event.

Returns:
the event type of this event

getData

public M getData()
Returns the event data of this event.

Returns:
the event data

getSource

public CRUDLifecycle<M> getSource()
Returns the CRUDLifecycle on which this event occurred.

Returns:
the source of this event


Copyright © 2011 eXo Platform. All Rights Reserved.