001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: *
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation; either
010: * version 2.1 of the License, or 1any later version.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this library; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
020: * USA
021: *
022: * Initial developer: JOnAS team
023: * --------------------------------------------------------------------------
024: * $Id: JonasPortComponent.java 5044 2004-07-01 14:54:13Z sauthieg $
025: * --------------------------------------------------------------------------
026: */package org.objectweb.jonas_ws.deployment.xml;
027:
028: import org.objectweb.jonas_lib.deployment.xml.AbsElement;
029:
030: /**
031: * This class defines the implementation of the element jonas-webservice-description
032: *
033: * @author JOnAS team
034: */
035:
036: public class JonasPortComponent extends AbsElement {
037:
038: /**
039: * port-component-name
040: */
041: private String portComponentName = null;
042:
043: /**
044: * endpoint-uri
045: */
046: private String endpointURI = null;
047:
048: /**
049: * Constructor
050: */
051: public JonasPortComponent() {
052: super ();
053: }
054:
055: /**
056: * @return Returns the endpointURI.
057: */
058: public String getEndpointURI() {
059: return endpointURI;
060: }
061:
062: /**
063: * @param endpointURI The endpointURI to set.
064: */
065: public void setEndpointURI(String endpointURI) {
066: this .endpointURI = endpointURI;
067: }
068:
069: /**
070: * @return Returns the portComponentName.
071: */
072: public String getPortComponentName() {
073: return portComponentName;
074: }
075:
076: /**
077: * @param portComponentName The portComponentName to set.
078: */
079: public void setPortComponentName(String portComponentName) {
080: this .portComponentName = portComponentName;
081: }
082:
083: /**
084: * Represents this element by it's XML description.
085: * @param indent use this indent for prexifing XML representation.
086: * @return the XML description of this object.
087: */
088: public String toXML(int indent) {
089: StringBuffer sb = new StringBuffer();
090: sb.append(indent(indent));
091: sb.append("<jonas-port-component>\n");
092:
093: indent += 2;
094: // port-component-name
095: sb.append(xmlElement(portComponentName, "port-component-name",
096: indent));
097: // endpoint-uri
098: sb.append(xmlElement(endpointURI, "endpoint-uri", indent));
099: indent -= 2;
100:
101: sb.append(indent(indent));
102: sb.append("</jonas-port-component>\n");
103:
104: return sb.toString();
105: }
106: }
|