protected void handleTimerNode(final Node node, final Element element, final String uri,
final String localName, final ExtensibleXmlParser parser, final String attachedTo,
final boolean cancelActivity) throws SAXException {
super.handleNode(node, element, uri, localName, parser);
EventNode eventNode = (EventNode) node;
eventNode.setMetaData("AttachedTo", attachedTo);
eventNode.setMetaData("CancelActivity", cancelActivity);
org.w3c.dom.Node xmlNode = element.getFirstChild();
while (xmlNode != null) {
String nodeName = xmlNode.getNodeName();
if ("timerEventDefinition".equals(nodeName)) {
String timeCycle = null;
org.w3c.dom.Node subNode = xmlNode.getFirstChild();
while (subNode instanceof Element) {
String subNodeName = subNode.getNodeName();
if ("timeCycle".equals(subNodeName)) {
timeCycle = subNode.getTextContent();
break;
}
subNode = subNode.getNextSibling();
}
if (timeCycle != null && timeCycle.trim().length() > 0) {
List<EventFilter> eventFilters = new ArrayList<EventFilter>();
EventTypeFilter eventFilter = new EventTypeFilter();
eventFilter.setType("Timer-" + attachedTo + "-" + timeCycle);
eventFilters.add(eventFilter);
eventNode.setEventFilters(eventFilters);
eventNode.setMetaData("TimeCycle", timeCycle);
}
}
xmlNode = xmlNode.getNextSibling();
}
}