1 25 26 package org.objectweb.jonas_lib.deployment.xml; 27 28 32 public class JonasServiceRef extends AbsElement { 33 34 37 private String serviceRefName = null; 38 39 42 private String altWsdl = null; 43 44 47 private JLinkedList jonasInitParamList = null; 48 49 52 private JLinkedList jonasPortComponentRefList = null; 53 54 57 public JonasServiceRef() { 58 jonasInitParamList = new JLinkedList("jonas-init-param"); 59 jonasPortComponentRefList = new JLinkedList("jonas-port-component-ref"); 60 } 61 62 63 64 66 70 public void setServiceRefName(String serviceRefName) { 71 this.serviceRefName = serviceRefName; 72 } 73 74 75 79 public void addJonasInitParam(JonasInitParam jonasInitParam) { 80 jonasInitParamList.add(jonasInitParam); 81 } 82 83 87 public void addJonasPortComponentRef(JonasPortComponentRef jonasPortComponentRef) { 88 jonasPortComponentRefList.add(jonasPortComponentRef); 89 } 90 91 94 public void setAltWsdl(String altWsdl) { 95 this.altWsdl = altWsdl; 96 } 97 98 100 103 public String getServiceRefName() { 104 return serviceRefName; 105 } 106 107 108 111 public JLinkedList getJonasInitParamList() { 112 return jonasInitParamList; 113 } 114 115 118 public JLinkedList getJonasPortComponentRefList() { 119 return jonasPortComponentRefList; 120 } 121 122 125 public String getAltWsdl() { 126 return altWsdl; 127 } 128 129 134 public String toXML(int indent) { 135 StringBuffer sb = new StringBuffer (); 136 sb.append(indent(indent)); 137 sb.append("<jonas-service-ref>\n"); 138 139 indent += 2; 140 141 sb.append(xmlElement(serviceRefName, "service-ref-name", indent)); 143 144 sb.append(jonasPortComponentRefList.toXML(indent)); 146 147 sb.append(xmlElement(altWsdl, "alt-wsdl", indent)); 149 150 sb.append(jonasInitParamList.toXML(indent)); 152 153 indent -= 2; 154 sb.append(indent(indent)); 155 sb.append("</jonas-service-ref>\n"); 156 return sb.toString(); 157 } 158 159 160 } 161 | Popular Tags |