Package eu.europa.esig.dss.jaxb.common
Class AbstractConfigurator<F>
java.lang.Object
eu.europa.esig.dss.jaxb.common.AbstractConfigurator<F>
- Type Parameters:
F- class of the object to be configured
- Direct Known Subclasses:
AbstractFactoryBuilder,ValidatorConfigurator
Abstract class containing util classes helping to configure a Factory or a Validator
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor initializing empty maps of security features and attributes -
Method Summary
Modifier and TypeMethodDescriptiondisableFeature(String feature) Disables a custom featureenableFeature(String feature) Enables a custom featureremoveAttribute(String attribute) Removes the attribute from a list of attributes to setsetAttribute(String attribute, Object value) Sets a custom attribute.protected abstract voidsetSecurityAttribute(F factory, String attribute, Object value) Sets the attribute to the factoryprotected voidsetSecurityAttributes(F factory) Sets all attributes to the factoryvoidsetSecurityExceptionAlert(StatusAlert securityExceptionAlert) This method allows to configure a custom alert on security exception in the builderprotected abstract voidsetSecurityFeature(F factory, String feature, Boolean value) Sets the feature to the factoryprotected voidsetSecurityFeatures(F factory) Sets all features to the factory
-
Constructor Details
-
AbstractConfigurator
protected AbstractConfigurator()Default constructor initializing empty maps of security features and attributes
-
-
Method Details
-
setSecurityExceptionAlert
This method allows to configure a custom alert on security exception in the builder- Parameters:
securityExceptionAlert-StatusAlertto define
-
enableFeature
Enables a custom feature- Parameters:
feature-Stringthe feature constraint- Returns:
- this builder
-
disableFeature
Disables a custom feature- Parameters:
feature-Stringthe feature constraint- Returns:
- this builder
-
setAttribute
Sets a custom attribute. -
removeAttribute
Removes the attribute from a list of attributes to set- Parameters:
attribute-Stringattribute to disable- Returns:
- this builder
-
setSecurityFeatures
Sets all features to the factory- Parameters:
factory- object
-
setSecurityFeature
protected abstract void setSecurityFeature(F factory, String feature, Boolean value) throws SecurityConfigurationException Sets the feature to the factory- Parameters:
factory- to set the feature tofeature-Stringfeature constraint to setvalue-Booleanvalue of the feature to add- Throws:
SecurityConfigurationException- in case if any exception occurs
-
setSecurityAttributes
Sets all attributes to the factory- Parameters:
factory- object
-
setSecurityAttribute
protected abstract void setSecurityAttribute(F factory, String attribute, Object value) throws SecurityConfigurationException Sets the attribute to the factory- Parameters:
factory-Factoryto set the attribute toattribute-Stringattribute constraint to setvalue-Objectvalue of the attribute to add- Throws:
SecurityConfigurationException- in case if any exception occurs
-