|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.synapse.mediators.AbstractMediator org.apache.synapse.mediators.transform.XSLTMediator
public class XSLTMediator
The XSLT mediator performs an XSLT transformation requested, using the current message. The source attribute (if available) specifies the source element on which the transformation would be applied. It will default to the first child of the messages' SOAP body, if it is omitted.
Additional properties passed into this mediator would become parameters for XSLT. Additional features passed into this mediator would become features except for "http://ws.apache.org/ns/synapse/transform/feature/dom" for the Transformer Factory, which is used to decide between using DOM and Streams during the transformation process. By default this is turned on as an optimization, but should be set to false if issues are detected
Note: Set the TransformerFactory system property to generate and use translets -Djavax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.TransformerFactoryImpl
Field Summary | |
---|---|
static String |
RESULT_BUILDER_FACTORY
The name of the attribute that allows to specify the ResultBuilderFactory . |
static String |
SOURCE_BUILDER_FACTORY
The name of the attribute that allows to specify the SourceBuilderFactory . |
static String |
USE_DOM_SOURCE_AND_RESULTS
The feature for which deciding switching between DOM and Stream during the transformation process |
Fields inherited from class org.apache.synapse.mediators.AbstractMediator |
---|
log, trace, traceState |
Constructor Summary | |
---|---|
XSLTMediator()
|
Method Summary | |
---|---|
void |
addAllProperties(List<MediatorProperty> list)
|
void |
addAttribute(String name,
String value)
Add an attribute to be set on the TransformerFactory used by this mediator instance. |
void |
addFeature(String featureName,
boolean isFeatureEnable)
Add a feature to be set on the TransformerFactory used by this mediator instance. |
void |
addProperty(MediatorProperty p)
|
List<MediatorProperty> |
getAttributes()
|
List<MediatorProperty> |
getFeatures()
|
List<MediatorProperty> |
getProperties()
|
ResourceMap |
getResourceMap()
|
SynapseXPath |
getSource()
|
String |
getTargetPropertyName()
|
Value |
getXsltKey()
|
boolean |
mediate(MessageContext synCtx)
Transforms this message (or its element specified as the source) using the given XSLT transformation |
void |
setResourceMap(ResourceMap resourceMap)
|
void |
setSource(SynapseXPath source)
|
void |
setSourceXPathString(String sourceXPathString)
|
void |
setTargetPropertyName(String targetPropertyName)
|
void |
setXsltKey(Value xsltKey)
|
Methods inherited from class org.apache.synapse.mediators.AbstractMediator |
---|
auditLog, auditWarn, configure, disableStatistics, enableStatistics, getAspectConfiguration, getDescription, getLog, getTraceState, getType, handleException, handleException, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, setTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String USE_DOM_SOURCE_AND_RESULTS
public static final String SOURCE_BUILDER_FACTORY
SourceBuilderFactory
.
public static final String RESULT_BUILDER_FACTORY
ResultBuilderFactory
.
Constructor Detail |
---|
public XSLTMediator()
Method Detail |
---|
public boolean mediate(MessageContext synCtx)
synCtx
- the current message where the transformation will apply
public SynapseXPath getSource()
public void setSource(SynapseXPath source)
public Value getXsltKey()
public void setXsltKey(Value xsltKey)
public void addProperty(MediatorProperty p)
public void addFeature(String featureName, boolean isFeatureEnable)
TransformerFactory
used by this mediator instance.
This method can also be used to enable some Synapse specific optimizations and
enhancements as described in the documentation of this class.
featureName
- The name of the featureisFeatureEnable
- the desired state of the featureTransformerFactory.setFeature(String, boolean)
,
XSLTMediator
public void addAttribute(String name, String value)
TransformerFactory
used by this mediator instance.
This method can also be used to enable some Synapse specific optimizations and
enhancements as described in the documentation of this class.
name
- The name of the featurevalue
- should this feature enable?TransformerFactory.setAttribute(String, Object)
,
XSLTMediator
public List<MediatorProperty> getFeatures()
public List<MediatorProperty> getAttributes()
public void addAllProperties(List<MediatorProperty> list)
public List<MediatorProperty> getProperties()
public void setSourceXPathString(String sourceXPathString)
public String getTargetPropertyName()
public void setTargetPropertyName(String targetPropertyName)
public ResourceMap getResourceMap()
public void setResourceMap(ResourceMap resourceMap)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |