KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_lib > deployment > xml > PortComponentRef


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or 1any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer: Florent BENOIT
22  * --------------------------------------------------------------------------
23  * $Id: PortComponentRef.java,v 1.2 2004/05/10 12:04:39 sauthieg Exp $
24  * --------------------------------------------------------------------------
25  */

26
27 package org.objectweb.jonas_lib.deployment.xml;
28
29
30 /**
31  * This class defines the implementation of the element port-component-ref.
32  * @author Florent Benoit
33  */

34 public class PortComponentRef extends AbsElement {
35
36     /**
37      * service endpoint interface
38      */

39     private String JavaDoc serviceEndpointInterface = null;
40
41     /**
42      * port component link
43      */

44     private String JavaDoc portComponentLink = null;
45
46
47     // Setters
48

49
50     /**
51      * Sets the service endpoint interface of the port-component-ref
52      * @param serviceEndpointInterface service endpoint interface of the port-component-ref
53      */

54     public void setServiceEndpointInterface(String JavaDoc serviceEndpointInterface) {
55         this.serviceEndpointInterface = serviceEndpointInterface;
56     }
57
58
59     /**
60      * Sets the port component link of the port-component-ref
61      * @param portComponentLink port component link of the port-component-ref
62      */

63     public void setPortComponentLink(String JavaDoc portComponentLink) {
64         this.portComponentLink = portComponentLink;
65     }
66
67
68     // Getters
69

70     /**
71      * @return the service endpoint interface of the port-component-ref
72      */

73     public String JavaDoc getServiceEndpointInterface() {
74         return serviceEndpointInterface;
75     }
76
77     /**
78      * @return the port component link of the port-component-ref
79      */

80     public String JavaDoc getPortComponentLink() {
81         return portComponentLink;
82     }
83
84
85     /**
86      * Represents this element by it's XML description.
87      * @param indent use this indent for prexifing XML representation.
88      * @return the XML description of this object.
89      */

90     public String JavaDoc toXML(int indent) {
91         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
92         sb.append(indent(indent));
93         sb.append("<port-component-ref>\n");
94
95         indent += 2;
96
97         // service-endpoint-interface
98
sb.append(xmlElement(serviceEndpointInterface, "service-endpoint-interface", indent));
99
100         // port-component-link
101
sb.append(xmlElement(portComponentLink, "port-component-link", indent));
102
103
104         indent -= 2;
105         sb.append(indent(indent));
106         sb.append("</port-component-ref>\n");
107
108         return sb.toString();
109     }
110 }
111
Popular Tags