Class MCREventHandlerBase

java.lang.Object
org.mycore.common.events.MCREventHandlerBase
All Implemented Interfaces:
MCREventHandler
Direct Known Subclasses:
MCRAccessCacheEventHandler, MCRAccessEventHandler, MCRAccessKeyEventHandler, MCRClassificationMappingEventHandler, MCRClassificationMappingEventHandler, MCRDerivateDefaultClassEventHandler, MCRExtractRelatedItemsEventHandler, MCRFileMetaEventHandler, MCRImageTileEventHandler, MCRJanitorEventHandlerBase, MCRLinkTableEventHandler, MCRMailEventHandler, MCRMaindocEventHandler, MCRMetadataHistoryManager, MCRMODSLinksEventHandler, MCRObjectCacheFactory, MCRObjectInfoEventHandler, MCRPersistTransientUserEventHandler, MCRPICreationEventHandler, MCRRemoveAclEventHandler, MCRServiceFlagEventHandler, MCRSolrIndexEventHandler, MCRStaticContentEventHandler, MCRThumbnailForPdfEventHandler, MCRUpdateMetsOnDerivateChangeEventHandler, MCRWorkEventHandler, MCRXMLMetadataEventHandler

public abstract class MCREventHandlerBase extends Object implements MCREventHandler
Abstract helper class that can be subclassed to implement event handlers more easily.
Author:
Frank Lützenkirchen, Jens Kupferschmidt
  • Constructor Details

    • MCREventHandlerBase

      public MCREventHandlerBase()
  • Method Details

    • 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
    • handleObjectIndex

      protected void handleObjectIndex(MCREvent evt, MCRObject obj)
    • 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
    • handlePathUpdated

      protected void handlePathUpdated(MCREvent evt, Path path, BasicFileAttributes attrs)
    • handlePathDeleted

      protected void handlePathDeleted(MCREvent evt, Path path, BasicFileAttributes attrs)
    • handlePathRepaired

      protected void handlePathRepaired(MCREvent evt, Path path, BasicFileAttributes attrs)
    • updatePathIndex

      protected void updatePathIndex(MCREvent evt, Path path, BasicFileAttributes attrs)
    • handlePathCreated

      protected void handlePathCreated(MCREvent evt, Path path, BasicFileAttributes attrs)
    • 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
    • undoPathCreated

      protected void undoPathCreated(MCREvent evt, Path path, BasicFileAttributes attrs)
    • undoPathUpdated

      protected void undoPathUpdated(MCREvent evt, Path path, BasicFileAttributes attrs)
    • undoPathDeleted

      protected void undoPathDeleted(MCREvent evt, Path path, BasicFileAttributes attrs)
    • undoPathRepaired

      protected void undoPathRepaired(MCREvent evt, Path path, BasicFileAttributes attrs)
    • updateDerivateFileIndex

      protected void updateDerivateFileIndex(MCREvent evt, MCRDerivate file)
      Updates the index content of the given file.