Class CloudOcflStorageBuilder


  • public class CloudOcflStorageBuilder
    extends Object
    Builder for constructing S3OcflStorage objects. It is configured with sensible defaults and can minimally be used as new S3OcflStorageBuilder().s3Client(s3Client).workDir(workDir).build(bucketName).
    • Constructor Detail

      • CloudOcflStorageBuilder

        public CloudOcflStorageBuilder()
    • Method Detail

      • cloudClient

        public CloudOcflStorageBuilder cloudClient​(CloudClient cloudClient)
        Sets the cloud client. This must be set prior to calling build().
        Parameters:
        cloudClient - the client to use to interface with cloud storage such as S3
        Returns:
        builder
      • unsupportedExtensionBehavior

        public CloudOcflStorageBuilder unsupportedExtensionBehavior​(UnsupportedExtensionBehavior unsupportedBehavior)
        Set the behavior when an unsupported extension is encountered. By default, ocfl-java will not operate on repositories or objects that contain unsupported extensions. Set this value to WARN, if you'd like ocfl-java to log a WARNing, but continue to operate instead.

        Specific unsupported extensions may be ignored individually using ignoreUnsupportedExtensions

        Parameters:
        unsupportedBehavior - FAIL to throw an exception or WARN to log a warning
        Returns:
        builder
      • ignoreUnsupportedExtensions

        public CloudOcflStorageBuilder ignoreUnsupportedExtensions​(Set<String> ignoreUnsupportedExtensions)
        Sets a list of unsupported extensions that should be ignored. If the unsupported extension behavior is set to FAIL, this means that these extensions will produce log WARNings if they are encountered. If the behavior is set to WARN, then these extensions will be silently ignored.
        Parameters:
        ignoreUnsupportedExtensions - set of unsupported extension names that should be ignored
        Returns:
        builder
      • objectMapper

        public CloudOcflStorageBuilder objectMapper​(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Overrides the default ObjectMapper that's used to serialize ocfl_layout.json
        Parameters:
        objectMapper - object mapper
        Returns:
        builder