KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_ws > deployment > xml > JonasWebserviceDescription


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

26 package org.objectweb.jonas_ws.deployment.xml;
27
28 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
29 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
30
31 /**
32  * This class defines the implementation of the element jonas-webservice-description
33  *
34  * @author JOnAS team
35  */

36
37 public class JonasWebserviceDescription extends AbsElement {
38
39     /**
40      * webservice-description-name
41      */

42     private String JavaDoc webserviceDescriptionName = null;
43
44     /**
45      * default-endpoint-uri
46      */

47     private String JavaDoc defaultEndpointURI = null;
48
49     /**
50      * wsdl-publish-directory
51      */

52     private String JavaDoc wsdlPublishDirectory = null;
53
54     /**
55      * jonas-port-component
56      */

57     private JLinkedList jonasPortComponentList = null;
58
59     /**
60      * Constructor
61      */

62     public JonasWebserviceDescription() {
63         super();
64         jonasPortComponentList = new JLinkedList("jonas-port-component");
65     }
66
67     /**
68      * @return Returns the jonasPortComponentList.
69      */

70     public JLinkedList getJonasPortComponentList() {
71         return jonasPortComponentList;
72     }
73
74     /**
75      * Add a new jonas-port-component element to this object
76      * @param jonasPortComponent the jonasPortComponent object
77      */

78     public void addJonasPortComponent(JonasPortComponent jonasPortComponent) {
79         jonasPortComponentList.add(jonasPortComponent);
80     }
81
82
83     /**
84      * @return Returns the defaultEndpointURI.
85      */

86     public String JavaDoc getDefaultEndpointURI() {
87         return defaultEndpointURI;
88     }
89
90     /**
91      * @param defaultEndpointURI The defaultEndpointURI to set.
92      */

93     public void setDefaultEndpointURI(String JavaDoc defaultEndpointURI) {
94         this.defaultEndpointURI = defaultEndpointURI;
95     }
96
97     /**
98      * @return Returns the webserviceDescriptionName.
99      */

100     public String JavaDoc getWebserviceDescriptionName() {
101         return webserviceDescriptionName;
102     }
103
104     /**
105      * @param webserviceDescriptionName The webserviceDescriptionName to set.
106      */

107     public void setWebserviceDescriptionName(String JavaDoc webserviceDescriptionName) {
108         this.webserviceDescriptionName = webserviceDescriptionName;
109     }
110
111     /**
112      * @return Returns the wsdlPublishDirectory.
113      */

114     public String JavaDoc getWsdlPublishDirectory() {
115         return wsdlPublishDirectory;
116     }
117
118     /**
119      * @param wsdlPublishDirectory The wsdlPublishDirectory to set.
120      */

121     public void setWsdlPublishDirectory(String JavaDoc wsdlPublishDirectory) {
122         this.wsdlPublishDirectory = wsdlPublishDirectory;
123     }
124
125     /**
126      * Represents this element by it's XML description.
127      * @param indent use this indent for prexifing XML representation.
128      * @return the XML description of this object.
129      */

130     public String JavaDoc toXML(int indent) {
131         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
132         sb.append(indent(indent));
133         sb.append("<jonas-webservice-description>\n");
134
135         indent += 2;
136         // webservice-description-name
137
sb.append(xmlElement(webserviceDescriptionName, "webservice-description-name", indent));
138         // default-endpoint-uri
139
sb.append(xmlElement(defaultEndpointURI, "default-endpoint-uri", indent));
140         // jonas-port-component
141
sb.append(jonasPortComponentList.toXML(indent));
142         // wsdl-publish-directory
143
sb.append(xmlElement(wsdlPublishDirectory, "wsdl-publish-directory", indent));
144         indent -= 2;
145
146         sb.append(indent(indent));
147         sb.append("</jonas-webservice-description>\n");
148
149         return sb.toString();
150     }
151 }
152
Popular Tags