// Adding static subscriptions
List<Subscription> staticSubscriptionList =
eventSource.getSubscriptionManager().getStaticSubscriptions();
for (Iterator<Subscription> iterator = staticSubscriptionList.iterator();
iterator.hasNext();) {
Subscription staticSubscription = iterator.next();
OMElement staticSubElem =
fac.createOMElement("subscription", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
staticSubElem.addAttribute(
fac.createOMAttribute("id", nullNS, staticSubscription.getId()));
OMElement filterElem =
fac.createOMElement("filter", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
filterElem.addAttribute(fac.createOMAttribute("source", nullNS,
(String) staticSubscription.getFilterValue()));
filterElem.addAttribute(fac.createOMAttribute("dialect", nullNS,
(String) staticSubscription.getFilterDialect()));
staticSubElem.addChild(filterElem);
OMElement endpointElem =
fac.createOMElement("endpoint", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
OMElement addressElem =
fac.createOMElement("address", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
addressElem.addAttribute(
fac.createOMAttribute("uri", nullNS, staticSubscription.getEndpointUrl()));
endpointElem.addChild(addressElem);
staticSubElem.addChild(endpointElem);
if (staticSubscription.getExpires() != null) {
OMElement expiresElem =
fac.createOMElement("expires", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
fac.createOMText(expiresElem,
ConverterUtil.convertToString(staticSubscription.getExpires()));
staticSubElem.addChild(expiresElem);
}
evenSourceElem.addChild(staticSubElem);
}