Package edu.wisc.library.ocfl.core
Class DefaultMutableOcflRepository
- java.lang.Object
-
- edu.wisc.library.ocfl.core.DefaultOcflRepository
-
- edu.wisc.library.ocfl.core.DefaultMutableOcflRepository
-
- All Implemented Interfaces:
MutableOcflRepository,OcflRepository
public class DefaultMutableOcflRepository extends DefaultOcflRepository implements MutableOcflRepository
Extends the OCFL repository to support OCFL objects with mutable HEADs as defined by the Mutable HEAD Extension. This is not supported in the official spec.- See Also:
OcflRepositoryBuilder
-
-
Field Summary
-
Fields inherited from class edu.wisc.library.ocfl.core.DefaultOcflRepository
addFileProcessorBuilder, config, inventoryMapper, inventoryUpdaterBuilder, objectLock, responseMapper, storage, workDir
-
-
Constructor Summary
Constructors Constructor Description DefaultMutableOcflRepository(OcflStorage storage, Path workDir, ObjectLock objectLock, InventoryMapper inventoryMapper, LogicalPathMapper logicalPathMapper, ContentPathConstraintProcessor contentPathConstraintProcessor, OcflConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectVersionIdcommitStagedChanges(String objectId, VersionInfo versionInfo)booleanhasStagedChanges(String objectId)voidpurgeStagedChanges(String objectId)ObjectVersionIdstageChanges(ObjectVersionId objectVersionId, VersionInfo versionInfo, Consumer<OcflObjectUpdater> objectUpdater)-
Methods inherited from class edu.wisc.library.ocfl.core.DefaultOcflRepository
buildNewInventory, close, config, containsObject, createStagingDir, createStubInventory, describeObject, describeVersion, enforceObjectVersionForUpdate, ensureOpen, exportObject, exportVersion, fileChangeHistory, getObject, getObject, importObject, importVersion, invalidateCache, invalidateCache, listObjectIds, loadInventory, now, purgeObject, putObject, replicateVersionAsHead, requireInventory, resolveContentDir, rollbackToVersion, setClock, updateObject, validateObject, writeInventory, writeNewVersion
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.wisc.library.ocfl.api.OcflRepository
close, config, containsObject, describeObject, describeVersion, exportObject, exportVersion, fileChangeHistory, getObject, getObject, importObject, importVersion, invalidateCache, invalidateCache, listObjectIds, purgeObject, putObject, replicateVersionAsHead, rollbackToVersion, updateObject, validateObject
-
-
-
-
Constructor Detail
-
DefaultMutableOcflRepository
public DefaultMutableOcflRepository(OcflStorage storage, Path workDir, ObjectLock objectLock, InventoryMapper inventoryMapper, LogicalPathMapper logicalPathMapper, ContentPathConstraintProcessor contentPathConstraintProcessor, OcflConfig config)
- Parameters:
storage- storage layerworkDir- path to the directory to use for assembling ocfl versionsobjectLock- locking clientinventoryMapper- object mapper for serializing inventorieslogicalPathMapper- logical path mappercontentPathConstraintProcessor- content path constraint processorconfig- ocfl defaults configuration- See Also:
OcflRepositoryBuilder
-
-
Method Detail
-
stageChanges
public ObjectVersionId stageChanges(ObjectVersionId objectVersionId, VersionInfo versionInfo, Consumer<OcflObjectUpdater> objectUpdater)
- Specified by:
stageChangesin interfaceMutableOcflRepository
-
commitStagedChanges
public ObjectVersionId commitStagedChanges(String objectId, VersionInfo versionInfo)
- Specified by:
commitStagedChangesin interfaceMutableOcflRepository
-
purgeStagedChanges
public void purgeStagedChanges(String objectId)
- Specified by:
purgeStagedChangesin interfaceMutableOcflRepository
-
hasStagedChanges
public boolean hasStagedChanges(String objectId)
- Specified by:
hasStagedChangesin interfaceMutableOcflRepository
-
-