Class FileSystemOcflStorageInitializer


  • public class FileSystemOcflStorageInitializer
    extends Object
    Prepares an OCFL storage root for use.
    • Constructor Detail

      • FileSystemOcflStorageInitializer

        public FileSystemOcflStorageInitializer​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                                ExtensionSupportEvaluator supportEvaluator)
    • Method Detail

      • initializeStorage

        public OcflStorageLayoutExtension initializeStorage​(Path repositoryRoot,
                                                            OcflVersion ocflVersion,
                                                            OcflExtensionConfig layoutConfig)
        Prepares an OCFL storage root for use. If the root does not exist, it is created. If the root does exist, then it ensures that the storage layout is configured correctly.
        Parameters:
        repositoryRoot - the OCFL storage root
        ocflVersion - the OCFL version, must match the version declared in the storage root
        layoutConfig - the storage layout configuration, if null the configuration will be loaded from disk
        Returns:
        OCFL storage layout extension configured for the repo