Source Code Cross Referenced for GlobalServiceConfig.java in  » J2EE » Pustefix » de » schlund » pfixcore » webservice » config » 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 » Pustefix » de.schlund.pfixcore.webservice.config 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file is part of PFIXCORE.
003:         *
004:         * PFIXCORE is free software; you can redistribute it and/or modify
005:         * it under the terms of the GNU Lesser General Public License as published by
006:         * the Free Software Foundation; either version 2 of the License, or
007:         * (at your option) any later version.
008:         *
009:         * PFIXCORE is distributed in the hope that it will be useful,
010:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
011:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012:         * GNU Lesser General Public License for more details.
013:         *
014:         * You should have received a copy of the GNU Lesser General Public License
015:         * along with PFIXCORE; if not, write to the Free Software
016:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
017:         *
018:         */
019:
020:        package de.schlund.pfixcore.webservice.config;
021:
022:        import java.io.IOException;
023:        import java.io.ObjectInputStream;
024:        import java.io.ObjectOutputStream;
025:        import java.io.Serializable;
026:        import java.lang.reflect.Method;
027:        import java.lang.reflect.Modifier;
028:        import java.net.URL;
029:        import java.util.HashMap;
030:
031:        import de.schlund.pfixcore.webservice.Constants;
032:        import de.schlund.pfixcore.webservice.fault.FaultHandler;
033:
034:        /**
035:         * GlobalServiceConfig.java
036:         * 
037:         * Created: 27.07.2004
038:         * 
039:         * @author mleidig@schlund.de
040:         */
041:        public class GlobalServiceConfig implements  Serializable {
042:
043:            private String server;
044:            private String reqPath = "/xml/webservice";
045:            private Boolean wsdlSupport = Boolean.TRUE;
046:            private String wsdlRepo = "/wsdl";
047:            private Boolean stubGeneration = Boolean.TRUE;
048:            private String stubRepo = "/wsscript";
049:            private String jsNamespace = Constants.STUBGEN_JSNAMESPACE_COMPAT;
050:            private String protocolType = Constants.PROTOCOL_TYPE_ANY;
051:            private String encStyle = Constants.ENCODING_STYLE_RPC;
052:            private String encUse = Constants.ENCODING_USE_ENCODED;
053:            private Boolean jsonClassHinting = Boolean.FALSE;
054:            private String sessType = Constants.SESSION_TYPE_SERVLET;
055:            private String scopeType = Constants.SERVICE_SCOPE_APPLICATION;
056:            private Boolean sslForce = Boolean.FALSE;
057:            private String ctxName;
058:            private Boolean ctxSync = Boolean.TRUE;
059:            private Boolean admin = Boolean.FALSE;
060:            private Boolean monitoring = Boolean.FALSE;
061:            private String monitorScope = Constants.MONITOR_SCOPE_SESSION;
062:            private Integer monitorSize = 20;
063:            private Boolean logging = Boolean.FALSE;
064:            private transient FaultHandler faultHandler;
065:            private URL defaultBeanMetaDataUrl;
066:
067:            public GlobalServiceConfig() {
068:            }
069:
070:            public String getServer() {
071:                return server;
072:            }
073:
074:            public void setServer(String server) {
075:                this .server = server;
076:            }
077:
078:            public String getRequestPath() {
079:                return reqPath;
080:            }
081:
082:            public void setRequestPath(String reqPath) {
083:                this .reqPath = reqPath;
084:            }
085:
086:            public String getWSDLRepository() {
087:                return wsdlRepo;
088:            }
089:
090:            public void setWSDLRepository(String wsdlRepo) {
091:                this .wsdlRepo = wsdlRepo;
092:            }
093:
094:            public Boolean getWSDLSupportEnabled() {
095:                return wsdlSupport;
096:            }
097:
098:            public void setWSDLSupportEnabled(Boolean wsdlSupport) {
099:                this .wsdlSupport = wsdlSupport;
100:            }
101:
102:            public String getStubRepository() {
103:                return stubRepo;
104:            }
105:
106:            public void setStubRepository(String stubRepo) {
107:                this .stubRepo = stubRepo;
108:            }
109:
110:            public Boolean getStubGenerationEnabled() {
111:                return stubGeneration;
112:            }
113:
114:            public void setStubGenerationEnabled(Boolean stubGeneration) {
115:                this .stubGeneration = stubGeneration;
116:            }
117:
118:            public String getStubJSNamespace() {
119:                return jsNamespace;
120:            }
121:
122:            public void setStubJSNamespace(String jsNamespace) {
123:                this .jsNamespace = jsNamespace;
124:            }
125:
126:            public String getProtocolType() {
127:                return protocolType;
128:            }
129:
130:            public void setProtocolType(String protocolType) {
131:                this .protocolType = protocolType;
132:            }
133:
134:            public String getEncodingStyle() {
135:                return encStyle;
136:            }
137:
138:            public void setEncodingStyle(String encStyle) {
139:                this .encStyle = encStyle;
140:            }
141:
142:            public String getEncodingUse() {
143:                return encUse;
144:            }
145:
146:            public void setEncodingUse(String encUse) {
147:                this .encUse = encUse;
148:            }
149:
150:            public Boolean getJSONClassHinting() {
151:                return jsonClassHinting;
152:            }
153:
154:            public void setJSONClassHinting(Boolean jsonClassHinting) {
155:                this .jsonClassHinting = jsonClassHinting;
156:            }
157:
158:            public String getSessionType() {
159:                return sessType;
160:            }
161:
162:            public void setSessionType(String sessType) {
163:                this .sessType = sessType;
164:            }
165:
166:            public void setScopeType(String scopeType) {
167:                this .scopeType = scopeType;
168:            }
169:
170:            public String getScopeType() {
171:                return scopeType;
172:            }
173:
174:            public Boolean getSSLForce() {
175:                return sslForce;
176:            }
177:
178:            public void setSSLForce(Boolean sslForce) {
179:                this .sslForce = sslForce;
180:            }
181:
182:            public String getContextName() {
183:                return ctxName;
184:            }
185:
186:            public void setContextName(String ctxName) {
187:                this .ctxName = ctxName;
188:            }
189:
190:            public boolean getSynchronizeOnContext() {
191:                return ctxSync;
192:            }
193:
194:            public void setSynchronizeOnContext(Boolean ctxSync) {
195:                this .ctxSync = ctxSync;
196:            }
197:
198:            public Boolean getAdminEnabled() {
199:                return admin;
200:            }
201:
202:            public void setAdminEnabled(Boolean admin) {
203:                this .admin = admin;
204:            }
205:
206:            public Boolean getMonitoringEnabled() {
207:                return monitoring;
208:            }
209:
210:            public void setMonitoringEnabled(Boolean monitoring) {
211:                this .monitoring = monitoring;
212:            }
213:
214:            public String getMonitoringScope() {
215:                return monitorScope;
216:            }
217:
218:            public void setMonitoringScope(String monitorScope) {
219:                this .monitorScope = monitorScope;
220:            }
221:
222:            public Integer getMonitoringHistorySize() {
223:                return monitorSize;
224:            }
225:
226:            public void setMonitoringHistorySize(Integer monitorSize) {
227:                this .monitorSize = monitorSize;
228:            }
229:
230:            public Boolean getLoggingEnabled() {
231:                return logging;
232:            }
233:
234:            public void setLoggingEnabled(Boolean logging) {
235:                this .logging = logging;
236:            }
237:
238:            public FaultHandler getFaultHandler() {
239:                return faultHandler;
240:            }
241:
242:            public void setFaultHandler(FaultHandler faultHandler) {
243:                this .faultHandler = faultHandler;
244:            }
245:
246:            public URL getDefaultBeanMetaDataURL() {
247:                return defaultBeanMetaDataUrl;
248:            }
249:
250:            public void setDefaultBeanMetaDataURL(URL defaultBeanMetaDataUrl) {
251:                this .defaultBeanMetaDataUrl = defaultBeanMetaDataUrl;
252:            }
253:
254:            @Override
255:            public boolean equals(Object obj) {
256:
257:                if (obj instanceof  GlobalServiceConfig) {
258:                    GlobalServiceConfig ref = (GlobalServiceConfig) obj;
259:                    Method[] meths = getClass().getDeclaredMethods();
260:                    for (int i = 0; i < meths.length; i++) {
261:                        Method meth = meths[i];
262:                        if (meth.getName().startsWith("get")
263:                                && Modifier.isPublic(meth.getModifiers())
264:                                && !meth.getName().equals(
265:                                        "getDefaultBeanMetaDataURL")) {
266:                            try {
267:                                Object res = meth.invoke(this , new Object[0]);
268:                                Object refRes = meth.invoke(ref, new Object[0]);
269:                                if (res == null ^ refRes == null) {
270:                                    System.out.println("Difference found: "
271:                                            + meth.getName() + " " + res + " "
272:                                            + refRes);
273:                                    return false;
274:                                }
275:                                if (res != null && !res.equals(refRes)) {
276:                                    System.out.println("Difference found: "
277:                                            + meth.getName() + " " + res + " "
278:                                            + refRes);
279:                                    return false;
280:                                }
281:                            } catch (Exception x) {
282:                                x.printStackTrace();
283:                                return false;
284:                            }
285:                        }
286:                    }
287:                    return true;
288:                }
289:                return false;
290:            }
291:
292:            private void writeObject(ObjectOutputStream out) throws IOException {
293:                out.defaultWriteObject();
294:                if (faultHandler != null)
295:                    out.writeObject(faultHandler.getClass().getName());
296:                else
297:                    out.writeObject(null);
298:                if (faultHandler != null && faultHandler.getParams() != null)
299:                    out.writeObject(faultHandler.getParams());
300:                else
301:                    out.writeObject(null);
302:            }
303:
304:            @SuppressWarnings("unchecked")
305:            private void readObject(ObjectInputStream in) throws IOException,
306:                    ClassNotFoundException {
307:                in.defaultReadObject();
308:                String str = (String) in.readObject();
309:                if (str != null) {
310:                    Class<?> clazz = Class.forName(str);
311:                    try {
312:                        faultHandler = (FaultHandler) clazz.newInstance();
313:                        HashMap<String, String> params = (HashMap<String, String>) in
314:                                .readObject();
315:                        if (params != null)
316:                            faultHandler.setParams(params);
317:                    } catch (IllegalAccessException x) {
318:
319:                    } catch (InstantiationException x) {
320:
321:                    }
322:                }
323:            }
324:
325:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.