Package org.fcrepo.config
Class OcflPropsConfig
- java.lang.Object
-
- org.fcrepo.config.OcflPropsConfig
-
@Configuration public class OcflPropsConfig extends Object
Fedora's OCFL related configuration properties- Since:
- 6.0.0
- Author:
- pwinckles
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_FCREPO_CONFIG_FILE_PROP_SOURCEstatic StringDEFAULT_FCREPO_HOME_VALUEstatic StringFCREPO_CONFIG_FILE_PROP_SOURCEstatic StringFCREPO_HOME_PROPERTYstatic StringFCREPO_OCFL_ROOTstatic StringFCREPO_OCFL_STAGINGstatic StringFCREPO_OCFL_TEMP
-
Constructor Summary
Constructors Constructor Description OcflPropsConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAwsAccessKey()StringgetAwsRegion()StringgetAwsSecretKey()DigestAlgorithmgetDefaultDigestAlgorithm()PathgetFedoraOcflStaging()PathgetOcflRepoRoot()StringgetOcflS3Bucket()StringgetOcflS3Prefix()PathgetOcflTemp()longgetReindexBatchSize()longgetReindexingThreads()longgetResourceHeadersCacheExpireAfterSeconds()longgetResourceHeadersCacheMaxSize()StoragegetStorage()booleanisAutoVersioningEnabled()booleanisReindexFailOnError()booleanisResourceHeadersCacheEnabled()voidsetAutoVersioningEnabled(boolean autoVersioningEnabled)Determines whether or not new OCFL versions are created on every update.voidsetAwsAccessKey(String awsAccessKey)voidsetAwsRegion(String awsRegion)voidsetAwsSecretKey(String awsSecretKey)voidsetFedoraOcflStaging(Path fedoraOcflStaging)Sets the path to the Fedora staging directory -- should only be used for testing purposes.voidsetOcflRepoRoot(Path ocflRepoRoot)Sets the path to the Fedora OCFL root directory -- should only be used for testing purposes.voidsetOcflS3Bucket(String ocflS3Bucket)voidsetOcflS3Prefix(String ocflS3Prefix)voidsetOcflTemp(Path ocflTemp)Sets the path to the OCFL temp directory -- should only be used for testing purposes.voidsetReindexBatchSize(long reindexBatchSize)voidsetReindexFailOnError(boolean reindexFailOnError)voidsetReindexingThreads(long threads)voidsetResourceHeadersCacheEnabled(boolean resourceHeadersCacheEnabled)voidsetResourceHeadersCacheExpireAfterSeconds(long resourceHeadersCacheExpireAfterSeconds)voidsetResourceHeadersCacheMaxSize(long resourceHeadersCacheMaxSize)voidsetStorage(Storage storage)
-
-
-
Field Detail
-
FCREPO_OCFL_STAGING
public static final String FCREPO_OCFL_STAGING
- See Also:
- Constant Field Values
-
FCREPO_OCFL_ROOT
public static final String FCREPO_OCFL_ROOT
- See Also:
- Constant Field Values
-
FCREPO_OCFL_TEMP
public static final String FCREPO_OCFL_TEMP
- See Also:
- Constant Field Values
-
FCREPO_HOME_PROPERTY
public static final String FCREPO_HOME_PROPERTY
- See Also:
- Constant Field Values
-
DEFAULT_FCREPO_HOME_VALUE
public static final String DEFAULT_FCREPO_HOME_VALUE
- See Also:
- Constant Field Values
-
DEFAULT_FCREPO_CONFIG_FILE_PROP_SOURCE
public static final String DEFAULT_FCREPO_CONFIG_FILE_PROP_SOURCE
- See Also:
- Constant Field Values
-
FCREPO_CONFIG_FILE_PROP_SOURCE
public static final String FCREPO_CONFIG_FILE_PROP_SOURCE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OcflPropsConfig
public OcflPropsConfig()
-
-
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
-
getOcflRepoRoot
public Path getOcflRepoRoot()
- Returns:
- Path to OCFL root 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
-
getAwsAccessKey
public String getAwsAccessKey()
- Returns:
- the aws access key to use, may be null
-
setAwsAccessKey
public void setAwsAccessKey(String awsAccessKey)
- Parameters:
awsAccessKey- the aws access key to use
-
getAwsSecretKey
public String getAwsSecretKey()
- Returns:
- the aws secret key to use, may be null
-
setAwsSecretKey
public void setAwsSecretKey(String awsSecretKey)
- Parameters:
awsSecretKey- the aws secret key to use
-
getAwsRegion
public String getAwsRegion()
- Returns:
- the aws region to use, may be null
-
setAwsRegion
public void setAwsRegion(String awsRegion)
- Parameters:
awsRegion- the aws region to use
-
getOcflS3Bucket
public String getOcflS3Bucket()
- Returns:
- the s3 bucket to store objects in
-
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
-
isResourceHeadersCacheEnabled
public boolean isResourceHeadersCacheEnabled()
- Returns:
- whether or not to enable the resource headers cache
-
setResourceHeadersCacheEnabled
public void setResourceHeadersCacheEnabled(boolean resourceHeadersCacheEnabled)
- Parameters:
resourceHeadersCacheEnabled- whether or not to enable the resource headers cache
-
getResourceHeadersCacheMaxSize
public long getResourceHeadersCacheMaxSize()
- Returns:
- maximum number or resource headers in cache
-
setResourceHeadersCacheMaxSize
public void setResourceHeadersCacheMaxSize(long resourceHeadersCacheMaxSize)
- Parameters:
resourceHeadersCacheMaxSize- maximum number of resource headers in cache
-
getResourceHeadersCacheExpireAfterSeconds
public long getResourceHeadersCacheExpireAfterSeconds()
- Returns:
- number of seconds to wait before expiring a resource header from the 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.
-
getDefaultDigestAlgorithm
public DigestAlgorithm getDefaultDigestAlgorithm()
- Returns:
- the configured OCFL digest algorithm
-
-