1 27 28 package org.objectweb.jonas_ws.deployment.xml; 29 30 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 31 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 32 import org.objectweb.jonas_lib.deployment.xml.TopLevelElement; 33 34 39 40 public class JonasWebservices extends AbsElement implements TopLevelElement { 41 42 45 private String header = null; 46 47 50 private String war = null; 51 52 55 private String contextRoot = null; 56 57 60 private JLinkedList jwsDescList = null; 61 62 65 public JonasWebservices() { 66 super(); 67 jwsDescList = new JLinkedList("jonas-webservice-description"); 68 } 69 70 74 public String getWar() { 75 return war; 76 } 77 78 82 public void setWar(String war) { 83 this.war = war; 84 } 85 86 89 public String getContextRoot() { 90 return contextRoot; 91 } 92 93 96 public void setContextRoot(String contextRoot) { 97 this.contextRoot = contextRoot; 98 } 99 100 104 public JLinkedList getJonasWebserviceDescriptionList() { 105 return jwsDescList; 106 } 107 108 109 113 public void addJonasWebserviceDescription(JonasWebserviceDescription jwsd) { 114 jwsDescList.add(jwsd); 115 } 116 117 122 public String toXML(int indent) { 123 StringBuffer sb = new StringBuffer (); 124 sb.append(indent(indent)); 125 sb.append("<jonas-webservices>\n"); 126 127 indent += 2; 128 129 sb.append(xmlElement(war, "war", indent)); 131 sb.append(xmlElement(contextRoot, "context-root", indent)); 133 sb.append(jwsDescList.toXML(indent)); 135 136 indent -= 2; 137 sb.append(indent(indent)); 138 sb.append("</jonas-webservices>\n"); 139 140 return sb.toString(); 141 } 142 145 public String getHeader() { 146 return header; 147 } 148 149 152 public void setHeader(String header) { 153 this.header = header; 154 } 155 156 } 157 | Popular Tags |