public abstract class AbstractXmlTransformer extends AbstractMessageTransformer implements Initialisable
AbstractXmlTransformer offers some XSLT transform on a DOM (or
other XML-ish) object.| Modifier and Type | Class and Description |
|---|---|
protected static interface |
AbstractXmlTransformer.ResultHolder
Result callback interface used when processing XML through JAXP
|
encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypesPHASE_NAMEPHASE_NAMEPROPERTY_NAME| Constructor and Description |
|---|
AbstractXmlTransformer() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
convertToBytes(Object obj,
String outputEncoding)
Converts an XML in-memory representation to a String using a specific encoding.
|
protected String |
convertToText(Object obj)
Deprecated.
Replaced by convertToText(Object obj, String ouputEncoding)
|
protected String |
convertToText(Object obj,
String outputEncoding)
Converts an XML in-memory representation to a String using a specific encoding.
|
protected void |
doInitialise() |
boolean |
getAcceptExternalEntities() |
String |
getOutputEncoding() |
protected static AbstractXmlTransformer.ResultHolder |
getResultHolder(Class<?> desiredClass) |
XMLInputFactory |
getXMLInputFactory() |
XMLOutputFactory |
getXMLOutputFactory() |
void |
initialise() |
boolean |
isUseStaxSource() |
void |
setAcceptExternalEntities(boolean acceptExternalEntities) |
void |
setOutputEncoding(String outputEncoding) |
void |
setUseStaxSource(boolean useStaxSource) |
void |
setXMLInputFactory(XMLInputFactory xmlInputFactory) |
void |
setXMLOutputFactory(XMLOutputFactory xmlOutputFactory) |
protected void |
writeToStream(Object obj,
String outputEncoding,
OutputStream output) |
checkReturnClass, doTransform, isSourceDataTypeSupported, transform, transform, transform, transformMessagedispose, generateTransformerName, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, unregisterSourceType, unregisterSourceTypegetAnnotation, getAnnotations, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transformprocessdisposesetNamegetNamesetMuleContextsetEndpointpublic final void initialise()
throws InitialisationException
initialise in interface Initialisableinitialise in class AbstractTransformerInitialisationExceptionprotected void doInitialise()
throws InitialisationException
InitialisationExceptionprotected static AbstractXmlTransformer.ResultHolder getResultHolder(Class<?> desiredClass)
desiredClass - Java class representing the desired format@Deprecated protected String convertToText(Object obj) throws Exception
obj - Object to convert (could be byte[], String, DOM, DOM4J)TransformerFactoryConfigurationError - On errorTransformerException - On errorTransformerExceptionExceptionprotected String convertToText(Object obj, String outputEncoding) throws Exception
obj - Object to convert (could be byte[], String, DOM, or DOM4J Document).
If the object is a byte[], the character
encoding used MUST match the declared encoding standard, or a parse error will occur.outputEncoding - Name of the XML encoding to use, e.g. US-ASCII, or null for UTF-8TransformerFactoryConfigurationError - On errorTransformerException - On errorTransformerExceptionExceptionprotected String convertToBytes(Object obj, String outputEncoding) throws Exception
obj - Object to convert (could be byte[], String, DOM, or DOM4J Document).
If the object is a byte[], the character
encoding used MUST match the declared encoding standard, or a parse error will occur.outputEncoding - Name of the XML encoding to use, e.g. US-ASCII, or null for UTF-8TransformerFactoryConfigurationError - On errorTransformerException - On errorTransformerExceptionExceptionprotected void writeToStream(Object obj, String outputEncoding, OutputStream output) throws Exception
Exceptionpublic String getOutputEncoding()
public void setOutputEncoding(String outputEncoding)
outputEncoding - the outputEncoding to setpublic boolean isUseStaxSource()
public void setUseStaxSource(boolean useStaxSource)
public XMLInputFactory getXMLInputFactory()
public void setXMLInputFactory(XMLInputFactory xmlInputFactory)
public XMLOutputFactory getXMLOutputFactory()
public void setXMLOutputFactory(XMLOutputFactory xmlOutputFactory)
public void setAcceptExternalEntities(boolean acceptExternalEntities)
public boolean getAcceptExternalEntities()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.