ServiceRef.java

00001 
00027 package org.objectweb.jonas_lib.deployment.xml;
00028 
00033 public class ServiceRef extends AbsElement {
00034 
00038     private String serviceRefName = null;
00039 
00040 
00044     private String serviceInterface = null;
00045 
00049     private String jaxrpcMappingFile = null;
00050 
00054     private String wsdlFile = null;
00055 
00056 
00060     private Qname serviceQname = null;
00061 
00065     private JLinkedList portComponentRefList = null;
00066 
00067 
00071     private JLinkedList handlerList = null;
00072 
00073 
00077     public ServiceRef() {
00078         super();
00079         portComponentRefList = new JLinkedList("port-component-ref");
00080         handlerList = new JLinkedList("handler");
00081     }
00082 
00083 
00084     // Setters
00085 
00090     public void addPortComponentRef(PortComponentRef portComponentRef) {
00091         portComponentRefList.add(portComponentRef);
00092     }
00093 
00098     public void addHandler(Handler handler) {
00099         handlerList.add(handler);
00100     }
00101 
00106     public void setServiceRefName(String serviceRefName) {
00107         this.serviceRefName = serviceRefName;
00108     }
00109 
00110 
00115     public void setServiceInterface(String serviceInterface) {
00116         this.serviceInterface = serviceInterface;
00117     }
00118 
00119 
00124     public void setJaxrpcMappingFile(String jaxrpcMappingFile) {
00125         this.jaxrpcMappingFile = jaxrpcMappingFile;
00126     }
00127 
00128 
00133     public void setWsdlFile(String wsdlFile) {
00134         this.wsdlFile = wsdlFile;
00135     }
00136 
00137 
00142     public void setServiceQname(Qname serviceQname) {
00143         this.serviceQname = serviceQname;
00144     }
00145 
00146     // Getters
00147 
00151     public String getServiceRefName() {
00152         return serviceRefName;
00153     }
00154 
00158     public String getServiceInterface() {
00159         return serviceInterface;
00160     }
00161 
00165     public String getJaxrpcMappingFile() {
00166         return jaxrpcMappingFile;
00167     }
00168 
00172     public String getWsdlFile() {
00173         return wsdlFile;
00174     }
00175 
00176 
00180     public Qname getServiceQname() {
00181         return serviceQname;
00182     }
00183 
00187     public JLinkedList getHandlerList() {
00188         return handlerList;
00189     }
00190 
00194     public JLinkedList getPortComponentRefList() {
00195         return portComponentRefList;
00196     }
00197 
00203     public String toXML(int indent) {
00204         StringBuffer sb = new StringBuffer();
00205         sb.append(indent(indent));
00206         sb.append("<service-ref>\n");
00207 
00208         indent += 2;
00209 
00210         // service-ref-name
00211         sb.append(xmlElement(serviceRefName, "service-ref-name", indent));
00212 
00213         // service-interface
00214         sb.append(xmlElement(serviceInterface, "service-interface", indent));
00215 
00216         // wsdl-file
00217         sb.append(xmlElement(wsdlFile, "wsdl-file", indent));
00218 
00219         // jaxrpc-mapping-file
00220         sb.append(xmlElement(jaxrpcMappingFile, "jaxrpc-mapping-file", indent));
00221 
00222         //service-qname
00223         if (serviceQname != null) {
00224             sb.append(serviceQname.toXML(indent));
00225         }
00226 
00227         // port-component-ref
00228         sb.append(portComponentRefList.toXML(indent));
00229 
00230         // handler
00231         sb.append(handlerList.toXML(indent));
00232 
00233         indent -= 2;
00234         sb.append(indent(indent));
00235         sb.append("</service-ref>\n");
00236 
00237         return sb.toString();
00238     }
00239 
00240 
00241 }

Generated on Tue Feb 15 15:05:51 2005 for JOnAS by  doxygen 1.3.9.1