Class OcflPropsConfig


  • @Configuration
    public class OcflPropsConfig
    extends Object
    Fedora's OCFL related configuration properties
    Since:
    6.0.0
    Author:
    pwinckles
    • Method Detail

      • getFedoraOcflStaging

        public Path getFedoraOcflStaging()
        Returns:
        Path to directory Fedora stages resources before moving them into OCFL
      • setFedoraOcflStaging

        public void setFedoraOcflStaging​(Path fedoraOcflStaging)
        Sets the path to the Fedora staging directory -- should only be used for testing purposes.
        Parameters:
        fedoraOcflStaging - Path to Fedora staging directory
      • setOcflRepoRoot

        public void setOcflRepoRoot​(Path ocflRepoRoot)
        Sets the path to the Fedora OCFL root directory -- should only be used for testing purposes.
        Parameters:
        ocflRepoRoot - Path to Fedora OCFL root directory
      • getOcflTemp

        public Path getOcflTemp()
        Returns:
        Path to the temp directory used by the OCFL client
      • setOcflTemp

        public void setOcflTemp​(Path ocflTemp)
        Sets the path to the OCFL temp directory -- should only be used for testing purposes.
        Parameters:
        ocflTemp - Path to OCFL temp directory
      • isAutoVersioningEnabled

        public boolean isAutoVersioningEnabled()
        Returns:
        true if every update should create a new OCFL version; false if the mutable HEAD should be used
      • setAutoVersioningEnabled

        public void setAutoVersioningEnabled​(boolean autoVersioningEnabled)
        Determines whether or not new OCFL versions are created on every update.
        Parameters:
        autoVersioningEnabled - true to create new versions on every update
      • getStorage

        public Storage getStorage()
        Returns:
        Indicates the storage type. ocfl-fs is the default
      • setStorage

        public void setStorage​(Storage storage)
        Parameters:
        storage - storage to use
      • setAwsAccessKey

        public void setAwsAccessKey​(String awsAccessKey)
        Parameters:
        awsAccessKey - the aws access key to use
      • setAwsSecretKey

        public void setAwsSecretKey​(String awsSecretKey)
        Parameters:
        awsSecretKey - the aws secret key to use
      • setAwsRegion

        public void setAwsRegion​(String awsRegion)
        Parameters:
        awsRegion - the aws region to use
      • setOcflS3Bucket

        public void setOcflS3Bucket​(String ocflS3Bucket)
        Parameters:
        ocflS3Bucket - sets the s3 bucket to store objects in
      • getOcflS3Prefix

        public String getOcflS3Prefix()
        Returns:
        the s3 prefix to store objects under, may be null
      • setOcflS3Prefix

        public void setOcflS3Prefix​(String ocflS3Prefix)
        Parameters:
        ocflS3Prefix - the prefix to store objects under
      • setResourceHeadersCacheEnabled

        public void setResourceHeadersCacheEnabled​(boolean resourceHeadersCacheEnabled)
        Parameters:
        resourceHeadersCacheEnabled - whether or not to enable the resource headers cache
      • setResourceHeadersCacheMaxSize

        public void setResourceHeadersCacheMaxSize​(long resourceHeadersCacheMaxSize)
        Parameters:
        resourceHeadersCacheMaxSize - maximum number of resource headers in cache
      • setResourceHeadersCacheExpireAfterSeconds

        public void setResourceHeadersCacheExpireAfterSeconds​(long resourceHeadersCacheExpireAfterSeconds)
        Parameters:
        resourceHeadersCacheExpireAfterSeconds - number of seconds to wait before expiring a resource header from the cache
      • setReindexingThreads

        public void setReindexingThreads​(long threads)
        Parameters:
        threads - number of threads to use when rebuilding from Fedora OCFL on disk.
      • getReindexingThreads

        public long getReindexingThreads()
        Returns:
        number of threads to use when rebuilding from Fedora OCFL on disk.
      • getReindexBatchSize

        public long getReindexBatchSize()
        Returns:
        number of OCFL ids for a the reindexing manager to hand out at once.
      • setReindexBatchSize

        public void setReindexBatchSize​(long reindexBatchSize)
        Parameters:
        reindexBatchSize - number of OCFL ids for a the reindexing manager to hand out at once.
      • isReindexFailOnError

        public boolean isReindexFailOnError()
        Returns:
        whether to stop the entire reindexing process if a single object fails.
      • setReindexFailOnError

        public void setReindexFailOnError​(boolean reindexFailOnError)
        Parameters:
        reindexFailOnError - whether to stop the entire reindexing process if a single object fails.
      • getS3Endpoint

        public String getS3Endpoint()
        Returns:
        an optional custom s3 endpoint or null
      • isPathStyleAccessEnabled

        public boolean isPathStyleAccessEnabled()
        Returns:
        true if path style S3 access should be used
      • isOcflS3DbEnabled

        public boolean isOcflS3DbEnabled()
        Returns:
        true if the ocfl client should be configured to use a database when storing objects in S3
      • isUnsafeWriteEnabled

        public boolean isUnsafeWriteEnabled()
        When unsafe writes are enabled, the OCFL client does not calculate a digest for files that are added, and trusts the digest value that it's given. If this value is incorrect, the object will be corrupted.
        Returns:
        true if objects should be written to OCFL using an "unsafe" write