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 voidconfigure(Validator validator)Configures thevalidatorby setting the pre-defined features and attributesValidatorConfiguratordisableFeature(String feature)Disables a custom featureValidatorConfiguratorenableFeature(String feature)Enables a custom featurestatic ValidatorConfiguratorgetSecureValidatorConfigurator()Instantiates a pre-configured with security featuresValidatorConfiguratorValidatorConfiguratorremoveAttribute(String attribute)Removes the attribute from a list of attributes to setValidatorConfiguratorsetAttribute(String attribute, Object value)Sets a custom attribute.protected voidsetSecurityAttribute(Validator validator, String attribute, Object value)Sets the attribute to the factoryprotected voidsetSecurityFeature(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 thevalidatorby setting the pre-defined features and attributes- Parameters:
validator-Validatorto be configured
-
enableFeature
Description copied from class:AbstractFactoryBuilderEnables a custom feature- Overrides:
enableFeaturein classAbstractFactoryBuilder<Validator>- Parameters:
feature-Stringthe feature constraint- Returns:
- this builder
-
disableFeature
Description copied from class:AbstractFactoryBuilderDisables a custom feature- Overrides:
disableFeaturein classAbstractFactoryBuilder<Validator>- Parameters:
feature-Stringthe feature constraint- Returns:
- this builder
-
setAttribute
Description copied from class:AbstractFactoryBuilderSets a custom attribute.- Overrides:
setAttributein classAbstractFactoryBuilder<Validator>- Parameters:
attribute-Stringattribute constraint to setvalue-Objecta value to define for the attribute- Returns:
- this builder
-
removeAttribute
Description copied from class:AbstractFactoryBuilderRemoves the attribute from a list of attributes to set- Overrides:
removeAttributein classAbstractFactoryBuilder<Validator>- Parameters:
attribute-Stringattribute to disable- Returns:
- this builder
-
setSecurityFeature
protected void setSecurityFeature(Validator validator, String feature, Boolean value) throws ExceptionDescription copied from class:AbstractFactoryBuilderSets the feature to the factory- Specified by:
setSecurityFeaturein classAbstractFactoryBuilder<Validator>- Parameters:
validator- to set the feature tofeature-Stringfeature constraint to setvalue-Booleanvalue 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:AbstractFactoryBuilderSets the attribute to the factory- Specified by:
setSecurityAttributein classAbstractFactoryBuilder<Validator>- Parameters:
validator-Factoryto set the attribute toattribute-Stringattribute constraint to setvalue-Objectvalue of the attribute to add- Throws:
Exception- in case if any exception occurs
-