Class DefaultOcflStorageInitializer
- java.lang.Object
-
- edu.wisc.library.ocfl.core.storage.DefaultOcflStorageInitializer
-
- All Implemented Interfaces:
OcflStorageInitializer
public class DefaultOcflStorageInitializer extends Object implements OcflStorageInitializer
Initializes an OCFL repository. If the repository does not already exist, a new one is created. If it does exist, the client configuration is verified and aOcflStorageLayoutExtensionis created.
-
-
Constructor Summary
Constructors Constructor Description DefaultOcflStorageInitializer(Storage storage, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OcflStorageLayoutExtensioninitializeStorage(OcflVersion ocflVersion, OcflExtensionConfig layoutConfig, ExtensionSupportEvaluator supportEvaluator)Initializes a new OCFL storage root when the storage root does not already exist.
-
-
-
Constructor Detail
-
DefaultOcflStorageInitializer
public DefaultOcflStorageInitializer(Storage storage, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
initializeStorage
public OcflStorageLayoutExtension initializeStorage(OcflVersion ocflVersion, OcflExtensionConfig layoutConfig, ExtensionSupportEvaluator supportEvaluator)
Initializes a new OCFL storage root when the storage root does not already exist. If the storage root does exist, then the configuration is examined to ensure that it matches what was configured programmatically. If nothing was configured programmatically, then the configuration on disk is used without validation.- Specified by:
initializeStoragein interfaceOcflStorageInitializer- Parameters:
ocflVersion- OCFL version the repository conforms tolayoutConfig- storage layout configuration, may be null when not creating a new repositorysupportEvaluator- repository extension evaluator- Returns:
- the storage layout extension the repository uses
-
-