Package org.xmlunit.util
Class TransformerFactoryConfigurer.Builder
- java.lang.Object
-
- org.xmlunit.util.TransformerFactoryConfigurer.Builder
-
- Enclosing class:
- TransformerFactoryConfigurer
public static class TransformerFactoryConfigurer.Builder extends Object
Builder for a TransformerFactoryConfigurer.- Since:
- XMLUnit 2.6.0
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransformerFactoryConfigurerbuild()Builds a TransformerFactoryConfigurer.TransformerFactoryConfigurer.BuilderwithAttribute(String key, Object value)Configures the factory with the given attribute, causes an exception inTransformerFactoryConfigurer.configure(javax.xml.transform.TransformerFactory)if the attribute is not supported.TransformerFactoryConfigurer.BuilderwithDTDLoadingDisabled()Configures the factory to not load any external DTDs.TransformerFactoryConfigurer.BuilderwithExtensionFunctionsDisabled()Configures the factory to not enable extension functions.TransformerFactoryConfigurer.BuilderwithExternalStylesheetLoadingDisabled()Configures the factory to not parse any DTDs.TransformerFactoryConfigurer.BuilderwithFeature(String key, boolean value)Configures the factory with the given feature, causes an exception inTransformerFactoryConfigurer.configure(javax.xml.transform.TransformerFactory)if the feature is not supported.TransformerFactoryConfigurer.BuilderwithSafeAttribute(String key, Object value)Configures the factory with the given attribute if it is supported.TransformerFactoryConfigurer.BuilderwithSafeFeature(String key, boolean value)Configures the factory with the given feature if it is supported.TransformerFactoryConfigurer.BuilderwithSecureProcessingEnabled()Configures the factory to enable secure processing which disables all external access as well as execution of extension functions.
-
-
-
Method Detail
-
build
public TransformerFactoryConfigurer build()
Builds a TransformerFactoryConfigurer.- Returns:
- the configurer
-
withAttribute
public TransformerFactoryConfigurer.Builder withAttribute(String key, Object value)
Configures the factory with the given attribute, causes an exception inTransformerFactoryConfigurer.configure(javax.xml.transform.TransformerFactory)if the attribute is not supported.- Parameters:
key- key of the attribute to be setvalue- value for the attribute to set- Returns:
- this
-
withSafeAttribute
public TransformerFactoryConfigurer.Builder withSafeAttribute(String key, Object value)
Configures the factory with the given attribute if it is supported.- Parameters:
key- key of the attribute to be setvalue- value for the attribute to set- Returns:
- this
-
withFeature
public TransformerFactoryConfigurer.Builder withFeature(String key, boolean value)
Configures the factory with the given feature, causes an exception inTransformerFactoryConfigurer.configure(javax.xml.transform.TransformerFactory)if the feature is not supported.- Parameters:
key- key of the feature to be setvalue- value for the feature to set- Returns:
- this
-
withSafeFeature
public TransformerFactoryConfigurer.Builder withSafeFeature(String key, boolean value)
Configures the factory with the given feature if it is supported.- Parameters:
key- key of the feature to be setvalue- value for the feature to set- Returns:
- this
-
withDTDLoadingDisabled
public TransformerFactoryConfigurer.Builder withDTDLoadingDisabled()
Configures the factory to not load any external DTDs.- Returns:
- this
-
withExternalStylesheetLoadingDisabled
public TransformerFactoryConfigurer.Builder withExternalStylesheetLoadingDisabled()
Configures the factory to not parse any DTDs.- Returns:
- this
-
withExtensionFunctionsDisabled
public TransformerFactoryConfigurer.Builder withExtensionFunctionsDisabled()
Configures the factory to not enable extension functions.- Returns:
- this
- Since:
- XMLUnit 2.10.0
-
withSecureProcessingEnabled
public TransformerFactoryConfigurer.Builder withSecureProcessingEnabled()
Configures the factory to enable secure processing which disables all external access as well as execution of extension functions.- Returns:
- this
- Since:
- XMLUnit 2.10.0
-
-