Package edu.wisc.library.ocfl.core
Class DefaultOcflObjectUpdater
- java.lang.Object
-
- edu.wisc.library.ocfl.core.DefaultOcflObjectUpdater
-
- All Implemented Interfaces:
OcflObjectUpdater
public class DefaultOcflObjectUpdater extends Object implements OcflObjectUpdater
Default implementation of OcflObjectUpdater that is used by DefaultOcflRepository to provide write access to an object.This class is NOT thread safe.
-
-
Constructor Summary
Constructors Constructor Description DefaultOcflObjectUpdater(Inventory inventory, InventoryUpdater inventoryUpdater, Path stagingDir, AddFileProcessor addFileProcessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OcflObjectUpdateraddFileFixity(String logicalPath, DigestAlgorithm algorithm, String value)OcflObjectUpdateraddPath(Path sourcePath, OcflOption... options)OcflObjectUpdateraddPath(Path sourcePath, String destinationPath, OcflOption... options)OcflObjectUpdaterclearFixityBlock()OcflObjectUpdaterclearVersionState()OcflObjectUpdaterreinstateFile(VersionNum sourceVersionNum, String sourcePath, String destinationPath, OcflOption... options)OcflObjectUpdaterremoveFile(String path)OcflObjectUpdaterrenameFile(String sourcePath, String destinationPath, OcflOption... options)OcflObjectUpdaterunsafeAddPath(String digest, Path sourcePath, String destinationPath, OcflOption... options)OcflObjectUpdaterwriteFile(InputStream input, String destinationPath, OcflOption... options)
-
-
-
Constructor Detail
-
DefaultOcflObjectUpdater
public DefaultOcflObjectUpdater(Inventory inventory, InventoryUpdater inventoryUpdater, Path stagingDir, AddFileProcessor addFileProcessor)
-
-
Method Detail
-
addPath
public OcflObjectUpdater addPath(Path sourcePath, OcflOption... options)
- Specified by:
addPathin interfaceOcflObjectUpdater
-
addPath
public OcflObjectUpdater addPath(Path sourcePath, String destinationPath, OcflOption... options)
- Specified by:
addPathin interfaceOcflObjectUpdater
-
unsafeAddPath
public OcflObjectUpdater unsafeAddPath(String digest, Path sourcePath, String destinationPath, OcflOption... options)
- Specified by:
unsafeAddPathin interfaceOcflObjectUpdater
-
writeFile
public OcflObjectUpdater writeFile(InputStream input, String destinationPath, OcflOption... options)
- Specified by:
writeFilein interfaceOcflObjectUpdater
-
removeFile
public OcflObjectUpdater removeFile(String path)
- Specified by:
removeFilein interfaceOcflObjectUpdater
-
renameFile
public OcflObjectUpdater renameFile(String sourcePath, String destinationPath, OcflOption... options)
- Specified by:
renameFilein interfaceOcflObjectUpdater
-
reinstateFile
public OcflObjectUpdater reinstateFile(VersionNum sourceVersionNum, String sourcePath, String destinationPath, OcflOption... options)
- Specified by:
reinstateFilein interfaceOcflObjectUpdater
-
clearVersionState
public OcflObjectUpdater clearVersionState()
- Specified by:
clearVersionStatein interfaceOcflObjectUpdater
-
addFileFixity
public OcflObjectUpdater addFileFixity(String logicalPath, DigestAlgorithm algorithm, String value)
- Specified by:
addFileFixityin interfaceOcflObjectUpdater
-
clearFixityBlock
public OcflObjectUpdater clearFixityBlock()
- Specified by:
clearFixityBlockin interfaceOcflObjectUpdater
-
-