Class DbConfigurationManagerConstructorParameters<CommonAccessException extends java.lang.Exception>
- java.lang.Object
- 
- com.saperion.common.config.manager.DbConfigurationManagerConstructorParameters<CommonAccessException>
 
- 
- Type Parameters:
- CommonAccessException- the common access exception type of the underlying- DataSourceand so of the- DbConfigurationManagerto be created.
 
 public final class DbConfigurationManagerConstructorParameters<CommonAccessException extends java.lang.Exception> extends java.lang.ObjectTheDbConfigurationManagerConstructorParametersaccumulates the parameters for construction of aDbConfigurationManagerand their defaults. See the individual setter-methods for the concrete default values.
- 
- 
Constructor SummaryConstructors Constructor Description DbConfigurationManagerConstructorParameters(DataSource<CommonAccessException,java.lang.IllegalStateException> dataSource)Creates newDbConfigurationManagerConstructorParameterswith the specifiedDataSourceand all other values set to defaults.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description CiphergetCipher()Returns theCipherthat should be used to encrypt/decrypt the configuration values.DataSource<CommonAccessException,java.lang.IllegalStateException>getDataSource()Returns theDataSource.NotFoundReactionTypegetDefaultNotFoundReactionType()Returns theNotFoundReactionTypethat defines forDbConfigurationManager.get...()-methodsthe behavior if the requested configuration value was not found.StorageTypegetDefaultStorageType()Returns the defaultStorageTypethat applies for all get...()-methods ofDbConfigurationManagerthat have noStorageType-parameter or for those that have one called withStorageType.DEFAULT.Pair<java.security.Key,java.security.Key>getEncryptionKeys()Returns aPairofKeys that should be used to encrypt/decrypt the configuration values.HierarchicalNamegetRootName()Returns the root name.java.lang.StringgetTableName()Returns the name of the underlying database table to load and store the configuration value to/from.DbConfigurationManagerConstructorParameters<CommonAccessException>setDefaultNotFoundReactionType(NotFoundReactionType defaultNotFoundReactionType)Sets the defaultNotFoundReactionTypethat defines forDbConfigurationManager.get...()-methodsthe behavior if the requested configuration value was not found.DbConfigurationManagerConstructorParameters<CommonAccessException>setDefaultStorageType(StorageType defaultStorageType)Sets the defaultStorageTypethat applies for all get...()-methods ofDbConfigurationManagerthat have noStorageType-parameter or for those that have one called withStorageType.DEFAULT.DbConfigurationManagerConstructorParameters<CommonAccessException>setEncryptionKeys(Cipher cipher, Pair<java.security.Key,java.security.Key> pairEncryptionKeys)voidsetRootName(HierarchicalName rootName)Sets the root name.DbConfigurationManagerConstructorParameters<CommonAccessException>setTableName(java.lang.String tableName)Sets the name of the underlying database table to load and store the configuration value to/from.java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
DbConfigurationManagerConstructorParameterspublic DbConfigurationManagerConstructorParameters(DataSource<CommonAccessException,java.lang.IllegalStateException> dataSource) Creates newDbConfigurationManagerConstructorParameterswith the specifiedDataSourceand all other values set to defaults. See the individual setter-methods for the default values.- Parameters:
- dataSource-- DataSource
 
 
- 
 - 
Method Detail- 
getDataSourcepublic DataSource<CommonAccessException,java.lang.IllegalStateException> getDataSource() Returns theDataSource.- Returns:
- the DataSource
 
 - 
getTableNamepublic java.lang.String getTableName() Returns the name of the underlying database table to load and store the configuration value to/from.- Returns:
- the name of the underlying database table
 
 - 
setTableNamepublic DbConfigurationManagerConstructorParameters<CommonAccessException> setTableName(java.lang.String tableName) Sets the name of the underlying database table to load and store the configuration value to/from. The name must not benullor empty and must matchthe regular expression for table names. Defaults to "configuration".- Parameters:
- tableName- the name of the underlying database table
- Returns:
- this DbConfigurationManagerConstructorParameters
 
 - 
getRootNamepublic HierarchicalName getRootName() Returns the root name. All entry-keys will start with this root name. If the key specified as a method parameter alreadystarts withthe root name it will be used unchanged, else the parameter will beaddedto the root name before use. The root name may benullin which case it has no effects, i.e. all key parameters will be used as provided.- Returns:
- the root name
 
 - 
setRootNamepublic void setRootName(HierarchicalName rootName) Sets the root name. All entry-keys will start with this root name. If the key specified as a method parameter alreadystarts withthe root name it will be used unchanged, else the parameter will beaddedto the root name before use. The root name may benullin which case it has no effects, i.e. all key parameters will be used as provided. Defaults tonull.- Parameters:
- rootName- root name
 
 - 
getDefaultStorageTypepublic StorageType getDefaultStorageType() Returns the defaultStorageTypethat applies for all get...()-methods ofDbConfigurationManagerthat have noStorageType-parameter or for those that have one called withStorageType.DEFAULT.- Returns:
- the default StorageType
 
 - 
setDefaultStorageTypepublic DbConfigurationManagerConstructorParameters<CommonAccessException> setDefaultStorageType(StorageType defaultStorageType) Sets the defaultStorageTypethat applies for all get...()-methods ofDbConfigurationManagerthat have noStorageType-parameter or for those that have one called withStorageType.DEFAULT. The defaultStorageTypemust not benulland must not beStorageType.DEFAULT. Defaults toStorageType.DB_IF_NOTHING_IN_MEMORY.- Parameters:
- defaultStorageType- default- StorageType
- Returns:
- this DbConfigurationManagerConstructorParameters
 
 - 
getDefaultNotFoundReactionTypepublic NotFoundReactionType getDefaultNotFoundReactionType() Returns theNotFoundReactionTypethat defines forDbConfigurationManager.get...()-methodsthe behavior if the requested configuration value was not found.- Returns:
- the NotFoundReactionType
 
 - 
setDefaultNotFoundReactionTypepublic DbConfigurationManagerConstructorParameters<CommonAccessException> setDefaultNotFoundReactionType(NotFoundReactionType defaultNotFoundReactionType) Sets the defaultNotFoundReactionTypethat defines forDbConfigurationManager.get...()-methodsthe behavior if the requested configuration value was not found. The defaultNotFoundReactionTypemust not benull. Defaults toNotFoundReactionType.EXCEPTION.- Parameters:
- defaultNotFoundReactionType- default- NotFoundReactionType
- Returns:
- this DbConfigurationManagerConstructorParameters
 
 - 
getCipherpublic Cipher getCipher() Returns theCipherthat should be used to encrypt/decrypt the configuration values. Returnsnullif encryption/decryption is not active.- Returns:
- the Cipher
 
 - 
getEncryptionKeyspublic Pair<java.security.Key,java.security.Key> getEncryptionKeys() Returns aPairofKeys that should be used to encrypt/decrypt the configuration values. If the encryption algorithm is asymmetric the first is the public key (used for encryption) and the second is the private key (used for decryption). If the encryption algorithm is symmetric both keys are the same instance. * Returnsnullif encryption/decryption is not active.- Returns:
- Pairof- Keys
 
 - 
setEncryptionKeyspublic DbConfigurationManagerConstructorParameters<CommonAccessException> setEncryptionKeys(Cipher cipher, Pair<java.security.Key,java.security.Key> pairEncryptionKeys) Sets aCipherand aPairofKeys that should be used to encrypt/decrypt the configuration values. Either both (Cipherand aPair) must be valid and suiting to each other or both must benull(to deactivate encryption/decryption). If the encryption algorithm is asymmetric the first must be the public key (used for encryption) and the second must be the private key (used for decryption). If the encryption algorithm is symmetric both keys must be the same instance. Defaults tonull/null.- Parameters:
- cipher- the- Cipherto use or- null
- pairEncryptionKeys- the- Pairof- Keys to use or- null
- Returns:
- this DbConfigurationManagerConstructorParameters
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-