1 27 28 package org.objectweb.jonas_ws.deployment.xml; 29 30 import org.objectweb.jonas_lib.deployment.xml.AbsDescriptionElement; 31 import org.objectweb.jonas_lib.deployment.xml.DescriptionGroupXml; 32 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 33 import org.objectweb.jonas_lib.deployment.xml.TopLevelElement; 34 35 40 41 public class Webservices extends AbsDescriptionElement 42 implements TopLevelElement, DescriptionGroupXml { 43 44 47 private JLinkedList webserviceDescriptionList = null; 48 49 50 53 public Webservices() { 54 super(); 55 webserviceDescriptionList = new JLinkedList("webservice-description"); 56 } 57 58 62 public JLinkedList getWebserviceDescriptionList() { 63 return webserviceDescriptionList; 64 } 65 66 70 public void setWebserviceDescriptionList(JLinkedList webserviceDescriptionList) { 71 this.webserviceDescriptionList = webserviceDescriptionList; 72 } 73 74 78 public void addWebserviceDescription(WebserviceDescription webserviceDescription) { 79 webserviceDescriptionList.add(webserviceDescription); 80 } 81 82 87 public String toXML(int indent) { 88 StringBuffer sb = new StringBuffer (); 89 sb.append(indent(indent)); 90 sb.append("<webservices>\n"); 91 indent += 2; 92 93 sb.append(xmlElement(getDescription(), "description", indent)); 95 sb.append(xmlElement(getDisplayName(), "display-name", indent)); 97 sb.append(getIcon().toXML(indent)); 99 sb.append(webserviceDescriptionList.toXML(indent)); 101 102 indent -= 2; 103 sb.append(indent(indent)); 104 sb.append("</webservices>\n"); 105 106 return sb.toString(); 107 } 108 } 109 | Popular Tags |