1 16 package scriptella.configuration; 17 18 import java.util.List ; 19 20 26 public class ScriptEl extends ScriptingElement { 27 public static final String TAG_NAME = "script"; 28 private boolean newTx; 29 protected List <OnErrorEl> onerrors; 30 31 public ScriptEl(XmlElement element, ScriptingElement parent) { 32 super(parent); 33 configure(element); 34 } 35 36 public boolean isNewTx() { 37 return newTx; 38 } 39 40 public void setNewTx(final boolean newTx) { 41 this.newTx = newTx; 42 } 43 44 public List <OnErrorEl> getOnerrorElements() { 45 return onerrors; 46 } 47 48 public void setOnerrorElements(List <OnErrorEl> list) { 49 onerrors = list; 50 } 51 52 public void configure(final XmlElement element) { 53 super.configure(element); 54 newTx = element.getBooleanAttribute("new-tx", false); 55 onerrors = load(element.getChildren("onerror"), OnErrorEl.class); 57 } 58 59 public String toString() { 60 return "ScriptEl{" + super.toString() + ", newTx=" + newTx + "}"; 61 } 62 } 63 | Popular Tags |