protected void serializeMediatorProperties(OMElement parent, Collection props) {
Iterator iter = props.iterator();
while (iter.hasNext()) {
MediatorProperty mp = (MediatorProperty) iter.next();
OMElement prop = fac.createOMElement("property", synNS, parent);
if (mp.getName() != null) {
prop.addAttribute(fac.createOMAttribute("name", nullNS, mp.getName()));
} else {
handleException("Mediator property name missing");
}
if (mp.getValue() != null) {
prop.addAttribute(fac.createOMAttribute("value", nullNS, mp.getValue()));
} else if (mp.getExpression() != null) {
SynapseXPathSerializer.serializeXPath(mp.getExpression(), prop, "expression");
} else {
handleException("Mediator property must have a literal value or be an expression");
}
}