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.Handler; 33 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 34 import org.objectweb.jonas_lib.deployment.xml.Qname; 35 36 43 44 public class PortComponent extends AbsDescriptionElement implements DescriptionGroupXml { 45 46 49 private String portComponentName = null; 50 51 54 private Qname wsdlPort = null; 55 56 59 private String serviceEndpointInterface = null; 60 61 64 private ServiceImplBean serviceImplBean = null; 65 66 71 private JLinkedList handlerList = null; 72 73 74 77 public PortComponent() { 78 super(); 79 handlerList = new JLinkedList("handler"); 80 } 81 82 86 public String getPortComponentName() { 87 return portComponentName; 88 } 89 90 94 public void setPortComponentName(String portComponentName) { 95 this.portComponentName = portComponentName; 96 } 97 98 102 public Qname getWsdlPort() { 103 return wsdlPort; 104 } 105 106 110 public void setWsdlPort(Qname wsdlPort) { 111 this.wsdlPort = wsdlPort; 112 } 113 114 118 public String getServiceEndpointInterface() { 119 return serviceEndpointInterface; 120 } 121 122 126 public void setServiceEndpointInterface(String serviceEndpointInterface) { 127 this.serviceEndpointInterface = serviceEndpointInterface; 128 } 129 130 134 public ServiceImplBean getServiceImplBean() { 135 return serviceImplBean; 136 } 137 138 142 public void setServiceImplBean(ServiceImplBean serviceImplBean) { 143 this.serviceImplBean = serviceImplBean; 144 } 145 146 150 public JLinkedList getHandlerList() { 151 return handlerList; 152 } 153 154 158 public void setHandlerList(JLinkedList handlerList) { 159 this.handlerList = handlerList; 160 } 161 162 166 public void addHandler(Handler handler) { 167 handlerList.add(handler); 168 } 169 170 175 public String toXML(int indent) { 176 StringBuffer sb = new StringBuffer (); 177 sb.append(indent(indent)); 178 sb.append("<port-component>\n"); 179 180 indent += 2; 181 182 sb.append(xmlElement(getDescription(), "description", indent)); 184 sb.append(xmlElement(getDisplayName(), "display-name", indent)); 186 sb.append(getIcon().toXML(indent)); 188 sb.append(xmlElement(portComponentName, "port-component-name", indent)); 190 if (wsdlPort != null) { 192 sb.append(wsdlPort.toXML(indent)); 193 } 194 sb.append(xmlElement(serviceEndpointInterface, "service-endpoint-interface", indent)); 196 if (serviceImplBean != null) { 198 sb.append(serviceImplBean.toXML(indent)); 199 } 200 sb.append(handlerList.toXML(indent)); 202 indent -= 2; 203 sb.append(indent(indent)); 204 sb.append("</port-component>\n"); 205 206 return sb.toString(); 207 } 208 } 209 | Popular Tags |