protected void handleAction(final ExtendedNodeImpl node, final Element element, String type) { NodeList nodeList = element.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { org.w3c.dom.Node xmlNode = nodeList.item(i); String nodeName = xmlNode.getNodeName(); if (nodeName.equals(type)) { List<DroolsAction> actions = new ArrayList<DroolsAction>(); NodeList subNodeList = xmlNode.getChildNodes(); for (int j = 0; j < subNodeList.getLength(); j++) { Element subXmlNode = (Element) subNodeList.item(j); DroolsAction action = extractAction(subXmlNode); actions.add(action); } node.setActions(type, actions); return; } } }
protected void handleScript(final ExtendedNodeImpl node, final Element element, String type) { NodeList nodeList = element.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { if (nodeList.item(i) instanceof Element) { Element xmlNode = (Element) nodeList.item(i); String nodeName = xmlNode.getNodeName(); if (nodeName.equals("extensionElements")) { NodeList subNodeList = xmlNode.getChildNodes(); for (int j = 0; j < subNodeList.getLength(); j++) { org.w3c.dom.Node subXmlNode = subNodeList.item(j); if(subXmlNode.getNodeName().contains(type + "-script")) { List<DroolsAction> actions = node.getActions(type); if (actions == null) { actions = new ArrayList<DroolsAction>(); node.setActions(type, actions); } DroolsAction action = extractScript((Element) subXmlNode); actions.add(action); } } } } } }
protected void handleAction(final ExtendedNodeImpl node, final Element element, String type) { NodeList nodeList = element.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { org.w3c.dom.Node xmlNode = nodeList.item(i); String nodeName = xmlNode.getNodeName(); if (nodeName.equals(type)) { List<DroolsAction> actions = new ArrayList<DroolsAction>(); NodeList subNodeList = xmlNode.getChildNodes(); for (int j = 0; j < subNodeList.getLength(); j++) { Element subXmlNode = (Element) subNodeList.item(j); DroolsAction action = extractAction(subXmlNode); actions.add(action); } node.setActions(type, actions); return; } } }
protected void handleScript(final ExtendedNodeImpl node, final Element element, String type) { NodeList nodeList = element.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { if (nodeList.item(i) instanceof Element) { Element xmlNode = (Element) nodeList.item(i); String nodeName = xmlNode.getNodeName(); if (nodeName.equals("extensionElements")) { NodeList subNodeList = xmlNode.getChildNodes(); for (int j = 0; j < subNodeList.getLength(); j++) { org.w3c.dom.Node subXmlNode = subNodeList.item(j); if(subXmlNode.getNodeName().contains(type + "-script")) { List<DroolsAction> actions = node.getActions(type); if (actions == null) { actions = new ArrayList<DroolsAction>(); node.setActions(type, actions); } DroolsAction action = extractScript((Element) subXmlNode); actions.add(action); } } } } } }