KickJava   Java API By Example, From Geeks To Geeks.

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


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  *
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  * Initial developer: JOnAS team
23  * --------------------------------------------------------------------------
24  * $Id: ServiceImplBean.java,v 1.2 2004/05/06 08:53:55 sauthieg Exp $
25  * --------------------------------------------------------------------------
26  */

27
28 package org.objectweb.jonas_ws.deployment.xml;
29
30 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
31
32 /**
33  * This class defines the implementation of the element service-impl-bean
34  *
35  * @author JOnAS team
36  */

37
38 public class ServiceImplBean extends AbsElement {
39
40     /**
41      * ejb-link
42      */

43     private String JavaDoc ejbLink = null;
44
45     /**
46      * servlet-link
47      */

48     private String JavaDoc servletLink = null;
49
50
51     /**
52      * Constructor
53      */

54     public ServiceImplBean() {
55         super();
56     }
57
58     /**
59      * Gets the ejb-link
60      * @return the ejb-link
61      */

62     public String JavaDoc getEjbLink() {
63         return ejbLink;
64     }
65
66     /**
67      * Set the ejb-link
68      * @param ejbLink ejbLink
69      */

70     public void setEjbLink(String JavaDoc ejbLink) {
71         this.ejbLink = ejbLink;
72     }
73
74     /**
75      * Gets the servlet-link
76      * @return the servlet-link
77      */

78     public String JavaDoc getServletLink() {
79         return servletLink;
80     }
81
82     /**
83      * Set the servlet-link
84      * @param servletLink servletLink
85      */

86     public void setServletLink(String JavaDoc servletLink) {
87         this.servletLink = servletLink;
88     }
89
90     /**
91      * Represents this element by it's XML description.
92      * @param indent use this indent for prexifing XML representation.
93      * @return the XML description of this object.
94      */

95     public String JavaDoc toXML(int indent) {
96         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
97         sb.append(indent(indent));
98         sb.append("<service-impl-bean>\n");
99
100         indent += 2;
101
102         // ejb-link
103
sb.append(xmlElement(ejbLink, "ejb-link", indent));
104         // servlet-link
105
sb.append(xmlElement(servletLink, "servlet-link", indent));
106         indent -= 2;
107         sb.append(indent(indent));
108         sb.append("</service-impl-bean>\n");
109
110         return sb.toString();
111     }
112 }
113
Popular Tags