001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: *
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation; either
010: * version 2.1 of the License, or 1any later version.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this library; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
020: * USA
021: *
022: * Initial developer: Eric Hardesty
023: * --------------------------------------------------------------------------
024: * $Id: OutboundResourceadapter.java 3673 2003-11-11 20:03:28Z ehardesty $
025: * --------------------------------------------------------------------------
026: */package org.objectweb.jonas_rar.deployment.xml;
027:
028: import org.objectweb.jonas_lib.deployment.xml.AbsElement;
029: import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
030:
031: /**
032: * This class defines the implementation of the element outbound-resourceadapter
033: *
034: * @author Eric Hardesty
035: */
036:
037: public class OutboundResourceadapter extends AbsElement {
038:
039: /**
040: * connection-definition
041: */
042: private JLinkedList connectionDefinitionList = null;
043:
044: /**
045: * transaction-support
046: */
047: private String transactionSupport = null;
048:
049: /**
050: * authentication-mechanism
051: */
052: private JLinkedList authenticationMechanismList = null;
053:
054: /**
055: * reauthentication-support
056: */
057: private String reauthenticationSupport = null;
058:
059: /**
060: * Constructor
061: */
062: public OutboundResourceadapter() {
063: super ();
064: connectionDefinitionList = new JLinkedList(
065: "connection-definition");
066: authenticationMechanismList = new JLinkedList(
067: "authentication-mechanism");
068: }
069:
070: /**
071: * Gets the connection-definition
072: * @return the connection-definition
073: */
074: public JLinkedList getConnectionDefinitionList() {
075: return connectionDefinitionList;
076: }
077:
078: /**
079: * Set the connection-definition
080: * @param connectionDefinitionList connectionDefinition
081: */
082: public void setConnectionDefinitionList(
083: JLinkedList connectionDefinitionList) {
084: this .connectionDefinitionList = connectionDefinitionList;
085: }
086:
087: /**
088: * Add a new connection-definition element to this object
089: * @param connectionDefinition the connectionDefinitionobject
090: */
091: public void addConnectionDefinition(
092: ConnectionDefinition connectionDefinition) {
093: connectionDefinitionList.add(connectionDefinition);
094: }
095:
096: /**
097: * Gets the transaction-support
098: * @return the transaction-support
099: */
100: public String getTransactionSupport() {
101: return transactionSupport;
102: }
103:
104: /**
105: * Set the transaction-support
106: * @param transactionSupport transactionSupport
107: */
108: public void setTransactionSupport(String transactionSupport) {
109: this .transactionSupport = transactionSupport;
110: }
111:
112: /**
113: * Gets the authentication-mechanism
114: * @return the authentication-mechanism
115: */
116: public JLinkedList getAuthenticationMechanismList() {
117: return authenticationMechanismList;
118: }
119:
120: /**
121: * Set the authentication-mechanism
122: * @param authenticationMechanismList authenticationMechanism
123: */
124: public void setAuthenticationMechanismList(
125: JLinkedList authenticationMechanismList) {
126: this .authenticationMechanismList = authenticationMechanismList;
127: }
128:
129: /**
130: * Add a new authentication-mechanism element to this object
131: * @param authenticationMechanism the authenticationMechanismobject
132: */
133: public void addAuthenticationMechanism(
134: AuthenticationMechanism authenticationMechanism) {
135: authenticationMechanismList.add(authenticationMechanism);
136: }
137:
138: /**
139: * Gets the reauthentication-support
140: * @return the reauthentication-support
141: */
142: public String getReauthenticationSupport() {
143: return reauthenticationSupport;
144: }
145:
146: /**
147: * Set the reauthentication-support
148: * @param reauthenticationSupport reauthenticationSupport
149: */
150: public void setReauthenticationSupport(
151: String reauthenticationSupport) {
152: this .reauthenticationSupport = reauthenticationSupport;
153: }
154:
155: /**
156: * Represents this element by it's XML description.
157: * @param indent use this indent for prefixing XML representation.
158: * @return the XML description of this object.
159: */
160: public String toXML(int indent) {
161: StringBuffer sb = new StringBuffer();
162: sb.append(indent(indent));
163: sb.append("<outbound-resourceadapter>\n");
164:
165: indent += 2;
166:
167: // connection-definition
168: sb.append(connectionDefinitionList.toXML(indent));
169: // transaction-support
170: sb.append(xmlElement(transactionSupport, "transaction-support",
171: indent));
172: // authentication-mechanism
173: sb.append(authenticationMechanismList.toXML(indent));
174: // reauthentication-support
175: sb.append(xmlElement(reauthenticationSupport,
176: "reauthentication-support", indent));
177: indent -= 2;
178: sb.append(indent(indent));
179: sb.append("</outbound-resourceadapter>\n");
180:
181: return sb.toString();
182: }
183: }
|