public class CertificatesFilePropertyType extends DerivedFromSinglePropertyType<File,Collection<? extends Certificate>> implements MarkerPathPropertyType
CertificateFactory.getInstance(String)
,
CertificateFactory.getInstance(String, String)
,
Certificate
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CERTIFICATE_TYPE
The default certificate type "X.509"
|
static String |
TYPE
The Typename of CertificatesFromFile
|
Constructor and Description |
---|
CertificatesFilePropertyType(Property<File> certificatesFileProperty)
Constructor using default type and provider.
|
CertificatesFilePropertyType(Property<File> certificatesFileProperty,
String certificateType)
Constructor using default provider.
|
CertificatesFilePropertyType(Property<File> certificatesFileProperty,
String certificateType,
String provider)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getCertificateType()
The certificateType like "X.509"
|
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". |
String |
getProvider()
The name of the provider.
|
void |
validateConstraints(String propertyName)
Validates if
Type is not
null and not empty.
If the provider is not null than it must not be empty.
|
Collection<? extends Certificate> |
validateDerivedValue(String propertyName)
Using the CertificateFactory.generateCertificates(java.io.InputStream) using the CertificateType and Provider.
|
getDerivedFromProperty, getDerivedFromPropertyValue
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 DEFAULT_CERTIFICATE_TYPE
public static final String TYPE
public CertificatesFilePropertyType(Property<File> certificatesFileProperty, String certificateType, String provider)
certificatesFileProperty
- a Property which returns a File where the certificates is stored.certificateType
- the certificate type. See the CertificateFactory section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard certificate types.provider
- the name of the provider.public CertificatesFilePropertyType(Property<File> certificatesFileProperty, String certificateType)
certificatesFileProperty
- a Property which returns a File where the certificates is stored.certificateType
- the certificate type. See the CertificateFactory section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard certificate types.public CertificatesFilePropertyType(Property<File> certificatesFileProperty)
certificatesFileProperty
- a Property which returns a File where the certificates is stored.DEFAULT_CERTIFICATE_TYPE
public String getCertificateType()
public String getProvider()
public void validateConstraints(String propertyName) throws PropertyException
null
and not empty.null
than it must not be empty.validateConstraints
in class DerivedPropertyType<Collection<? extends Certificate>>
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 Collection<? extends Certificate> validateDerivedValue(String propertyName) throws PropertyException
validateDerivedValue
in class DerivedPropertyType<Collection<? extends Certificate>>
propertyName
- the name of derived PropertyPropertyException
- if it could not be converted into type T.CertificateFactory.generateCertificates(java.io.InputStream)
public List<String> getDerivedToRestrictions()
DerivedPropertyType
getDerivedToRestrictions
in class DerivedPropertyType<Collection<? extends Certificate>>