org.mycore.common.events
Class MCREventHandlerBase

java.lang.Object
  extended by org.mycore.common.events.MCREventHandlerBase
All Implemented Interfaces:
MCREventHandler
Direct Known Subclasses:
MCRAccessEventHandler, MCRContentIndexEventHandler, MCRDataExtractor, MCRImgCacheEventHandler, MCRIndexBrowserEventHandler, MCRIViewEventHandler, MCRJDOMEventHandlerIndexMeta, MCRLinkTableEventHandler, MCRRemoveAclEventHandler, MCRSearcher, MCRXMLTableEventHandler

public abstract class MCREventHandlerBase
extends Object
implements MCREventHandler

Abstract helper class that can be subclassed to implement event handlers more easily.

Author:
Frank Luetzenkirchen, Jens Kupferschmidt

Constructor Summary
MCREventHandlerBase()
           
 
Method Summary
 void doHandleEvent(MCREvent evt)
          This method handle all calls for EventHandler for the event types MCRObject, MCRDerivate and MCRFile.
 void doNothing(MCREvent evt, Object obj)
          This method does nothing.
protected  void handleClassificationCreated(MCREvent evt, MCRCategory obj)
          Handles classification created events.
protected  void handleClassificationDeleted(MCREvent evt, MCRCategory obj)
          Handles classification deleted events.
protected  void handleClassificationRepaired(MCREvent evt, MCRCategory obj)
          Handles classification repair events.
protected  void handleClassificationUpdated(MCREvent evt, MCRCategory obj)
          Handles classification updated events.
protected  void handleDerivateCreated(MCREvent evt, MCRDerivate der)
          Handles derivate created events.
protected  void handleDerivateDeleted(MCREvent evt, MCRDerivate der)
          Handles derivate deleted events.
protected  void handleDerivateRepaired(MCREvent evt, MCRDerivate der)
          Handles derivate repair events.
protected  void handleDerivateUpdated(MCREvent evt, MCRDerivate der)
          Handles derivate updated events.
protected  void handleFileCreated(MCREvent evt, MCRFile file)
          Handles file created events.
protected  void handleFileDeleted(MCREvent evt, MCRFile file)
          Handles file deleted events.
protected  void handleFileRepaired(MCREvent evt, MCRFile file)
          Handles file repair events.
protected  void handleFileUpdated(MCREvent evt, MCRFile file)
          Handles file updated events.
protected  void handleObjectCreated(MCREvent evt, MCRObject obj)
          Handles object created events.
protected  void handleObjectDeleted(MCREvent evt, MCRObject obj)
          Handles object deleted events.
protected  void handleObjectRepaired(MCREvent evt, MCRObject obj)
          Handles object repair events.
protected  void handleObjectUpdated(MCREvent evt, MCRObject obj)
          Handles object updated events.
protected  void undoClassificationCreated(MCREvent evt, MCRCategory obj)
          Handles undo of classification created events.
protected  void undoClassificationDeleted(MCREvent evt, MCRCategory obj)
          Handles undo of classification deleted events.
protected  void undoClassificationRepaired(MCREvent evt, MCRCategory obj)
          Handles undo of classification repaired events.
protected  void undoClassificationUpdated(MCREvent evt, MCRCategory obj)
          Handles undo of classification updated events.
protected  void undoDerivateCreated(MCREvent evt, MCRDerivate der)
          Handles undo of derivate created events.
protected  void undoDerivateDeleted(MCREvent evt, MCRDerivate der)
          Handles undo of derivate deleted events.
protected  void undoDerivateRepaired(MCREvent evt, MCRDerivate der)
          Handles undo of derivate repaired events.
protected  void undoDerivateUpdated(MCREvent evt, MCRDerivate der)
          Handles undo of derivate updated events.
protected  void undoFileCreated(MCREvent evt, MCRFile file)
          Handles undo of file created events.
protected  void undoFileDeleted(MCREvent evt, MCRFile file)
          Handles undo of file deleted events.
protected  void undoFileRepaired(MCREvent evt, MCRFile file)
          Handles undo of file repair events.
protected  void undoFileUpdated(MCREvent evt, MCRFile file)
          Handles undo of file updated events.
 void undoHandleEvent(MCREvent evt)
          This method roll back all calls for EventHandler for the event types MCRObject, MCRDerivate and MCRFile.
protected  void undoObjectCreated(MCREvent evt, MCRObject obj)
          Handles undo of object created events.
protected  void undoObjectDeleted(MCREvent evt, MCRObject obj)
          Handles undo of object deleted events.
protected  void undoObjectRepaired(MCREvent evt, MCRObject obj)
          Handles undo of object repaired events.
protected  void undoObjectUpdated(MCREvent evt, MCRObject obj)
          Handles undo of object updated events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCREventHandlerBase

public MCREventHandlerBase()
Method Detail

doHandleEvent

public void doHandleEvent(MCREvent evt)
This method handle all calls for EventHandler for the event types MCRObject, MCRDerivate and MCRFile.

Specified by:
doHandleEvent in interface MCREventHandler
Parameters:
evt - The MCREvent object

undoHandleEvent

public void undoHandleEvent(MCREvent evt)
This method roll back all calls for EventHandler for the event types MCRObject, MCRDerivate and MCRFile.

Specified by:
undoHandleEvent in interface MCREventHandler
Parameters:
evt - The MCREvent object

doNothing

public void doNothing(MCREvent evt,
                      Object obj)
This method does nothing. It is very useful for debugging events.


handleClassificationCreated

protected void handleClassificationCreated(MCREvent evt,
                                           MCRCategory obj)
Handles classification created events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRClassification that caused the event

handleClassificationUpdated

protected void handleClassificationUpdated(MCREvent evt,
                                           MCRCategory obj)
Handles classification updated events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRClassification that caused the event

handleClassificationDeleted

protected void handleClassificationDeleted(MCREvent evt,
                                           MCRCategory obj)
Handles classification deleted events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRClassification that caused the event

handleClassificationRepaired

protected void handleClassificationRepaired(MCREvent evt,
                                            MCRCategory obj)
Handles classification repair events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRClassification that caused the event

handleObjectCreated

protected void handleObjectCreated(MCREvent evt,
                                   MCRObject obj)
Handles object created events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRObject that caused the event

handleObjectUpdated

protected void handleObjectUpdated(MCREvent evt,
                                   MCRObject obj)
Handles object updated events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRObject that caused the event

handleObjectDeleted

protected void handleObjectDeleted(MCREvent evt,
                                   MCRObject obj)
Handles object deleted events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRObject that caused the event

handleObjectRepaired

protected void handleObjectRepaired(MCREvent evt,
                                    MCRObject obj)
Handles object repair events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRObject that caused the event

handleDerivateCreated

protected void handleDerivateCreated(MCREvent evt,
                                     MCRDerivate der)
Handles derivate created events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
der - the MCRDerivate that caused the event

handleDerivateUpdated

protected void handleDerivateUpdated(MCREvent evt,
                                     MCRDerivate der)
Handles derivate updated events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
der - the MCRDerivate that caused the event

handleDerivateDeleted

protected void handleDerivateDeleted(MCREvent evt,
                                     MCRDerivate der)
Handles derivate deleted events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
der - the MCRDerivate that caused the event

handleDerivateRepaired

protected void handleDerivateRepaired(MCREvent evt,
                                      MCRDerivate der)
Handles derivate repair events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
der - the MCRDerivate that caused the event

handleFileCreated

protected void handleFileCreated(MCREvent evt,
                                 MCRFile file)
Handles file created events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
file - the MCRFile that caused the event

handleFileUpdated

protected void handleFileUpdated(MCREvent evt,
                                 MCRFile file)
Handles file updated events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
file - the MCRFile that caused the event

handleFileDeleted

protected void handleFileDeleted(MCREvent evt,
                                 MCRFile file)
Handles file deleted events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
file - the MCRFile that caused the event

handleFileRepaired

protected void handleFileRepaired(MCREvent evt,
                                  MCRFile file)
Handles file repair events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
file - the MCRFile that caused the event

undoClassificationCreated

protected void undoClassificationCreated(MCREvent evt,
                                         MCRCategory obj)
Handles undo of classification created events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRClassification that caused the event

undoClassificationUpdated

protected void undoClassificationUpdated(MCREvent evt,
                                         MCRCategory obj)
Handles undo of classification updated events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRClassification that caused the event

undoClassificationDeleted

protected void undoClassificationDeleted(MCREvent evt,
                                         MCRCategory obj)
Handles undo of classification deleted events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRClassification that caused the event

undoClassificationRepaired

protected void undoClassificationRepaired(MCREvent evt,
                                          MCRCategory obj)
Handles undo of classification repaired events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRClassification that caused the event

undoObjectCreated

protected void undoObjectCreated(MCREvent evt,
                                 MCRObject obj)
Handles undo of object created events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRObject that caused the event

undoObjectUpdated

protected void undoObjectUpdated(MCREvent evt,
                                 MCRObject obj)
Handles undo of object updated events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRObject that caused the event

undoObjectDeleted

protected void undoObjectDeleted(MCREvent evt,
                                 MCRObject obj)
Handles undo of object deleted events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRObject that caused the event

undoObjectRepaired

protected void undoObjectRepaired(MCREvent evt,
                                  MCRObject obj)
Handles undo of object repaired events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
obj - the MCRObject that caused the event

undoDerivateCreated

protected void undoDerivateCreated(MCREvent evt,
                                   MCRDerivate der)
Handles undo of derivate created events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
der - the MCRDerivate that caused the event

undoDerivateUpdated

protected void undoDerivateUpdated(MCREvent evt,
                                   MCRDerivate der)
Handles undo of derivate updated events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
der - the MCRDerivate that caused the event

undoDerivateDeleted

protected void undoDerivateDeleted(MCREvent evt,
                                   MCRDerivate der)
Handles undo of derivate deleted events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
der - the MCRDerivate that caused the event

undoDerivateRepaired

protected void undoDerivateRepaired(MCREvent evt,
                                    MCRDerivate der)
Handles undo of derivate repaired events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
der - the MCRDerivate that caused the event

undoFileCreated

protected void undoFileCreated(MCREvent evt,
                               MCRFile file)
Handles undo of file created events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
file - the MCRFile that caused the event

undoFileUpdated

protected void undoFileUpdated(MCREvent evt,
                               MCRFile file)
Handles undo of file updated events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
file - the MCRFile that caused the event

undoFileDeleted

protected void undoFileDeleted(MCREvent evt,
                               MCRFile file)
Handles undo of file deleted events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
file - the MCRFile that caused the event

undoFileRepaired

protected void undoFileRepaired(MCREvent evt,
                                MCRFile file)
Handles undo of file repair events. This implementation does nothing and should be overwritted by subclasses.

Parameters:
evt - the event that occured
file - the MCRFile that caused the event