1 26 27 package org.objectweb.jonas_lib.deployment.rules; 28 29 import org.apache.commons.digester.Digester; 30 31 35 public class JonasCustomParamRuleSet extends JRuleSetBase { 36 37 40 private String elementName; 41 42 45 private String classname; 46 47 53 public JonasCustomParamRuleSet(String prefix, String ename, String classname) { 54 super(prefix); 55 elementName = ename; 56 this.classname = classname; 57 } 58 59 63 public void addRuleInstances(Digester digester) { 64 digester.addObjectCreate(prefix + elementName, 65 "org.objectweb.jonas_lib.deployment.xml." + classname); 66 digester.addSetNext(prefix + elementName, 67 "add" + classname, 68 "org.objectweb.jonas_lib.deployment.xml." + classname); 69 digester.addCallMethod(prefix + elementName + "/param-name", 70 "setParamName", 0); 71 digester.addCallMethod(prefix + elementName + "/param-value", 72 "setParamValue", 0); 73 } 74 75 76 } 77 | Popular Tags |