com.jalios.jcms.db
Class BasicDBListenerStoreListener

java.lang.Object
  extended by com.jalios.jcms.db.BasicDBListener
      extended by com.jalios.jcms.db.BasicDBListenerStoreListener
All Implemented Interfaces:
DBConstants, DBListener, PluginComponent, StoreListener
Direct Known Subclasses:
CacheManager, FileProcessorDBListenerStoreListener, MemberSearchEngineListener, PublicationSearchEngineListener, WFPublicationListener

public class BasicDBListenerStoreListener
extends BasicDBListener
implements StoreListener, DBConstants

This class is a default implementation of StoreListener and DBListener.

Since:
jcms-6.0.0
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
 
Fields inherited from interface com.jalios.jcms.db.DBConstants
ALL_CATEGORIES_SET_FIELD, AUTH_GRP_SET_FIELD, AUTH_MBR_SET_FIELD, AUTHOR_ID_FIELD, CATEGORIES_SET_FIELD, CDATE_FIELD, CHANNEL_JCMSDB_PROP, DBDATA_URID, HAS_NO_READ_RIGHTS, HIBERNATE_MAPPING_ADATE, HIBERNATE_MAPPING_AUTHOR, HIBERNATE_MAPPING_CDATE, HIBERNATE_MAPPING_EDATE, HIBERNATE_MAPPING_MDATE, HIBERNATE_MAPPING_PDATE, HIBERNATE_MAPPING_PSTATUS, HIBERNATE_MAPPING_TITLE, HIBERNATE_MAPPING_WORKSPACE_ID, MDATE_FIELD, PSTATUS_FIELD, ROW_ID_FIELD, SCROLL_FETCH_SIZE, WORKSPACE_ID_FIELD
 
Constructor Summary
BasicDBListenerStoreListener()
           
 
Method Summary
 void handleCommitUpdate(Storable storable, Storable oldStorable, boolean firstTime)
          This method gets called when after a storable has been updated.
 void handleCreate(Storable storable, boolean firstTime)
          This method gets called when a storable is created.
 void handleDelete(Storable storable, boolean firstTime)
          This method gets called when a storable is deleted.
 void handlePrepareUpdate(Storable storable, Map attributes, boolean firstTime)
          This method gets called when before a storable will be updated.
 
Methods inherited from class com.jalios.jcms.db.BasicDBListener
getAdateFromState, getAuthorIdFromState, getCdateFromState, getEdateFromState, getMdateFromState, getPdateFromState, getPrePstatus, getPrePstatus, getPstatusFromState, hasNoChange, hasNoChange, init, onPostDelete, onPostInsert, onPostUpdate, onPreUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

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

BasicDBListenerStoreListener

public BasicDBListenerStoreListener()
Method Detail

handleCreate

public void handleCreate(Storable storable,
                         boolean firstTime)
Description copied from interface: StoreListener
This method gets called when a storable is created.

Specified by:
handleCreate in interface StoreListener
Parameters:
storable - the storable
firstTime - true if it is the first time this operation is processed
Since:
jcms-6.0.0
See Also:
StoreListener.handleCreate(Storable, boolean)

handlePrepareUpdate

public void handlePrepareUpdate(Storable storable,
                                Map attributes,
                                boolean firstTime)
Description copied from interface: StoreListener
This method gets called when before a storable will be updated.
deprecated It should not be used anymore and will be removed from future version.

Specified by:
handlePrepareUpdate in interface StoreListener
Parameters:
storable - the storable
attributes - the attributes to update
firstTime - true if it is the first time this operation is processed
Since:
jcms-6.0.0
See Also:
StoreListener.handlePrepareUpdate(Storable, Map, boolean)

handleCommitUpdate

public void handleCommitUpdate(Storable storable,
                               Storable oldStorable,
                               boolean firstTime)
Description copied from interface: StoreListener
This method gets called when after a storable has been updated.

Specified by:
handleCommitUpdate in interface StoreListener
Parameters:
storable - the storable, this instance is the object that was created at first and that will be stored in jcms until deletion of the storable with this ID. You should always manipulate this object if you maintain any index.
oldStorable - the previous version of the storable, it is a clone, do not use in any index, it should only be used to access old values.
firstTime - true if it is the first time this operation is processed
Since:
jcms-6.0.0
See Also:
StoreListener.handleCommitUpdate(Storable, Storable, boolean)

handleDelete

public void handleDelete(Storable storable,
                         boolean firstTime)
Description copied from interface: StoreListener
This method gets called when a storable is deleted.

Specified by:
handleDelete in interface StoreListener
Parameters:
storable - the storable
firstTime - true if it is the first time this operation is processed
Since:
jcms-6.0.0
See Also:
StoreListener.handleDelete(Storable, boolean)


Copyright © 2001-2010 Jalios SA. All Rights Reserved.