if (!(m instanceof MessageStoreMediator)) {
handleException("Unsupported mediator passed in for serialization : " + m.getType());
}
MessageStoreMediator messageStoreMediator = (MessageStoreMediator)m;
String messageStoreName = messageStoreMediator.getMessageStoreName();
OMElement storeElem = fac.createOMElement("store", synNS);
String name = messageStoreMediator.getName();
if(name != null) {
OMAttribute nameAtt = fac.createOMAttribute("name" , nullNS , name);
storeElem.addAttribute(nameAtt);
}
//In normal operations messageStoreName can't be null
//But we do a null check here since in run time there can be manuel modifications
if(messageStoreName != null ) {
OMAttribute msName = fac.createOMAttribute(ATT_MESSAGE_STORE ,nullNS,messageStoreName);
storeElem.addAttribute(msName);
} else {
handleException("Can't serialize MessageStore Mediator message store is null ");
}
String sequence = messageStoreMediator.getOnStoreSequence();
// sequence is an optional parameter
if(sequence != null) {
OMAttribute sequenceAtt = fac.createOMAttribute(ATT_SEQUENCE , nullNS ,sequence);
storeElem.addAttribute(sequenceAtt);
}