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: JonasConnectorDesc.java 9708 2006-10-10 06:12:37Z ehardesty $
025: * --------------------------------------------------------------------------
026: */package org.objectweb.jonas_rar.deployment.api;
027:
028: import java.io.Serializable;
029: import java.util.List;
030:
031: import org.objectweb.jonas_rar.deployment.xml.JonasConnector;
032:
033: /**
034: * This class defines the implementation of the element jonas-resource
035: *
036: * @author Eric Hardesty
037: */
038:
039: public class JonasConnectorDesc implements Serializable {
040:
041: private boolean isSetup = false;
042:
043: /**
044: * jndi-name
045: */
046: private String jndiName = null;
047:
048: /**
049: * rarlink
050: */
051: private String rarlink = null;
052:
053: /**
054: * native-lib
055: */
056: private String nativeLib = null;
057:
058: /**
059: * log-enabled
060: */
061: private String logEnabled = null;
062:
063: /**
064: * log-topic
065: */
066: private String logTopic = null;
067:
068: /**
069: * pool-params
070: */
071: private PoolParamsDesc poolParamsDesc = null;
072:
073: /**
074: * jdbc-conn-params
075: */
076: private JdbcConnParamsDesc jdbcConnParamsDesc = null;
077:
078: /**
079: * tm-params
080: */
081: private TmParamsDesc tmParamsDesc = null;
082:
083: /**
084: * jonas-config-property
085: */
086: private List jonasConfigPropertyList = null;
087:
088: /**
089: * jonas-connection-definition
090: */
091: private List jonasConnectionDefinitionList = null;
092:
093: /**
094: * jonas-activationspec
095: */
096: private List jonasActivationspecList = null;
097:
098: /**
099: * jonas-adminobject
100: */
101: private List jonasAdminobjectList = null;
102:
103: /**
104: * jonas-security-mapping
105: */
106: private JonasSecurityMappingDesc jonasSecurityMappingDesc = null;
107:
108: /**
109: * Constructor
110: */
111: public JonasConnectorDesc(JonasConnector jc) {
112: if (jc != null) {
113: jndiName = jc.getJndiName();
114: rarlink = jc.getRarlink();
115: nativeLib = jc.getNativeLib();
116: logEnabled = jc.getLogEnabled();
117: logTopic = jc.getLogTopic();
118: poolParamsDesc = new PoolParamsDesc(jc.getPoolParams());
119: jdbcConnParamsDesc = new JdbcConnParamsDesc(jc
120: .getJdbcConnParams());
121: tmParamsDesc = new TmParamsDesc(jc.getTmParams());
122:
123: jonasConfigPropertyList = Utility.jonasConfigProperty(jc
124: .getJonasConfigPropertyList());
125: jonasConnectionDefinitionList = Utility
126: .jonasConnectionDefinition(jc
127: .getJonasConnectionDefinitionList());
128: jonasActivationspecList = Utility.jonasActivationspec(jc
129: .getJonasActivationspecList());
130: jonasAdminobjectList = Utility.jonasAdminobject(jc
131: .getJonasAdminobjectList());
132: jonasSecurityMappingDesc = new JonasSecurityMappingDesc(jc
133: .getJonasSecurityMapping());
134: isSetup = true;
135: }
136: }
137:
138: /**
139: * Gets the jndiname
140: * @return the jndiname
141: */
142: public String getJndiName() {
143: return jndiName;
144: }
145:
146: /**
147: * Gets the rarlink
148: * @return the rarlink
149: */
150: public String getRarlink() {
151: return rarlink;
152: }
153:
154: /**
155: * Gets the native-lib
156: * @return the native-lib
157: */
158: public String getNativeLib() {
159: return nativeLib;
160: }
161:
162: /**
163: * Gets the log-enabled
164: * @return the log-enabled
165: */
166: public String getLogEnabled() {
167: return logEnabled;
168: }
169:
170: /**
171: * Gets the log-topic
172: * @return the log-topic
173: */
174: public String getLogTopic() {
175: return logTopic;
176: }
177:
178: /**
179: * Gets the pool-params
180: * @return the pool-params
181: */
182: public PoolParamsDesc getPoolParamsDesc() {
183: return poolParamsDesc;
184: }
185:
186: /**
187: * Gets the jdbc-conn-params
188: * @return the jdbc-conn-params
189: */
190: public JdbcConnParamsDesc getJdbcConnParamsDesc() {
191: return jdbcConnParamsDesc;
192: }
193:
194: /**
195: * Gets the jonas-config-property
196: * @return the jonas-config-property
197: */
198: public List getJonasConfigPropertyList() {
199: return jonasConfigPropertyList;
200: }
201:
202: /**
203: * Gets the jonas-connection-definition
204: * @return the jonas-connection-definition
205: */
206: public List getJonasConnectionDefinitionList() {
207: return jonasConnectionDefinitionList;
208: }
209:
210: /**
211: * Gets the jonas-activationspec
212: * @return the jonas-activationspec
213: */
214: public List getJonasActivationspecList() {
215: return jonasActivationspecList;
216: }
217:
218: /**
219: * Gets the jonas-adminobject
220: * @return the jonas-adminobject
221: */
222: public List getJonasAdminobjectList() {
223: return jonasAdminobjectList;
224: }
225:
226: /**
227: * Gets the jonas-security-mapping
228: * @return the jonasSecurityMapping
229: */
230: public JonasSecurityMappingDesc getJonasSecurityMappingDesc() {
231: return jonasSecurityMappingDesc;
232: }
233:
234: /**
235: * Gets the tm-params
236: * @return the tm-params
237: */
238: public TmParamsDesc getTmParamsDesc() {
239: return tmParamsDesc;
240: }
241:
242: public boolean isSetup() {
243: return isSetup;
244: }
245: }
|