public void deployCFlowStack(Element pointcut) throws Exception
{
String name = pointcut.getAttribute("name");
if (name != null && name.trim().equals("")) name = null;
if (name == null) throw new RuntimeException("name required for a cflow-stack");
CFlowStack stack = new CFlowStack(name);
NodeList children2 = pointcut.getChildNodes();
for (int j = 0; j < children2.getLength(); j++)
{
if (children2.item(j).getNodeType() == Node.ELEMENT_NODE)
{
Element cflowElement = (Element) children2.item(j);
String tag2 = cflowElement.getTagName();
String expr = cflowElement.getAttribute("expr");
if (expr != null && expr.trim().equals(""))
{
throw new RuntimeException(tag2 + " requires an expr attribute to be defined");
}
if (tag2.equals("called"))
{
stack.addCFlow(new CFlow(expr, false));
}
if (tag2.equals("not-called"))
{
stack.addCFlow(new CFlow(expr, true));
}
}
}
manager.addCFlowStack(stack);