Package org.keycloak.saml.common.util
Class TransformerUtil
java.lang.Object
org.keycloak.saml.common.util.TransformerUtil
Utility to deal with JAXP Transformer
- Since:
- Oct 22, 2010
- Author:
- Anil.Saldhana@redhat.com
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Transformer
Get the Custom Stax Source to DOM result transformer that has been written to get over the JDK transformer bugs (JDK6) as well as the issue of Xalan installing its Transformer (which does not support stax).static Transformer
Get the Default Transformerstatic TransformerFactory
Creates aTransformerFactory
.static void
transform
(jakarta.xml.bind.JAXBContext context, jakarta.xml.bind.JAXBElement<?> jaxb, Result result) static void
transform
(Transformer transformer, Source source, DOMResult result) Use the transformer to transformstatic void
transform
(Transformer transformer, StAXSource stax, DOMResult result) Use the transformer to transform
-
Constructor Details
-
TransformerUtil
public TransformerUtil()
-
-
Method Details
-
getTransformer
Get the Default Transformer- Returns:
- Throws:
ConfigurationException
-
getTransformerFactory
public static TransformerFactory getTransformerFactory() throws TransformerFactoryConfigurationErrorCreates a
TransformerFactory
. The returned instance is cached and shared between different threads.- Returns:
- Throws:
TransformerFactoryConfigurationError
-
getStaxSourceToDomResultTransformer
Get the Custom Stax Source to DOM result transformer that has been written to get over the JDK transformer bugs (JDK6) as well as the issue of Xalan installing its Transformer (which does not support stax).- Returns:
- Throws:
ConfigurationException
-
transform
public static void transform(Transformer transformer, StAXSource stax, DOMResult result) throws ParsingException Use the transformer to transform- Parameters:
transformer
-stax
-result
-- Throws:
ParsingException
-
transform
public static void transform(Transformer transformer, Source source, DOMResult result) throws ParsingException Use the transformer to transform- Parameters:
transformer
-source
-result
-- Throws:
ParsingException
-
transform
public static void transform(jakarta.xml.bind.JAXBContext context, jakarta.xml.bind.JAXBElement<?> jaxb, Result result) throws ParsingException - Throws:
ParsingException
-