Package org.mycore.mets.events
Class MCRUpdateMetsOnDerivateChangeEventHandler
java.lang.Object
org.mycore.common.events.MCREventHandlerBase
org.mycore.mets.events.MCRUpdateMetsOnDerivateChangeEventHandler
- All Implemented Interfaces:
MCREventHandler
EventHandler updates the mets.xml after a file is added to an existing
derivate.
- Author:
- shermann
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkUpdateMets
(MCREvent evt, Path file, BasicFileAttributes attrs) Checks if the mets.xml should be updated.protected void
handleDerivateUpdated
(MCREvent evt, MCRDerivate der) Handles derivate updated events.protected void
handlePathCreated
(MCREvent evt, Path file, BasicFileAttributes attrs) protected void
handlePathDeleted
(MCREvent evt, Path file, BasicFileAttributes attrs) Methods inherited from class org.mycore.common.events.MCREventHandlerBase
doHandleEvent, doNothing, handleClassificationCreated, handleClassificationDeleted, handleClassificationRepaired, handleClassificationUpdated, handleDerivateCreated, handleDerivateDeleted, handleDerivateRepaired, handleObjectCreated, handleObjectDeleted, handleObjectIndex, handleObjectRepaired, handleObjectUpdated, handlePathRepaired, handlePathUpdated, undoClassificationCreated, undoClassificationDeleted, undoClassificationRepaired, undoClassificationUpdated, undoDerivateCreated, undoDerivateDeleted, undoDerivateRepaired, undoDerivateUpdated, undoHandleEvent, undoObjectCreated, undoObjectDeleted, undoObjectRepaired, undoObjectUpdated, undoPathCreated, undoPathDeleted, undoPathRepaired, undoPathUpdated, updateDerivateFileIndex, updatePathIndex
-
Constructor Details
-
MCRUpdateMetsOnDerivateChangeEventHandler
public MCRUpdateMetsOnDerivateChangeEventHandler()
-
-
Method Details
-
checkUpdateMets
Checks if the mets.xml should be updated.- Parameters:
evt
- the mcr eventfile
- the file which was changedattrs
- the file attributes- Returns:
- true if the mets shoud be updated, otherwise false
-
handlePathDeleted
- Overrides:
handlePathDeleted
in classMCREventHandlerBase
-
handlePathCreated
- Overrides:
handlePathCreated
in classMCREventHandlerBase
-
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 occuredder
- the MCRDerivate that caused the event
-