Package org.mycore.solr.index
Class MCRSolrIndexEventHandler
java.lang.Object
org.mycore.common.events.MCREventHandlerBase
org.mycore.solr.index.MCRSolrIndexEventHandler
- All Implemented Interfaces:
MCREventHandler
- Author:
- Thomas Scheffler (yagee)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addFile
(Path path, BasicFileAttributes attrs) protected void
protected void
deleteDerivate
(MCRDerivate derivate) protected Optional<MCRObjectID>
getDerivateId
(Path path) Returns the derivate identifier for the given path.protected void
handleDerivateCreated
(MCREvent evt, MCRDerivate derivate) Handles derivate created events.protected void
handleDerivateDeleted
(MCREvent evt, MCRDerivate derivate) Handles derivate deleted events.protected void
handleDerivateRepaired
(MCREvent evt, MCRDerivate derivate) Handles derivate repair events.protected void
handleDerivateUpdated
(MCREvent evt, MCRDerivate derivate) Handles derivate 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
handleObjectIndex
(MCREvent evt, MCRObject obj) protected void
handleObjectRepaired
(MCREvent evt, MCRObject obj) Handles object repair events.protected void
handleObjectUpdated
(MCREvent evt, MCRObject obj) Handles object updated events.protected void
handlePathCreated
(MCREvent evt, Path path, BasicFileAttributes attrs) protected void
handlePathDeleted
(MCREvent evt, Path file, BasicFileAttributes attrs) protected void
handlePathUpdated
(MCREvent evt, Path path, BasicFileAttributes attrs) protected boolean
isMarkedForDeletion
(Path path) Checks if the derivate is marked for deletion.protected void
removeFile
(Path file) protected void
protected void
updateDerivateFileIndex
(MCREvent evt, MCRDerivate derivate) Updates the index content of the given file.protected void
updatePathIndex
(MCREvent evt, Path file, BasicFileAttributes attrs) Methods inherited from class org.mycore.common.events.MCREventHandlerBase
doHandleEvent, doNothing, handleClassificationCreated, handleClassificationDeleted, handleClassificationRepaired, handleClassificationUpdated, handlePathRepaired, undoClassificationCreated, undoClassificationDeleted, undoClassificationRepaired, undoClassificationUpdated, undoDerivateCreated, undoDerivateDeleted, undoDerivateRepaired, undoDerivateUpdated, undoHandleEvent, undoObjectCreated, undoObjectDeleted, undoObjectRepaired, undoObjectUpdated, undoPathCreated, undoPathDeleted, undoPathRepaired, undoPathUpdated
-
Constructor Details
-
MCRSolrIndexEventHandler
public MCRSolrIndexEventHandler()
-
-
Method Details
-
handleObjectCreated
Description copied from class:MCREventHandlerBase
Handles object created events. This implementation does nothing and should be overwritted by subclasses.- Overrides:
handleObjectCreated
in classMCREventHandlerBase
- Parameters:
evt
- the event that occuredobj
- the MCRObject that caused the event
-
handleObjectUpdated
Description copied from class:MCREventHandlerBase
Handles object updated events. This implementation does nothing and should be overwritted by subclasses.- Overrides:
handleObjectUpdated
in classMCREventHandlerBase
- Parameters:
evt
- the event that occuredobj
- the MCRObject that caused the event
-
handleObjectRepaired
Description copied from class:MCREventHandlerBase
Handles object repair events. This implementation does nothing and should be overwritted by subclasses.- Overrides:
handleObjectRepaired
in classMCREventHandlerBase
- Parameters:
evt
- the event that occuredobj
- the MCRObject that caused the event
-
handleObjectDeleted
Description copied from class:MCREventHandlerBase
Handles object deleted events. This implementation does nothing and should be overwritted by subclasses.- Overrides:
handleObjectDeleted
in classMCREventHandlerBase
- Parameters:
evt
- the event that occuredobj
- the MCRObject that caused the event
-
handleDerivateCreated
Description copied from class:MCREventHandlerBase
Handles derivate created events. This implementation does nothing and should be overwritted by subclasses.- Overrides:
handleDerivateCreated
in classMCREventHandlerBase
- Parameters:
evt
- the event that occuredderivate
- the MCRDerivate that caused the event
-
handleDerivateUpdated
Description copied from class:MCREventHandlerBase
Handles derivate updated events. This implementation does nothing and should be overwritted by subclasses.- Overrides:
handleDerivateUpdated
in classMCREventHandlerBase
- Parameters:
evt
- the event that occuredderivate
- the MCRDerivate that caused the event
-
handleDerivateRepaired
Description copied from class:MCREventHandlerBase
Handles derivate repair events. This implementation does nothing and should be overwritted by subclasses.- Overrides:
handleDerivateRepaired
in classMCREventHandlerBase
- Parameters:
evt
- the event that occuredderivate
- the MCRDerivate that caused the event
-
handleDerivateDeleted
Description copied from class:MCREventHandlerBase
Handles derivate deleted events. This implementation does nothing and should be overwritted by subclasses.- Overrides:
handleDerivateDeleted
in classMCREventHandlerBase
- Parameters:
evt
- the event that occuredderivate
- the MCRDerivate that caused the event
-
handlePathCreated
- Overrides:
handlePathCreated
in classMCREventHandlerBase
-
handlePathUpdated
- Overrides:
handlePathUpdated
in classMCREventHandlerBase
-
updatePathIndex
- Overrides:
updatePathIndex
in classMCREventHandlerBase
-
handlePathDeleted
- Overrides:
handlePathDeleted
in classMCREventHandlerBase
-
updateDerivateFileIndex
Description copied from class:MCREventHandlerBase
Updates the index content of the given file.- Overrides:
updateDerivateFileIndex
in classMCREventHandlerBase
-
handleObjectIndex
- Overrides:
handleObjectIndex
in classMCREventHandlerBase
-
addObject
-
solrDelete
-
deleteDerivate
-
addFile
-
removeFile
-
getDerivateId
Returns the derivate identifier for the given path.- Parameters:
path
- the path- Returns:
- the derivate identifier
-
isMarkedForDeletion
Checks if the derivate is marked for deletion.- Parameters:
path
- the path to check
-