Source Code Cross Referenced for PortComponentRefDesc.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas_ws » 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_ws.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 : Delplanque Xavier & Sauthier Guillaume
022:         * --------------------------------------------------------------------------
023:         * $Id: PortComponentRefDesc.java 6038 2005-01-03 14:57:14Z sauthieg $
024:         * --------------------------------------------------------------------------
025:         */package org.objectweb.jonas_ws.deployment.api;
026:
027:        import java.util.Iterator;
028:        import java.util.Properties;
029:
030:        import javax.xml.namespace.QName;
031:
032:        import org.objectweb.jonas_lib.I18n;
033:        import org.objectweb.jonas_lib.deployment.xml.JonasCallProperty;
034:        import org.objectweb.jonas_lib.deployment.xml.JonasPortComponentRef;
035:        import org.objectweb.jonas_lib.deployment.xml.JonasStubProperty;
036:        import org.objectweb.jonas_lib.deployment.xml.PortComponentRef;
037:
038:        /**
039:         * The PortComponentRefDesc associate a service-endpoint-interface with a
040:         * port-component in the same application unit.
041:         * @author Guillaume Sauthier
042:         * @author Xavier Delplanque
043:         */
044:        public class PortComponentRefDesc {
045:
046:            /** The service-endpoint-interface matching the WSDL port */
047:            private Class sei;
048:
049:            /** The PortComponent link Name */
050:            private String pcLink = null;
051:
052:            /** The PortComponent link */
053:            private PortComponentDesc pcDesc = null;
054:
055:            /**
056:             * Stub properties
057:             */
058:            private Properties stubProperties = null;
059:
060:            /**
061:             * Call properties
062:             */
063:            private Properties callProperties = null;
064:
065:            /**
066:             * wsdl:port to be used when invoking Service.getPort(Class sei)
067:             */
068:            private QName wsdlPort = null;
069:
070:            /**
071:             * Internationalization
072:             */
073:            private static I18n i18n = I18n
074:                    .getInstance(PortComponentRefDesc.class);
075:
076:            /**
077:             * Creates a new PortComponentRefDesc object.
078:             * @param classLoader module class loader (web or ejb)
079:             * @param pcr port component ref generate by Zeus, defined in web deployment
080:             *        desc
081:             * @param jpcr jonas port component ref generate by Zeus, defined in web deployment
082:             *        desc
083:             * @throws WSDeploymentDescException if service endpoint class doesn't exist
084:             */
085:            public PortComponentRefDesc(ClassLoader classLoader,
086:                    PortComponentRef pcr, JonasPortComponentRef jpcr)
087:                    throws WSDeploymentDescException {
088:
089:                String className = null;
090:                stubProperties = new Properties();
091:                callProperties = new Properties();
092:
093:                try {
094:                    // load service endpoint interface
095:                    className = pcr.getServiceEndpointInterface().trim();
096:                    sei = classLoader.loadClass(className);
097:
098:                    // get port link if any
099:                    if (pcr.getPortComponentLink() != null) {
100:                        pcLink = pcr.getPortComponentLink().trim();
101:                    }
102:
103:                    // load properties
104:                    if (jpcr != null) {
105:                        for (Iterator i = jpcr.getJonasCallPropertyList()
106:                                .iterator(); i.hasNext();) {
107:                            JonasCallProperty jp = (JonasCallProperty) i.next();
108:                            callProperties.setProperty(jp.getParamName(), jp
109:                                    .getParamValue());
110:                        }
111:                        for (Iterator i = jpcr.getJonasStubPropertyList()
112:                                .iterator(); i.hasNext();) {
113:                            JonasStubProperty jp = (JonasStubProperty) i.next();
114:                            stubProperties.setProperty(jp.getParamName(), jp
115:                                    .getParamValue());
116:                        }
117:                        if (jpcr.getWsdlPort() != null) {
118:                            wsdlPort = jpcr.getWsdlPort().getQName();
119:                        }
120:                    }
121:                } catch (ClassNotFoundException e) {
122:                    throw new WSDeploymentDescException(getI18n().getMessage(
123:                            "PortComponentRefDesc.seiNotFound", className), e); //$NON-NLS-1$
124:                }
125:            }
126:
127:            /**
128:             * Return the port Component Link Object. May be null if not defined
129:             * @return the port Component Link Object.
130:             */
131:            public String getPortComponentLink() {
132:                return pcLink;
133:            }
134:
135:            /**
136:             * Set the pcLink port component desc
137:             * @param pcd the portComponentDesc linked with this PortcompRef.
138:             */
139:            public void setPortComponentDesc(PortComponentDesc pcd) {
140:                pcDesc = pcd;
141:            }
142:
143:            /**
144:             * Return the linked port component desc (can be null if no pcLink).
145:             * @return the linked port component desc. (null if no pcLink)
146:             */
147:            public PortComponentDesc getPortComponentDesc() {
148:                return pcDesc;
149:            }
150:
151:            /**
152:             * Return the Service Endpoint Interface of the Port Component.
153:             * @return the Service Endpoint Interface of the Port Component.
154:             */
155:            public Class getSEI() {
156:                return sei;
157:            }
158:
159:            /**
160:             * @see java.lang.String#hashCode()
161:             */
162:            public int hashCode() {
163:                return sei.getName().hashCode();
164:            }
165:
166:            /**
167:             * Return true if the 2 objects are equals in value.
168:             * @param other the object to compare.
169:             * @return true if the 2 objects are equals in value, else false.
170:             */
171:            public boolean equals(Object other) {
172:                if (other == null) {
173:                    return false;
174:                }
175:
176:                if (!(other instanceof  PortComponentRefDesc)) {
177:                    return false;
178:                }
179:
180:                PortComponentRefDesc ref = (PortComponentRefDesc) other;
181:
182:                if (!sei.getName().equals(ref.getSEI().getName())) {
183:                    return false;
184:                }
185:
186:                if (!pcLink.equals(ref.getPortComponentLink())) {
187:                    return false;
188:                }
189:
190:                // After all theses tests, the 2 objects are equals in value
191:                return true;
192:            }
193:
194:            /**
195:             * @return Returns the i18n.
196:             */
197:            protected static I18n getI18n() {
198:                return i18n;
199:            }
200:
201:            /**
202:             * @return Returns the callProperties.
203:             */
204:            public Properties getCallProperties() {
205:                return callProperties;
206:            }
207:
208:            /**
209:             * @return Returns the stubProperties.
210:             */
211:            public Properties getStubProperties() {
212:                return stubProperties;
213:            }
214:
215:            /**
216:             * @return Returns the wsdlPort.
217:             */
218:            public QName getWsdlPort() {
219:                return wsdlPort;
220:            }
221:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.