1 24 25 package org.objectweb.jonas_ws.wsgen.ddmodifier; 26 27 import org.w3c.dom.Document ; 28 import org.w3c.dom.Element ; 29 30 import org.objectweb.jonas_lib.genbase.utils.XMLUtils; 31 32 33 38 public class WsClientDDModifier extends DeploymentDescModifier { 39 40 43 private static final String JONAS_INIT_PARAM = "jonas-init-param"; 44 45 48 private static final String PARAM_NAME = "param-name"; 49 50 53 private static final String PARAM_VALUE = "param-value"; 54 55 62 public WsClientDDModifier(String name, Document doc, Element base) { 63 super(XMLUtils.getJonasServiceRef(base, name), doc, base); 64 } 65 66 71 public void addJonasInitParam(String name, String value) { 72 Element jip = newJOnASElement(JONAS_INIT_PARAM); 73 Element pn = newJOnASElement(PARAM_NAME, name); 74 Element pv = newJOnASElement(PARAM_VALUE, value); 75 76 jip.appendChild(pn); 77 jip.appendChild(pv); 78 79 getElement().appendChild(jip); 80 } 81 82 86 public boolean hasJonasServiceRef() { 87 return (getElement() != null); 88 } 89 90 94 public Element createJonasServiceRef(String serviceRefName) { 95 Element jsr = newJOnASElement("jonas-service-ref"); 96 Element srn = newJ2EEElement("service-ref-name", serviceRefName); 97 98 jsr.appendChild(srn); 99 return jsr; 100 } 101 102 } | Popular Tags |