Source Code Cross Referenced for RarDeploymentDesc.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas_rar » deployment » api » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » JOnAS 4.8.6 » org.objectweb.jonas_rar.deployment.api 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2.1 of the License, or any later version.
010:         *
011:         * This library is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
019:         * USA
020:         *
021:         * Initial developer(s): Eric HARDESTY
022:         * --------------------------------------------------------------------------
023:         * $Id: RarDeploymentDesc.java 5459 2004-09-17 22:33:33Z ehardesty $
024:         * --------------------------------------------------------------------------
025:         */package org.objectweb.jonas_rar.deployment.api;
026:
027:        import java.util.Iterator;
028:        import java.util.List;
029:        import java.util.Vector;
030:
031:        import org.objectweb.jonas_lib.deployment.api.AbsDeploymentDesc;
032:
033:        import org.objectweb.jonas_rar.deployment.api.ConnectorDesc;
034:        import org.objectweb.jonas_rar.deployment.api.JonasConnectorDesc;
035:        import org.objectweb.jonas_rar.deployment.api.ConfigPropertyDesc;
036:        import org.objectweb.jonas_rar.deployment.api.JonasConfigPropertyDesc;
037:        import org.objectweb.jonas_rar.deployment.api.ResourceadapterDesc;
038:        import org.objectweb.jonas_rar.deployment.xml.ConfigProperty;
039:        import org.objectweb.jonas_rar.deployment.xml.Connector;
040:        import org.objectweb.jonas_rar.deployment.xml.JonasConfigProperty;
041:        import org.objectweb.jonas_rar.deployment.xml.JonasConnector;
042:
043:        /**
044:         * This class extends the AbsDeploymentDescriptor class of JOnAS
045:         * It provides a description of the specific RAR desployment descriptor
046:         *
047:         * @author Eric Hardesty
048:         */
049:        public class RarDeploymentDesc extends AbsDeploymentDesc {
050:
051:            /**
052:             * Vector of raConfigPropTags (config-property objects).
053:             */
054:            private Vector raConfigPropTags = null;
055:
056:            /**
057:             * Vector of jonasConfigPropTags (config-property objects).
058:             */
059:            private Vector jonasConfigPropTags = null;
060:
061:            /**
062:             * Connector
063:             */
064:            private Connector connector = null;
065:
066:            /**
067:             * Connector
068:             */
069:            private ConnectorDesc connectorDesc = null;
070:
071:            /**
072:             * Jonas Connector
073:             */
074:            private JonasConnectorDesc jonasConnectorDesc = null;
075:
076:            /**
077:             * Xml content of the ra.xml file
078:             */
079:            private String xmlContent = "";
080:
081:            /**
082:             * Xml content of the jonas-ra.xml file
083:             */
084:            private String jonasXmlContent = "";
085:
086:            /**
087:             * Construct an instance of a RarDeploymentDesc.
088:             * Called by the RarDeploymentDescManager.getInstance() method.
089:             *
090:             * @param classLoader ClassLoader of the classes .
091:             * @param connector ra.xml parsed file.
092:             * @param jonasConnector jonas-ra.xml parsed file.
093:             *
094:             * @throws RarDeploymentDescException if we can't build an instance.
095:             */
096:            public RarDeploymentDesc(ClassLoader classLoader,
097:                    Connector connector, JonasConnector jonasConnector)
098:                    throws RarDeploymentDescException {
099:
100:                // test classloader
101:                if (classLoader == null) {
102:                    throw new RarDeploymentDescException(
103:                            "DeploymentDesc: Classloader is null");
104:                }
105:
106:                this .connector = connector;
107:                this .connectorDesc = new ConnectorDesc(connector);
108:                this .jonasConnectorDesc = new JonasConnectorDesc(jonasConnector);
109:
110:                if (connectorDesc != null) {
111:                    // display name
112:                    displayName = null;
113:                    if (connectorDesc.getDisplayName() != null) {
114:                        displayName = connectorDesc.getDisplayName();
115:                    }
116:
117:                    raConfigPropTags = new Vector();
118:                    //Tags
119:                    ResourceadapterDesc rd = connectorDesc
120:                            .getResourceadapterDesc();
121:                    if (rd != null) {
122:                        for (Iterator i = rd.getConfigPropertyList().iterator(); i
123:                                .hasNext();) {
124:                            raConfigPropTags.add((ConfigPropertyDesc) i.next());
125:                        }
126:                    }
127:                }
128:
129:                if (jonasConnectorDesc != null
130:                        && jonasConnectorDesc.getJonasConfigPropertyList() != null) {
131:                    jonasConfigPropTags = new Vector();
132:                    //Tags
133:                    for (Iterator i = jonasConnectorDesc
134:                            .getJonasConfigPropertyList().iterator(); i
135:                            .hasNext();) {
136:                        jonasConfigPropTags.add((JonasConfigPropertyDesc) i
137:                                .next());
138:                    }
139:                }
140:
141:            }
142:
143:            /**
144:             * Set the config-property tags of the ra.xml file.
145:             * @param conn the Connector objeect with the config-property tags of the ra.xml file.
146:             */
147:            public void setRaConfigPropTags(Connector conn) {
148:                //Tags
149:                for (Iterator i = conn.getResourceadapter()
150:                        .getConfigPropertyList().iterator(); i.hasNext();) {
151:                    if (raConfigPropTags == null) {
152:                        raConfigPropTags = new Vector();
153:                    }
154:                    raConfigPropTags.add(new ConfigPropertyDesc(
155:                            (ConfigProperty) i.next()));
156:                }
157:                if (raConfigPropTags == null) {
158:                    return;
159:                }
160:                ConfigPropertyDesc[] tmp = new ConfigPropertyDesc[raConfigPropTags
161:                        .size()];
162:                raConfigPropTags.copyInto(tmp);
163:            }
164:
165:            /**
166:             * Get the config-property tags of the ra.xml file.
167:             * @return the config-property tags of the ra.xml file.
168:             */
169:            public ConfigPropertyDesc[] getRaConfigPropTags() {
170:                if (raConfigPropTags == null) {
171:                    return null;
172:                }
173:                ConfigPropertyDesc[] tmp = new ConfigPropertyDesc[raConfigPropTags
174:                        .size()];
175:                raConfigPropTags.copyInto(tmp);
176:                return tmp;
177:            }
178:
179:            /**
180:             * Get the config-property tags of the jonas-ra.xml file.
181:             * @return the config-property tags of the jonas-ra.xml file.
182:             */
183:            public JonasConfigPropertyDesc[] getJonasConfigPropTags() {
184:                if (jonasConfigPropTags == null) {
185:                    return null;
186:                }
187:                if (jonasConfigPropTags != null) {
188:                    JonasConfigPropertyDesc[] tmp = new JonasConfigPropertyDesc[jonasConfigPropTags
189:                            .size()];
190:                    jonasConfigPropTags.copyInto(tmp);
191:                    return tmp;
192:                }
193:                return null;
194:            }
195:
196:            /**
197:             * Return a String representation of the RarDeploymentDesc.
198:             * @return a String representation of the RarDeploymentDesc.
199:             */
200:            public String toString() {
201:                String ret = "Connector :";
202:
203:                return ret;
204:            }
205:
206:            /**
207:             * Get the current Connector
208:             * @return the current Connector.
209:             */
210:            public Connector getConnector() {
211:                return connector;
212:            }
213:
214:            /**
215:             * Get the current ConnectorDesc.
216:             * @return the current ConnectorDesc.
217:             */
218:            public ConnectorDesc getConnectorDesc() {
219:                return connectorDesc;
220:            }
221:
222:            /**
223:             * Get the current JonasConnectorDesc.
224:             * @return the current JonasConnectorDesc.
225:             */
226:            public JonasConnectorDesc getJonasConnectorDesc() {
227:                return jonasConnectorDesc;
228:            }
229:
230:            /**
231:             * Return the content of the ra.xml file
232:             * @return the content of the ra.xml file
233:             */
234:            public String getXmlContent() {
235:                return xmlContent;
236:            }
237:
238:            /**
239:             * Return the content of the jonas-ra.xml file
240:             * @return the content of the jonas-ra.xml file
241:             */
242:            public String getJOnASXmlContent() {
243:                return jonasXmlContent;
244:            }
245:
246:            /**
247:             * Set the content of the ra.xml file
248:             * @param xml the content of the file
249:             */
250:            public void setXmlContent(String xml) {
251:                xmlContent = xml;
252:            }
253:
254:            /**
255:             * Set the content of the jonas-ra.xml file
256:             * @param jXml the content of the file
257:             */
258:            public void setJOnASXmlContent(String jXml) {
259:                jonasXmlContent = jXml;
260:            }
261:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.