KickJava   Java API By Example, From Geeks To Geeks.

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


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: EjbRefDesc.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 EjbRef object
32  * @author Christophe Ney
33  * @author Florent Benoit
34  */

35 public class EjbRefDesc {
36
37     /**
38      * The ejb 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 ejb link of the ejb local ref.
49      */

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

55     private String JavaDoc jndiName = null;
56
57
58     /**
59      * Construct a descriptor for an ejb-ref tag.
60      * @param ejbRef the ejb ref resulting of the xml parsing.
61      * @param jonasEjbRef the jonas ejb ref resulting of the xml parsing.
62      * @throws DeploymentDescException when missing information for
63      * creating the EjbRefDesc.
64      */

65 // public EjbRefDesc(EjbRef ejbRef, JonasEjbRef jonasEjbRef) throws DeploymentDescException {
66
// ejbRefName = ejbRef.getEjbRefName();
67
// ejbRefType = ejbRef.getEjbRefType();
68
// ejbLink = (ejbRef.getEjbLink() != null) ? ejbRef.getEjbLink() : null;
69
// jndiName = (jonasEjbRef != null) ? jonasEjbRef.getJndiName() : null;
70
// }
71

72     /**
73      * Get the name of the ejb-ref
74      * @return String representation of the ejb-ref-name.
75      */

76     public String JavaDoc getEjbRefName() {
77         return ejbRefName;
78     }
79
80     /**
81      * Get the ejb-ref-type.
82      * @return String representation of the ejb-ref-type.
83      */

84     public String JavaDoc getEjbRefType() {
85         return ejbRefType;
86     }
87
88     /**
89      * Get the ejb-link
90      * @return String representation of the ejb-link
91      */

92     public String JavaDoc getEjbLink() {
93         return ejbLink;
94     }
95
96
97     /**
98      * Get the jndi name of the ejb-ref.
99      * @return String representation of the JNDI name
100      */

101     public String JavaDoc getJndiName() {
102         return jndiName;
103     }
104
105     /**
106      * Set the jndi name of the ejb-ref.
107      * @param jndiName representation of the JNDI name
108      */

109     public void setJndiName(String JavaDoc jndiName) {
110         this.jndiName = jndiName;
111     }
112
113
114     /**
115      * String representation of the object for test purpose
116      * @return String representation of this object
117      */

118     public String JavaDoc toString() {
119         StringBuffer JavaDoc ret = new StringBuffer JavaDoc();
120         ret.append("\ngetEjbRefName()=" + getEjbRefName());
121         ret.append("\ngetEjbRefType()=" + getEjbRefType());
122         ret.append("\ngetEjbLink()=" + getEjbLink());
123         ret.append("\ngetJndiName()=" + getJndiName());
124         return ret.toString();
125     }
126
127 }
128
Popular Tags