KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > bull > eclipse > jonas > utils > xml > EjbLocalRefDesc


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: Christophe Ney
22  * --------------------------------------------------------------------------
23  * $Id: EjbLocalRefDesc.java,v 1.1 2003/10/27 14:46:32 benoitf Exp $
24  * --------------------------------------------------------------------------
25  */

26
27 package com.bull.eclipse.jonas.utils.xml;
28
29
30 /**
31  * This class represents the description of an EjblocalRef object
32  * @author Christophe Ney
33  * @author Florent Benoit
34  */

35 public class EjbLocalRefDesc {
36
37     /**
38      * The ejb local ref name.
39      */

40     private String JavaDoc ejbRefName = null;
41
42     /**
43      * The type of the ejb ref
44      */

45     private String JavaDoc ejbRefType = null;
46
47     /**
48      * The local home of the ejb local ref.
49      */

50     private String JavaDoc localHome = null;
51
52     /**
53      * The local interface name of the ejb local ref.
54      */

55     private String JavaDoc local = null;
56
57     /**
58      * The ejb link of the ejb local ref.
59      */

60     private String JavaDoc ejbLink = null;
61
62     /**
63      * The jndi name of the ejb local ref.
64      */

65     private String JavaDoc jndiName = null;
66
67
68     /**
69      * Construct a descriptor for an ejb-local-ref tag.
70      * @param ejbLocalRef the ejb local ref resulting of the xml parsing.
71      * @throws DeploymentDescException when missing information for
72      * creating the EjbLocalRefDesc.
73      */

74 // public EjbLocalRefDesc(EjbLocalRef ejbLocalRef) throws DeploymentDescException {
75
// ejbRefName = ejbLocalRef.getEjbRefName();
76
// ejbRefType = ejbLocalRef.getEjbRefType();
77
// localHome = ejbLocalRef.getLocalHome();
78
// local = ejbLocalRef.getLocal();
79
// if (ejbLocalRef.getEjbLink() == null) {
80
// String err = "ejb-link missing for ejb-local-ref '" + ejbRefName + "'.";
81
// throw new DeploymentDescException(err);
82
// }
83
// ejbLink = ejbLocalRef.getEjbLink();
84
// }
85

86     /**
87      * Get the name of the ejb-ref
88      * @return String representation of the ejb-ref-name.
89      */

90     public String JavaDoc getEjbRefName() {
91         return ejbRefName;
92     }
93
94     /**
95      * Get the ejb-ref-type.
96      * @return String representation of the ejb-ref-type.
97      */

98     public String JavaDoc getEjbRefType() {
99         return ejbRefType;
100     }
101
102     /**
103      * Get the LocalHome class of the target bean
104      * @return String representation of the class.
105      */

106     public String JavaDoc getLocalHome() {
107         return localHome;
108     }
109
110     /**
111      * Get the Local class of the target bean
112      * @return String representation of the class.
113      */

114     public String JavaDoc getLocal() {
115         return local;
116     }
117
118     /**
119      * Get the ejb-link
120      * @return String representation of the ejb-link
121      */

122     public String JavaDoc getEjbLink() {
123         return ejbLink;
124     }
125
126     /**
127      * Get the jndi name of the ejb-local-ref.
128      * @return the string representation of the JNDI name
129      */

130     public String JavaDoc getJndiLocalName() {
131         return jndiName;
132     }
133
134     /**
135      * Set the jndi name of the ejb-local-ref.
136      * @param jndiName the string representation of the jndi name.
137      */

138     public void setJndiLocalName(String JavaDoc jndiName) {
139         this.jndiName = jndiName;
140     }
141
142     /**
143      * String representation of the object for test purpose
144      * @return String representation of this object
145      */

146     public String JavaDoc toString() {
147         StringBuffer JavaDoc ret = new StringBuffer JavaDoc();
148         ret.append("\ngetEjbRefName()=" + getEjbRefName());
149         ret.append("\ngetEjbRefType()=" + getEjbRefType());
150         ret.append("\ngetLocalHome()=" + getLocalHome());
151         ret.append("\ngetLocal()=" + getLocal());
152         ret.append("\ngetEjbLink()=" + getEjbLink());
153         ret.append("\ngetJndiLocalName()=" + getJndiLocalName());
154         return ret.toString();
155     }
156
157 }
158
Popular Tags