Package org.keycloak.saml.common.util
Class TransformerUtil
- java.lang.Object
-
- org.keycloak.saml.common.util.TransformerUtil
-
public class TransformerUtil extends Object
Utility to deal with JAXP Transformer- Since:
- Oct 22, 2010
- Author:
- Anil.Saldhana@redhat.com
-
-
Constructor Summary
Constructors Constructor Description TransformerUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TransformergetStaxSourceToDomResultTransformer()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 TransformergetTransformer()Get the Default Transformerstatic TransformerFactorygetTransformerFactory()Creates aTransformerFactory.static voidtransform(javax.xml.bind.JAXBContext context, javax.xml.bind.JAXBElement<?> jaxb, Result result)static voidtransform(Transformer transformer, Source source, DOMResult result)Use the transformer to transformstatic voidtransform(Transformer transformer, StAXSource stax, DOMResult result)Use the transformer to transform
-
-
-
Method Detail
-
getTransformer
public static Transformer getTransformer() throws ConfigurationException
Get the Default Transformer- Returns:
- Throws:
ConfigurationException
-
getTransformerFactory
public static TransformerFactory getTransformerFactory() throws TransformerFactoryConfigurationError
Creates a
TransformerFactory. The returned instance is cached and shared between different threads.- Returns:
- Throws:
TransformerFactoryConfigurationError
-
getStaxSourceToDomResultTransformer
public static Transformer getStaxSourceToDomResultTransformer() throws ConfigurationException
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(javax.xml.bind.JAXBContext context, javax.xml.bind.JAXBElement<?> jaxb, Result result) throws ParsingException- Throws:
ParsingException
-
-