Source Code Cross Referenced for YahooConfigManager.java in  » Portal » Open-Portal » com » sun » portal » rproxy » rewriter » yahoo » 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 » Portal » Open Portal » com.sun.portal.rproxy.rewriter.yahoo 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2001 Sun Microsystems, Inc.  All rights reserved.
003:         * PROPRIETARY/CONFIDENTIAL.  Use of this product is subject to license terms.
004:         */
005:        package com.sun.portal.rproxy.rewriter.yahoo;
006:
007:        import java.util.Map;
008:
009:        import com.sun.portal.rewriter.util.ConfigManager;
010:        import com.sun.portal.rewriter.util.Debug;
011:        import com.sun.portal.rproxy.configservlet.Request;
012:        import com.sun.portal.rproxy.configservlet.Response;
013:        import com.sun.portal.rproxy.configservlet.client.AttributeExtractor;
014:        import com.sun.portal.rproxy.configservlet.client.SrapClient;
015:
016:        /**
017:         * Fetches the Yahoo Service Attributes for the Gateway to rewrite and recompute
018:         * the MD5 authentication digest.
019:         * 
020:         * @author Rajesh T, Raja Nagendra Kumar
021:         */
022:        public final class YahooConfigManager {
023:            public static final String PROPERTY_IS_YAHOO_INTEGRATION_ENABLED = "IS_YAHOO_INTEGRATION_ENABLED";
024:
025:            private static final String ATTRIBUTE_PREFIX = "sunPortalYahoo";
026:
027:            private static final String SERVICE_NAME = "SunPortalYahooService";
028:
029:            private static final String GET_REQUEST = "GET_GLOBALS";
030:
031:            private static final String PROPERTY_USER_NAME = ATTRIBUTE_PREFIX
032:                    + "CorporateID"; // BugNo:4889146
033:
034:            private static final String PROPERTY_USER_PASSWORD = ATTRIBUTE_PREFIX
035:                    + "CorporatePassword"; // BugNo:4889146
036:
037:            private static final String PROPERTY_EDIT_SERVER = ATTRIBUTE_PREFIX
038:                    + "EditServer";
039:
040:            private static boolean yahooInstalled = true;
041:
042:            private static String corporateID = "rajan001";
043:
044:            private static String corporatePassword = "GePDKPhEzv4t";
045:
046:            private static String editServerURI;
047:
048:            public static void init() {
049:                // BugNo:4889146
050:                try {
051:                    if (ConfigManager
052:                            .getBoolean(PROPERTY_IS_YAHOO_INTEGRATION_ENABLED) == false) {
053:                        throw new Exception(
054:                                "Yahoo Integation disabled using SRAPRewriterModule.properties file");
055:                    }
056:
057:                    Request bRequest = new Request("this-should-be-sid",
058:                            SERVICE_NAME, GET_REQUEST);
059:                    Response bResponse = SrapClient.bootupExecute(bRequest);
060:                    Map bYahooData = (Map) bResponse.getReturnedObject();
061:                    if (bYahooData.isEmpty()) {
062:                        throw new Exception(
063:                                "Yahoo may not be installed with the portal");
064:                    }
065:
066:                    corporateID = AttributeExtractor.getString(bYahooData,
067:                            PROPERTY_USER_NAME, "NoCorporateID");
068:                    corporatePassword = AttributeExtractor.getString(
069:                            bYahooData, PROPERTY_USER_PASSWORD,
070:                            "NoCorporatePassword");
071:                    editServerURI = AttributeExtractor.getString(bYahooData,
072:                            PROPERTY_EDIT_SERVER, "NoEditServerURI");
073:
074:                    Debug
075:                            .message("Yahoo Integration Eanbled with Corporate ID: "
076:                                    + corporateID);
077:                } catch (Throwable e) {
078:                    yahooInstalled = false;
079:                    Debug.warning(
080:                            "Unable to Initialize Yahoo Rewriting Module", e);
081:                }
082:            }// init()
083:
084:            public static String getCorporateID() {
085:                return corporateID;
086:            }// getUserName()
087:
088:            public static String getCorporatePassword() {
089:                return corporatePassword;
090:            }// getUserPassword()
091:
092:            public static String getEditServer() {
093:                return editServerURI;
094:            }// getEditServer()
095:
096:            public static boolean isYahooEnabled() {
097:                return yahooInstalled;
098:            }// isYahooEnabled()
099:
100:        }// class YahooConfigManager
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.