Webservices.java

00001 
00028 package org.objectweb.jonas_ws.deployment.xml;
00029 
00030 import org.objectweb.jonas_lib.deployment.xml.AbsDescriptionElement;
00031 import org.objectweb.jonas_lib.deployment.xml.DescriptionGroupXml;
00032 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
00033 import org.objectweb.jonas_lib.deployment.xml.TopLevelElement;
00034 
00041 public class Webservices extends AbsDescriptionElement
00042     implements TopLevelElement, DescriptionGroupXml {
00043 
00047     private JLinkedList webserviceDescriptionList = null;
00048 
00049 
00053     public Webservices() {
00054         super();
00055         webserviceDescriptionList = new  JLinkedList("webservice-description");
00056     }
00057 
00062     public JLinkedList getWebserviceDescriptionList() {
00063         return webserviceDescriptionList;
00064     }
00065 
00070     public void setWebserviceDescriptionList(JLinkedList webserviceDescriptionList) {
00071         this.webserviceDescriptionList = webserviceDescriptionList;
00072     }
00073 
00078     public void addWebserviceDescription(WebserviceDescription webserviceDescription) {
00079         webserviceDescriptionList.add(webserviceDescription);
00080     }
00081 
00087     public String toXML(int indent) {
00088         StringBuffer sb = new StringBuffer();
00089         sb.append(indent(indent));
00090         sb.append("<webservices>\n");
00091         indent += 2;
00092 
00093         // description
00094         sb.append(xmlElement(getDescription(), "description", indent));
00095         // display-name
00096         sb.append(xmlElement(getDisplayName(), "display-name", indent));
00097         // icon
00098         sb.append(getIcon().toXML(indent));
00099         // webservice-description
00100         sb.append(webserviceDescriptionList.toXML(indent));
00101 
00102         indent -= 2;
00103         sb.append(indent(indent));
00104         sb.append("</webservices>\n");
00105 
00106         return sb.toString();
00107     }
00108 }

Generated on Tue Feb 15 15:06:00 2005 for JOnAS by  doxygen 1.3.9.1