org.exoplatform.social.client.api.event
Interface CRUDLifecycle<M>

All Known Implementing Classes:
ActivityServiceImplV1Alpha1, ActivityServiceImplV1Alpha2, ActivityServiceImplV1Alpha3, IdentityServiceImplV1Alpha1, ServiceBase

public interface CRUDLifecycle<M>

Common interface for component CRUD life cycle methods. In order to provide a consistent event management and broadcasting to create, update and delete the model.

Author:
thanh_vucong

Field Summary
static String AFTER_CREATE_EVENT
          The CRUDLifecycleEvent type for the "component after create"
static String AFTER_DELETE_EVENT
          The CRUDLifecycleEvent type for the "component after delete"
static String AFTER_UPDATE_EVENT
          The CRUDLifecycleEvent type for the "component after update"
static String BEFORE_CREATE_EVENT
          The CRUDLifecycleEvent type for the "component before create"
static String BEFORE_DELETE_EVENT
          The CRUDLifecycleEvent type for the "component before delete"
static String BEFORE_UPDATE_EVENT
          The CRUDLifecycleEvent type for the "component before update"
static String CREATE_EVENT
          The CRUDLifecycleEvent type for the "component create" event.
static String DELETE_EVENT
          The CRUDLifecycleEvent type for the "component delete" event.
static String UPDATE_EVENT
          The CRUDLifecycleEvent type for the "component update" event.
 
Method Summary
 void addCRUDLifecycleListener(CRUDLifecycleListener<M> listener)
          Adds a CRUDLifecycleEvent listener to this component.
 CRUDLifecycleListener<M>[] findCRUDLifecycleListeners()
          Gets the lifecycle listeners associated with this lifecycle.
 void removeCRUDLifecycleListener(CRUDLifecycleListener<M> listener)
          Removes a CRUDLifecycleEvent listener from this component.
 

Field Detail

CREATE_EVENT

static final String CREATE_EVENT
The CRUDLifecycleEvent type for the "component create" event.

See Also:
Constant Field Values

BEFORE_CREATE_EVENT

static final String BEFORE_CREATE_EVENT
The CRUDLifecycleEvent type for the "component before create"

See Also:
Constant Field Values

AFTER_CREATE_EVENT

static final String AFTER_CREATE_EVENT
The CRUDLifecycleEvent type for the "component after create"

See Also:
Constant Field Values

UPDATE_EVENT

static final String UPDATE_EVENT
The CRUDLifecycleEvent type for the "component update" event.

See Also:
Constant Field Values

BEFORE_UPDATE_EVENT

static final String BEFORE_UPDATE_EVENT
The CRUDLifecycleEvent type for the "component before update"

See Also:
Constant Field Values

AFTER_UPDATE_EVENT

static final String AFTER_UPDATE_EVENT
The CRUDLifecycleEvent type for the "component after update"

See Also:
Constant Field Values

DELETE_EVENT

static final String DELETE_EVENT
The CRUDLifecycleEvent type for the "component delete" event.

See Also:
Constant Field Values

BEFORE_DELETE_EVENT

static final String BEFORE_DELETE_EVENT
The CRUDLifecycleEvent type for the "component before delete"

See Also:
Constant Field Values

AFTER_DELETE_EVENT

static final String AFTER_DELETE_EVENT
The CRUDLifecycleEvent type for the "component after delete"

See Also:
Constant Field Values
Method Detail

findCRUDLifecycleListeners

CRUDLifecycleListener<M>[] findCRUDLifecycleListeners()
Gets the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a zero-length array is returned.

Returns:
array of listeners registered

removeCRUDLifecycleListener

void removeCRUDLifecycleListener(CRUDLifecycleListener<M> listener)
Removes a CRUDLifecycleEvent listener from this component.

Parameters:
listener - The listener to be removed

addCRUDLifecycleListener

void addCRUDLifecycleListener(CRUDLifecycleListener<M> listener)
Adds a CRUDLifecycleEvent listener to this component.

Parameters:
listener - The listener to to be added


Copyright © 2011-2012 eXo Platform. All Rights Reserved.