KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_rar > deployment > xml > OutboundResourceadapter


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: Eric Hardesty
23  * --------------------------------------------------------------------------
24  * $Id: OutboundResourceadapter.java,v 1.1 2003/11/11 20:03:28 ehardesty Exp $
25  * --------------------------------------------------------------------------
26  */

27 package org.objectweb.jonas_rar.deployment.xml;
28
29 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
30 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
31 /**
32  * This class defines the implementation of the element outbound-resourceadapter
33  *
34  * @author Eric Hardesty
35  */

36
37 public class OutboundResourceadapter extends AbsElement {
38
39     /**
40      * connection-definition
41      */

42     private JLinkedList connectionDefinitionList = null;
43
44     /**
45      * transaction-support
46      */

47     private String JavaDoc transactionSupport = null;
48
49     /**
50      * authentication-mechanism
51      */

52     private JLinkedList authenticationMechanismList = null;
53
54     /**
55      * reauthentication-support
56      */

57     private String JavaDoc reauthenticationSupport = null;
58
59
60     /**
61      * Constructor
62      */

63     public OutboundResourceadapter() {
64         super();
65         connectionDefinitionList = new JLinkedList("connection-definition");
66         authenticationMechanismList = new JLinkedList("authentication-mechanism");
67     }
68
69     /**
70      * Gets the connection-definition
71      * @return the connection-definition
72      */

73     public JLinkedList getConnectionDefinitionList() {
74         return connectionDefinitionList;
75     }
76
77     /**
78      * Set the connection-definition
79      * @param connectionDefinitionList connectionDefinition
80      */

81     public void setConnectionDefinitionList(JLinkedList connectionDefinitionList) {
82         this.connectionDefinitionList = connectionDefinitionList;
83     }
84
85     /**
86      * Add a new connection-definition element to this object
87      * @param connectionDefinition the connectionDefinitionobject
88      */

89     public void addConnectionDefinition(ConnectionDefinition connectionDefinition) {
90         connectionDefinitionList.add(connectionDefinition);
91     }
92
93     /**
94      * Gets the transaction-support
95      * @return the transaction-support
96      */

97     public String JavaDoc getTransactionSupport() {
98         return transactionSupport;
99     }
100
101     /**
102      * Set the transaction-support
103      * @param transactionSupport transactionSupport
104      */

105     public void setTransactionSupport(String JavaDoc transactionSupport) {
106         this.transactionSupport = transactionSupport;
107     }
108
109     /**
110      * Gets the authentication-mechanism
111      * @return the authentication-mechanism
112      */

113     public JLinkedList getAuthenticationMechanismList() {
114         return authenticationMechanismList;
115     }
116
117     /**
118      * Set the authentication-mechanism
119      * @param authenticationMechanismList authenticationMechanism
120      */

121     public void setAuthenticationMechanismList(JLinkedList authenticationMechanismList) {
122         this.authenticationMechanismList = authenticationMechanismList;
123     }
124
125     /**
126      * Add a new authentication-mechanism element to this object
127      * @param authenticationMechanism the authenticationMechanismobject
128      */

129     public void addAuthenticationMechanism(AuthenticationMechanism authenticationMechanism) {
130         authenticationMechanismList.add(authenticationMechanism);
131     }
132
133     /**
134      * Gets the reauthentication-support
135      * @return the reauthentication-support
136      */

137     public String JavaDoc getReauthenticationSupport() {
138         return reauthenticationSupport;
139     }
140
141     /**
142      * Set the reauthentication-support
143      * @param reauthenticationSupport reauthenticationSupport
144      */

145     public void setReauthenticationSupport(String JavaDoc reauthenticationSupport) {
146         this.reauthenticationSupport = reauthenticationSupport;
147     }
148
149     /**
150      * Represents this element by it's XML description.
151      * @param indent use this indent for prefixing XML representation.
152      * @return the XML description of this object.
153      */

154     public String JavaDoc toXML(int indent) {
155         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
156         sb.append(indent(indent));
157         sb.append("<outbound-resourceadapter>\n");
158
159         indent += 2;
160
161         // connection-definition
162
sb.append(connectionDefinitionList.toXML(indent));
163         // transaction-support
164
sb.append(xmlElement(transactionSupport, "transaction-support", indent));
165         // authentication-mechanism
166
sb.append(authenticationMechanismList.toXML(indent));
167         // reauthentication-support
168
sb.append(xmlElement(reauthenticationSupport, "reauthentication-support", indent));
169         indent -= 2;
170         sb.append(indent(indent));
171         sb.append("</outbound-resourceadapter>\n");
172
173         return sb.toString();
174     }
175 }
176
Popular Tags