Interface MCREventHandler

All Known Implementing Classes:
MCRAccessCacheEventHandler, MCRAccessEventHandler, MCRAccessKeyEventHandler, MCRClassificationMappingEventHandler, MCRClassificationMappingEventHandler, MCRDerivateDefaultClassEventHandler, MCREventHandlerBase, MCRExtractRelatedItemsEventHandler, MCRFileMetaEventHandler, MCRImageTileEventHandler, MCRJanitorEventHandlerBase, MCRLinkTableEventHandler, MCRMailEventHandler, MCRMaindocEventHandler, MCRMetadataHistoryManager, MCRMODSLinksEventHandler, MCRObjectCacheFactory, MCRObjectInfoEventHandler, MCROCFLClassificationEventHandler, MCROCFLUserEventHandler, MCRPersistentIdentifierEventHandler, MCRPersistTransientUserEventHandler, MCRPICreationEventHandler, MCRRemoveAclEventHandler, MCRServiceFlagEventHandler, MCRSolrIndexEventHandler, MCRStaticContentEventHandler, MCRThumbnailForPdfEventHandler, MCRUpdateMetsOnDerivateChangeEventHandler, MCRWorkEventHandler, MCRXMLMetadataEventHandler

public interface MCREventHandler
Objects that implement this interface can react when some kind of predefined event happens in MyCoRe. Implementing classes are registered using the configuration property MCR.EventHandler.[objType].X.Class=[package and class name] where [objType] is the object type like "MCRObject" or "MCRFile" and X is a number starting from 1. For event handlers that are indexers of the searcher package, there is a special syntax MCR.EventHandler.[objType].X.Indexer=[searcherID] where [searcherID] is the ID of the searcher that also is an indexer. Event handlers are called in the same order as they are registered in the properties file.
Author:
Frank Lützenkirchen
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Handles an event.
    void
    Handles rollback of event handling.
  • Method Details

    • doHandleEvent

      void doHandleEvent(MCREvent evt) throws MCRException
      Handles an event. The handler is responsible for filtering the event type it is interested in and wants to react on.
      Parameters:
      evt - the Event object containing information about the event
      Throws:
      MCRException
    • undoHandleEvent

      void undoHandleEvent(MCREvent evt) throws MCRException
      Handles rollback of event handling. The handler should roll back the changes that previously were made for this event, because a successor in the event handler list caused an exception.
      Parameters:
      evt - the Event object containing information about the event
      Throws:
      MCRException