use of org.apache.synapse.mediators.ListMediator in project wso2-synapse by wso2.
the class AbstractListMediatorFactory method addChildren.
protected static void addChildren(OMElement el, ListMediator m, Properties properties) {
Iterator it = el.getChildren();
while (it.hasNext()) {
OMNode child = (OMNode) it.next();
if (child instanceof OMElement) {
if (!DESCRIPTION_Q.equals(((OMElement) child).getQName())) {
// neglect the description tag
SynapseConfiguration configuration = null;
if (properties != null) {
configuration = properties.get(SynapseConstants.SYNAPSE_CONFIGURATION) != null ? (SynapseConfiguration) properties.get(SynapseConstants.SYNAPSE_CONFIGURATION) : null;
}
Mediator med = MediatorFactoryFinder.getInstance().getMediator((OMElement) child, properties, configuration);
if (med != null) {
m.addChild(med);
} else {
String msg = "Unknown mediator : " + ((OMElement) child).getLocalName();
log.error(msg);
throw new SynapseException(msg);
}
}
} else if (child instanceof OMComment) {
CommentMediator commendMediator = new CommentMediator();
commendMediator.setCommentText(((OMComment) child).getValue());
m.addChild(commendMediator);
}
}
}
Aggregations