Package eu.europa.esig.dss.xml.common
Class DocumentBuilderFactoryBuilder
java.lang.Object
eu.europa.esig.dss.xml.common.AbstractConfigurator<DocumentBuilderFactory>
eu.europa.esig.dss.xml.common.AbstractFactoryBuilder<DocumentBuilderFactory>
eu.europa.esig.dss.xml.common.DocumentBuilderFactoryBuilder
This class is used to build a
DocumentBuilderFactory
-
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructor building a secure pre-configured instance ofDocumentBuilderFactoryBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configuredDocumentBuilderFactory
disableFeature
(String feature) Disables a custom featureenableFeature
(String feature) Enables a custom featureInstantiates a pre-configured with security featuresDocumentBuilderFactoryBuilder
protected DocumentBuilderFactory
This method instantiates the corresponding factory.removeAttribute
(String attribute) Removes the attribute from a list of attributes to setsetAttribute
(String attribute, Object value) Sets a custom attribute.protected void
setSecurityAttribute
(DocumentBuilderFactory factory, String attribute, Object value) Sets the attribute to the factoryprotected void
setSecurityFeature
(DocumentBuilderFactory factory, String feature, Boolean value) Sets the feature to the factoryMethods inherited from class eu.europa.esig.dss.xml.common.AbstractConfigurator
setSecurityAttributes, setSecurityExceptionAlert, setSecurityFeatures
-
Constructor Details
-
DocumentBuilderFactoryBuilder
protected DocumentBuilderFactoryBuilder()Default constructor building a secure pre-configured instance ofDocumentBuilderFactoryBuilder
-
-
Method Details
-
getSecureDocumentBuilderFactoryBuilder
Instantiates a pre-configured with security featuresDocumentBuilderFactoryBuilder
- Returns:
- default
DocumentBuilderFactoryBuilder
-
build
Builds the configuredDocumentBuilderFactory
- Returns:
DocumentBuilderFactory
-
instantiateFactory
Description copied from class:AbstractFactoryBuilder
This method instantiates the corresponding factory. NOTE: in order to change the default behavior, the related class and the current method should be overridden- Specified by:
instantiateFactory
in classAbstractFactoryBuilder<DocumentBuilderFactory>
- Returns:
- factory
-
enableFeature
Description copied from class:AbstractConfigurator
Enables a custom feature- Overrides:
enableFeature
in classAbstractConfigurator<DocumentBuilderFactory>
- Parameters:
feature
-String
the feature constraint- Returns:
- this builder
-
disableFeature
Description copied from class:AbstractConfigurator
Disables a custom feature- Overrides:
disableFeature
in classAbstractConfigurator<DocumentBuilderFactory>
- Parameters:
feature
-String
the feature constraint- Returns:
- this builder
-
setAttribute
Description copied from class:AbstractConfigurator
Sets a custom attribute.- Overrides:
setAttribute
in classAbstractConfigurator<DocumentBuilderFactory>
- Parameters:
attribute
-String
attribute constraint to setvalue
-Object
a value to define for the attribute- Returns:
- this builder
-
removeAttribute
Description copied from class:AbstractConfigurator
Removes the attribute from a list of attributes to set- Overrides:
removeAttribute
in classAbstractConfigurator<DocumentBuilderFactory>
- Parameters:
attribute
-String
attribute to disable- Returns:
- this builder
-
setSecurityFeature
Description copied from class:AbstractConfigurator
Sets the feature to the factory- Specified by:
setSecurityFeature
in classAbstractConfigurator<DocumentBuilderFactory>
- Parameters:
factory
- to set the feature tofeature
-String
feature constraint to setvalue
-Boolean
value of the feature to add
-
setSecurityAttribute
Description copied from class:AbstractConfigurator
Sets the attribute to the factory- Specified by:
setSecurityAttribute
in classAbstractConfigurator<DocumentBuilderFactory>
- Parameters:
factory
-Factory
to set the attribute toattribute
-String
attribute constraint to setvalue
-Object
value of the attribute to add
-