Package org.fcrepo.storage.ocfl
Class DefaultOcflObjectSessionFactory
- java.lang.Object
-
- org.fcrepo.storage.ocfl.DefaultOcflObjectSessionFactory
-
- All Implemented Interfaces:
OcflObjectSessionFactory
public class DefaultOcflObjectSessionFactory extends Object implements OcflObjectSessionFactory
Default OcflObjectSessionFactory implementation- Author:
- pwinckles
-
-
Constructor Summary
Constructors Constructor Description DefaultOcflObjectSessionFactory(edu.wisc.library.ocfl.api.MutableOcflRepository ocflRepo, Path stagingRoot, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Cache<String,ResourceHeaders> headersCache, CommitType defaultCommitType, String defaultVersionMessage, String defaultVersionUserName, String defaultVersionUserAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the underlying OCFL repository.OcflObjectSessionnewSession(String ocflObjectId)Creates a new OCFL object session for the specified OCFL object.voidsetDefaultCommitType(CommitType defaultCommitType)Allows the default CommitType to be changed at run time -- useful for testing.
-
-
-
Constructor Detail
-
DefaultOcflObjectSessionFactory
public DefaultOcflObjectSessionFactory(edu.wisc.library.ocfl.api.MutableOcflRepository ocflRepo, Path stagingRoot, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Cache<String,ResourceHeaders> headersCache, CommitType defaultCommitType, String defaultVersionMessage, String defaultVersionUserName, String defaultVersionUserAddress)
-
-
Method Detail
-
newSession
public OcflObjectSession newSession(String ocflObjectId)
Description copied from interface:OcflObjectSessionFactoryCreates a new OCFL object session for the specified OCFL object.- Specified by:
newSessionin interfaceOcflObjectSessionFactory- Parameters:
ocflObjectId- the OCFL object id to open a session for- Returns:
- new session
-
close
public void close()
Description copied from interface:OcflObjectSessionFactoryCloses the underlying OCFL repository.- Specified by:
closein interfaceOcflObjectSessionFactory
-
setDefaultCommitType
public void setDefaultCommitType(CommitType defaultCommitType)
Allows the default CommitType to be changed at run time -- useful for testing.- Parameters:
defaultCommitType- commit type
-
-