Package org.xmlunit.util
Class XPathFactoryConfigurer.Builder
- java.lang.Object
-
- org.xmlunit.util.XPathFactoryConfigurer.Builder
-
- Enclosing class:
- XPathFactoryConfigurer
public static class XPathFactoryConfigurer.Builder extends Object
Builder for a XPathFactoryConfigurer.- Since:
- XMLUnit 2.10.0
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XPathFactoryConfigurerbuild()Builds a XPathFactoryConfigurer.XPathFactoryConfigurer.BuilderwithExtensionFunctionsDisabled()Configures the factory to not enable extension functions.XPathFactoryConfigurer.BuilderwithFeature(String key, boolean value)Configures the factory with the given feature, causes an exception inXPathFactoryConfigurer.configure(javax.xml.xpath.XPathFactory)if the feature is not supported.XPathFactoryConfigurer.BuilderwithProperty(String key, String value)Configures the factory with the given property, causes an exception inXPathFactoryConfigurer.configure(javax.xml.xpath.XPathFactory)if the property is not supported.XPathFactoryConfigurer.BuilderwithSafeFeature(String key, boolean value)Configures the factory with the given feature if it is supported.XPathFactoryConfigurer.BuilderwithSafeProperty(String key, String value)Configures the factory with the given property if it is supported.XPathFactoryConfigurer.BuilderwithSecureProcessingEnabled()Configures the factory to enable secure processing which disables all external access as well as execution of extension functions.
-
-
-
Method Detail
-
build
public XPathFactoryConfigurer build()
Builds a XPathFactoryConfigurer.- Returns:
- the configurer
-
withProperty
public XPathFactoryConfigurer.Builder withProperty(String key, String value)
Configures the factory with the given property, causes an exception inXPathFactoryConfigurer.configure(javax.xml.xpath.XPathFactory)if the property is not supported.This method will not do anything if
XPathFactorydoesn't support the setPropery method which has been added with Java 18.- Parameters:
key- key of the property to be setvalue- value for the property to set- Returns:
- this
-
withSafeProperty
public XPathFactoryConfigurer.Builder withSafeProperty(String key, String value)
Configures the factory with the given property if it is supported.This method will not do anything if
XPathFactorydoesn't support the setPropery method which has been added with Java 18.- Parameters:
key- key of the property to be setvalue- value for the property to set- Returns:
- this
-
withFeature
public XPathFactoryConfigurer.Builder withFeature(String key, boolean value)
Configures the factory with the given feature, causes an exception inXPathFactoryConfigurer.configure(javax.xml.xpath.XPathFactory)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 XPathFactoryConfigurer.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
-
withExtensionFunctionsDisabled
public XPathFactoryConfigurer.Builder withExtensionFunctionsDisabled()
Configures the factory to not enable extension functions.- Returns:
- this
-
withSecureProcessingEnabled
public XPathFactoryConfigurer.Builder withSecureProcessingEnabled()
Configures the factory to enable secure processing which disables all external access as well as execution of extension functions.- Returns:
- this
-
-