Method from org.apache.synapse.mediators.transform.XSLTMediator Detail: |
public void addAllProperties(List<MediatorProperty> list) {
properties.addAll(list);
}
|
public void addFeature(String featureName,
boolean isFeatureEnable) {
try {
MediatorProperty mp = new MediatorProperty();
mp.setName(featureName);
if (isFeatureEnable) {
mp.setValue("true");
} else {
mp.setValue("false");
}
explicitFeatures.add(mp);
if (USE_DOM_SOURCE_AND_RESULTS.equals(featureName)) {
useDOMSourceAndResults = isFeatureEnable;
} else {
transFact.setFeature(featureName, isFeatureEnable);
}
} catch (TransformerConfigurationException e) {
String msg = "Error occured when setting features to the TransformerFactory";
log.error(msg, e);
throw new SynapseException(msg, e);
}
}
to add a feature which need to set to the TransformerFactory |
public void addProperty(MediatorProperty p) {
properties.add(p);
}
|
public List<MediatorProperty> getFeatures() {
return explicitFeatures;
}
|
public List<MediatorProperty> getProperties() {
return properties;
}
|
public SynapseXPath getSource() {
return source;
}
|
public String getTargetPropertyName() {
return targetPropertyName;
}
|
public String getXsltKey() {
return xsltKey;
}
|
public boolean mediate(MessageContext synCtx) {
boolean traceOn = isTraceOn(synCtx);
boolean traceOrDebugOn = isTraceOrDebugOn(traceOn);
if (traceOrDebugOn) {
traceOrDebug(traceOn, "Start : XSLT mediator");
if (traceOn && trace.isTraceEnabled()) {
trace.trace("Message : " + synCtx.getEnvelope());
}
}
try {
performXSLT(synCtx, traceOrDebugOn, traceOn);
} catch (Exception e) {
handleException("Unable to perform XSLT transformation using : " + xsltKey +
" against source XPath : " +
(sourceXPathString == null ? DEFAULT_XPATH : " source XPath : " +
sourceXPathString), e, synCtx);
}
if (traceOrDebugOn) {
traceOrDebug(traceOn, "End : XSLT mediator");
}
return true;
}
Transforms this message (or its element specified as the source) using the
given XSLT transformation |
public void setSource(SynapseXPath source) {
this.source = source;
}
|
public void setSourceXPathString(String sourceXPathString) {
this.sourceXPathString = sourceXPathString;
}
|
public void setTargetPropertyName(String targetPropertyName) {
this.targetPropertyName = targetPropertyName;
}
|
public void setXsltKey(String xsltKey) {
this.xsltKey = xsltKey;
}
|