Package eu.europa.esig.dss.xml.common
Class AbstractConfigurator<F>
java.lang.Object
eu.europa.esig.dss.xml.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
ModifierConstructorDescriptionprotected
Default 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 void
setSecurityAttribute
(F factory, String attribute, Object value) Sets the attribute to the factoryprotected void
setSecurityAttributes
(F factory) Sets all attributes to the factoryvoid
setSecurityExceptionAlert
(StatusAlert securityExceptionAlert) This method allows to configure a custom alert on security exception in the builderprotected abstract void
setSecurityFeature
(F factory, String feature, Boolean value) Sets the feature to the factoryprotected void
setSecurityFeatures
(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
-StatusAlert
to define
-
enableFeature
Enables a custom feature- Parameters:
feature
-String
the feature constraint- Returns:
- this builder
-
disableFeature
Disables a custom feature- Parameters:
feature
-String
the feature constraint- Returns:
- this builder
-
setAttribute
-
removeAttribute
Removes the attribute from a list of attributes to set- Parameters:
attribute
-String
attribute 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
-String
feature constraint to setvalue
-Boolean
value 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
-Factory
to set the attribute toattribute
-String
attribute constraint to setvalue
-Object
value of the attribute to add- Throws:
SecurityConfigurationException
- in case if any exception occurs
-