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: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or 1any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * Initial developer: Florent BENOIT
022: * --------------------------------------------------------------------------
023: * $Id: PortComponentRef.java 4718 2004-05-10 12:06:09Z sauthieg $
024: * --------------------------------------------------------------------------
025: */package org.objectweb.jonas_lib.deployment.xml;
026:
027: /**
028: * This class defines the implementation of the element port-component-ref.
029: * @author Florent Benoit
030: */
031: public class PortComponentRef extends AbsElement {
032:
033: /**
034: * service endpoint interface
035: */
036: private String serviceEndpointInterface = null;
037:
038: /**
039: * port component link
040: */
041: private String portComponentLink = null;
042:
043: // Setters
044:
045: /**
046: * Sets the service endpoint interface of the port-component-ref
047: * @param serviceEndpointInterface service endpoint interface of the port-component-ref
048: */
049: public void setServiceEndpointInterface(
050: String serviceEndpointInterface) {
051: this .serviceEndpointInterface = serviceEndpointInterface;
052: }
053:
054: /**
055: * Sets the port component link of the port-component-ref
056: * @param portComponentLink port component link of the port-component-ref
057: */
058: public void setPortComponentLink(String portComponentLink) {
059: this .portComponentLink = portComponentLink;
060: }
061:
062: // Getters
063:
064: /**
065: * @return the service endpoint interface of the port-component-ref
066: */
067: public String getServiceEndpointInterface() {
068: return serviceEndpointInterface;
069: }
070:
071: /**
072: * @return the port component link of the port-component-ref
073: */
074: public String getPortComponentLink() {
075: return portComponentLink;
076: }
077:
078: /**
079: * Represents this element by it's XML description.
080: * @param indent use this indent for prexifing XML representation.
081: * @return the XML description of this object.
082: */
083: public String toXML(int indent) {
084: StringBuffer sb = new StringBuffer();
085: sb.append(indent(indent));
086: sb.append("<port-component-ref>\n");
087:
088: indent += 2;
089:
090: // service-endpoint-interface
091: sb.append(xmlElement(serviceEndpointInterface,
092: "service-endpoint-interface", indent));
093:
094: // port-component-link
095: sb.append(xmlElement(portComponentLink, "port-component-link",
096: indent));
097:
098: indent -= 2;
099: sb.append(indent(indent));
100: sb.append("</port-component-ref>\n");
101:
102: return sb.toString();
103: }
104: }
|