Package eu.europa.esig.dss.jaxb
Class ValidatorConfigurator
java.lang.Object
eu.europa.esig.dss.jaxb.AbstractFactoryBuilder<Validator>
eu.europa.esig.dss.jaxb.ValidatorConfigurator
public class ValidatorConfigurator extends AbstractFactoryBuilder<Validator>
-
Method Summary
Modifier and Type Method Description void
configure(Validator validator)
Configures thevalidator
by setting the pre-defined features and attributesValidatorConfigurator
disableFeature(String feature)
Disables a custom featureValidatorConfigurator
enableFeature(String feature)
Enables a custom featurestatic ValidatorConfigurator
getSecureValidatorConfigurator()
Instantiates a pre-configured with security featuresValidatorConfigurator
ValidatorConfigurator
removeAttribute(String attribute)
Removes the attribute from a list of attributes to setValidatorConfigurator
setAttribute(String attribute, Object value)
Sets a custom attribute.protected void
setSecurityAttribute(Validator validator, String attribute, Object value)
Sets the attribute to the factoryprotected void
setSecurityFeature(Validator validator, String feature, Boolean value)
Sets the feature to the factoryMethods inherited from class eu.europa.esig.dss.jaxb.AbstractFactoryBuilder
setSecurityAttributes, setSecurityExceptionAlert, setSecurityFeatures
-
Method Details
-
getSecureValidatorConfigurator
Instantiates a pre-configured with security featuresValidatorConfigurator
- Returns:
- default
ValidatorConfigurator
-
configure
Configures thevalidator
by setting the pre-defined features and attributes- Parameters:
validator
-Validator
to be configured
-
enableFeature
Description copied from class:AbstractFactoryBuilder
Enables a custom feature- Overrides:
enableFeature
in classAbstractFactoryBuilder<Validator>
- Parameters:
feature
-String
the feature constraint- Returns:
- this builder
-
disableFeature
Description copied from class:AbstractFactoryBuilder
Disables a custom feature- Overrides:
disableFeature
in classAbstractFactoryBuilder<Validator>
- Parameters:
feature
-String
the feature constraint- Returns:
- this builder
-
setAttribute
Description copied from class:AbstractFactoryBuilder
Sets a custom attribute.- Overrides:
setAttribute
in classAbstractFactoryBuilder<Validator>
- Parameters:
attribute
-String
attribute constraint to setvalue
-Object
a value to define for the attribute- Returns:
- this builder
-
removeAttribute
Description copied from class:AbstractFactoryBuilder
Removes the attribute from a list of attributes to set- Overrides:
removeAttribute
in classAbstractFactoryBuilder<Validator>
- Parameters:
attribute
-String
attribute to disable- Returns:
- this builder
-
setSecurityFeature
protected void setSecurityFeature(Validator validator, String feature, Boolean value) throws ExceptionDescription copied from class:AbstractFactoryBuilder
Sets the feature to the factory- Specified by:
setSecurityFeature
in classAbstractFactoryBuilder<Validator>
- Parameters:
validator
- to set the feature tofeature
-String
feature constraint to setvalue
-Boolean
value of the feature to add- Throws:
Exception
- in case if any exception occurs
-
setSecurityAttribute
protected void setSecurityAttribute(Validator validator, String attribute, Object value) throws ExceptionDescription copied from class:AbstractFactoryBuilder
Sets the attribute to the factory- Specified by:
setSecurityAttribute
in classAbstractFactoryBuilder<Validator>
- Parameters:
validator
-Factory
to set the attribute toattribute
-String
attribute constraint to setvalue
-Object
value of the attribute to add- Throws:
Exception
- in case if any exception occurs
-