01: /*
02: * Created on 21-dic-2004
03: *
04: * To change the template for this generated file go to
05: * Window>Preferences>Java>Code Generation>Code and Comments
06: */
07: package com.opensymphony.workflow.loader;
08:
09: import java.util.ArrayList;
10: import java.util.List;
11:
12: import org.w3c.dom.Element;
13:
14: /**
15: * @author acapitani
16: *
17: * To change the template for this generated type comment go to
18: * Window>Preferences>Java>Code Generation>Code and Comments
19: */
20: public class ArgSimpleList implements ArgType {
21: protected String sName = "";
22: protected String sType = "";
23: protected List argList = new ArrayList();
24:
25: public boolean init(Element at) {
26: sName = at.getAttribute("name");
27: if ((sName == null) || (sName.length() == 0))
28: return false;
29: sType = at.getAttribute("type");
30: if (sType == null)
31: sType = "";
32:
33: List args = XMLUtil.getChildElements(at, "arg");
34: for (int l = 0; l < args.size(); l++) {
35: Element arg = (Element) args.get(l);
36: String sValue = arg.getAttribute("value");
37: if (sValue != null)
38: argList.add(sValue);
39: }
40: return true;
41: }
42:
43: public String getName() {
44: return sName;
45: }
46:
47: public String getType() {
48: return sType;
49: }
50:
51: public List getArgList() {
52: return argList;
53: }
54: }
|