public class KeyStoreFilePropertyType extends DerivedPropertyType<KeyStore> implements MarkerPathPropertyType
Property<File> keyStoreFile = new Property<File>("keystore_file",new FilePropertyType()); Property<PasswordTypeVO> password = new Property<PasswordTypeVO>("password",new PasswordPropertyType()); Property<KeyStore> keystore= new Property<KeyStore>("keystore",new KeyStoreFilePropertyType(keyStoreFile,password));
Modifier and Type | Field and Description |
---|---|
static String |
TYPE
The type name string constant of KeyStoreFilePropertyType implementation.
|
Constructor and Description |
---|
KeyStoreFilePropertyType(Property<File> keyStoreFile,
Property<PasswordTypeVO> keyStorePasswordProperty)
Constructor, using one of the preferred registered security Providers, starting with the most preferred Provider.
|
KeyStoreFilePropertyType(String keyStoreType,
Property<File> keyStoreFile,
Property<PasswordTypeVO> keyStorePasswordProperty)
Constructor, using one of the preferred registered security Providers, starting with the most preferred Provider.
|
KeyStoreFilePropertyType(String keyStoreType,
String provider,
Property<File> keyStoreFile,
Property<PasswordTypeVO> keyStorePasswordProperty)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
List<String> |
getDerivedToRestrictions()
Gets a detailed description of the "Derived->TO->PropertyType" with any constraints that might influence the validation.
Without any futher description of of the properties it is derived from, this is taken care of in the method "getDerivedFromRestrictions". |
Property<File> |
getKeyStoreFile() |
Property<PasswordTypeVO> |
getKeyStorePassword() |
String |
getKeyStoreType()
The keystore type, if
null than default is used. |
String |
getProvider()
The provider, if
null than default is used, see class description. |
void |
validateConstraints(String propertyName)
Validates the constraints.
|
KeyStore |
validateDerivedValue(String propertyName)
Should convert the dependent Properties to the type T.
|
getDerivedFrom, getDerivedFromCount, getDerivedFromProperty, getDerivedFromRestrictions, getMaxDerivedFrom, getMinDerivedFrom, getRestrictions, isMinAndMaxTheSame, isUseMaxDerivedFrom, isUseMinDerivedFrom, validateValue
equals, getDefaultValue, getDefaultValueAsString, getDefaultValueDescription, getDescription, getDescription, getInitializationPriority, getIo, getLogger, getTypeName, hasDefaultValue, isDefaultValueValid, postGetValueProcessing, setDefaultValue, setInitializationPriority, setIo, setTypedValue, setTypeName, toString, toType, validate, validateNullType
public static final String TYPE
public KeyStoreFilePropertyType(String keyStoreType, String provider, Property<File> keyStoreFile, Property<PasswordTypeVO> keyStorePasswordProperty)
keyStoreType
- the keyStoreType. Default is "jks"provider
- the provider, see list in class description.keyStoreFile
- the Property of type File, which points to the keystore file.keyStorePasswordProperty
- the Property of type PasswordTypeVO, which holds the password, it must be "decryptable", which points to the keystoer file.PasswordTypeVO.isDecryptable()
public KeyStoreFilePropertyType(String keyStoreType, Property<File> keyStoreFile, Property<PasswordTypeVO> keyStorePasswordProperty)
keyStoreType
- the keyStoreType. Default is "jks"keyStoreFile
- the Property of type File, which points to the keystore file.keyStorePasswordProperty
- the Property of type PasswordTypeVO, which holds the password, it must be "decryptable", which points to the keystoer file.PasswordTypeVO.isDecryptable()
public KeyStoreFilePropertyType(Property<File> keyStoreFile, Property<PasswordTypeVO> keyStorePasswordProperty)
keyStoreFile
- the Property of type File, which points to the keystore file.keyStorePasswordProperty
- the Property of type PasswordTypeVO, which holds the password, it must be "decryptable", which points to the keystoer file.PasswordTypeVO.isDecryptable()
public Property<PasswordTypeVO> getKeyStorePassword()
public String getKeyStoreType()
null
than default is used.public String getProvider()
null
than default is used, see class description.public List<String> getDerivedToRestrictions()
DerivedPropertyType
getDerivedToRestrictions
in class DerivedPropertyType<KeyStore>
public void validateConstraints(String propertyName) throws PropertyException
null
, then it must be non empty.null
, then it must be non empty.validateConstraints
in class DerivedPropertyType<KeyStore>
propertyName
- the name of the property used for logging purposes, to
identify the unique property which PropertyType has constraint
issues.PropertyException
- if the constraints have invalid/conflicting values.Property.validate()
public KeyStore validateDerivedValue(String propertyName) throws PropertyException
DerivedPropertyType
validateDerivedValue
in class DerivedPropertyType<KeyStore>
propertyName
- the name of derived PropertyPropertyException
- if it could not be converted into type T.