Package overit.geocall.xml
Class TransformerProvider
java.lang.Object
overit.geocall.xml.TransformerProvider
This class is an implementation of easy security settings XML transformers.
Inspired by http://openjdk.java.net/jeps/185
Inspired by http://openjdk.java.net/jeps/185
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTool for building xml transformer.TransformerProvider(boolean secureProcessing) Tool for parsing xml securely. -
Method Summary
Modifier and TypeMethodDescriptioncreates a new identityTransformerbased on the current object configurationnewTransformer(Source source) creates a newTransformerbased on the current object configuration
-
Field Details
-
tf
-
-
Constructor Details
-
TransformerProvider
public TransformerProvider()Tool for building xml transformer. By default it configures all the factories with FEATURE_SECURE_POLICY
See https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sheet -
TransformerProvider
public TransformerProvider(boolean secureProcessing) Tool for parsing xml securely. It configures all the factories with FEATURE_SECURE_POLICY dependent on the parametersecureProcessing
See https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sheet- Parameters:
secureProcessing-truefor configuring the factories with the feature FEATURE_SECURE_POLICY
-
-
Method Details
-
newTransformer
creates a newTransformerbased on the current object configuration- Parameters:
source- theSourceof the xsl transformation definition- Returns:
- a new
Transformerbased on the current object configuration - Throws:
TransformerConfigurationException- if there is any problem setting up the transfomer to respect the current object configuration
-
newTransformer
creates a new identityTransformerbased on the current object configuration- Returns:
- a new identity
Transformerbased on the current object configuration - Throws:
TransformerConfigurationException- if there is any problem setting up the transfomer to respect the current object configuration
-