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


001:        /*
002:         * $Id: GatewayProfile.java,v 1.12 2005/11/30 11:27:15 ss150821 Exp $
003:         * $Source: /m/portal/ps/srap/src/com/sun/portal/rproxy/configservlet/client/GatewayProfile.java,v $
004:         * $Log: GatewayProfile.java,v $
005:         * Revision 1.12  2005/11/30 11:27:15  ss150821
006:         * 6356996 - Srap Code base needs to save files in the unix file format and not windows
007:         *
008:         * Revision 1.11  2005/02/23 09:14:06  ss150821
009:         * RFE 6223490 - SRA Should use JDK based logging
010:         *
011:         * Revision 1.10  2005/02/23 09:13:04  ss150821
012:         * RFE 6223490 - SRA Should use JDK based logging
013:         *
014:         * Revision 1.9  2004/07/27 12:52:04  vt126379
015:         * RFE#5075809, CRT#99
016:         *
017:         * Revision 1.8  2003/05/14 04:07:02  rt130506
018:         * Liberty Support
019:         *
020:         * Revision 1.7  2003/03/28 07:02:16  rt130506
021:         * MAP Fixes
022:         *
023:         * Revision 1.6  2003/01/23 10:10:12  bv131302
024:         * id60 changes merged
025:         *
026:         * Revision 1.5.12.1  2002/12/30 11:13:47  bv131302
027:         * id60 related changes
028:         *
029:         * Revision 1.5  2002/08/21 11:23:37  bv131302
030:         * fix for 4730563
031:         *
032:         * Revision 1.4  2002/08/16 15:13:05  bv131302
033:         * Hana CRT#1888 - Check log settings before logging
034:         *
035:         * Revision 1.3  2002/07/29 05:07:15  rt130506
036:         * CRT 1742
037:         *
038:         * Revision 1.2  2002/06/21 13:04:13  bv131302
039:         * LDAP Attribute name changes
040:         *
041:         * Revision 1.1  2002/06/14 09:53:48  rt130506
042:         * SRAP rebranding
043:         *
044:         * Revision 1.3  2002/06/11 16:02:10  bv131302
045:         * new branded
046:         *
047:         * Revision 1.2  2002/03/25 14:02:30  mm132998
048:         * Bugid : # 4653309 , CRT # 644
049:         *
050:         *
051:         */
052:        package com.sun.portal.rproxy.configservlet.client;
053:
054:        import java.util.List;
055:        import java.util.Map;
056:        import java.util.logging.Level;
057:        import java.util.logging.Logger;
058:
059:        import com.sun.portal.log.common.PortalLogger;
060:        import com.sun.portal.rproxy.configservlet.GatewayRequest;
061:        import com.sun.portal.rproxy.configservlet.Request;
062:        import com.sun.portal.rproxy.configservlet.Response;
063:
064:        public class GatewayProfile {
065:
066:            private static final String ATTRIBUTE_PREFIX = "sunPortalGateway";
067:
068:            private static final String SERVICE_NAME = "srapGatewayService";
069:
070:            private static final String GET_REQUEST = "GET_GLOBALS";
071:
072:            private static Map result;
073:
074:            // private static Logger logger =
075:            // Logger.getLogger("com.sun.portal.sra.rproxy");
076:            private static Logger logger = PortalLogger
077:                    .getLogger(GatewayProfile.class);
078:
079:            // private contructor
080:            private GatewayProfile() {
081:            }
082:
083:            public static void init(String sessionId)
084:                    throws SendRequestException, GetResponseException {
085:                Request request = new Request(sessionId, SERVICE_NAME,
086:                        GET_REQUEST);
087:                Response response = SrapClient.execute(request);
088:                result = (Map) response.getReturnedObject();
089:            }
090:
091:            public static void init(String sessionId, String instanceName)
092:                    throws SendRequestException, GetResponseException {
093:                GatewayRequest request = new GatewayRequest(sessionId,
094:                        SERVICE_NAME, "retrieveInstance", instanceName);
095:                Response response = null;
096:                response = SrapClient.bootupExecute(request);
097:                result = (Map) response.getReturnedObject();
098:                // Bug ID # 4653309
099:                if (result.isEmpty()) {
100:                    // logger.severe("Gateway Aborting : Unable to retrieve the gateway
101:                    // profile : " + instanceName);
102:                    Object[] params0 = { instanceName };
103:                    logger.log(Level.SEVERE, "PSSRRPROXY_CSPRCSERVLETC002",
104:                            params0);
105:                    System.exit(-1);
106:                }
107:                // EOC : Bug ID # 4653309
108:            }
109:
110:            public static String getString(String name, String defaultValue) {
111:                return AttributeExtractor.getString(result, ATTRIBUTE_PREFIX
112:                        + name, defaultValue);
113:
114:            }
115:
116:            public static int getInt(String name, int defaultValue) {
117:                return AttributeExtractor.getInt(result, ATTRIBUTE_PREFIX
118:                        + name, defaultValue);
119:            }
120:
121:            public static boolean getBoolean(String name, boolean defaultValue) {
122:                return AttributeExtractor.getBoolean(result, ATTRIBUTE_PREFIX
123:                        + name, defaultValue);
124:            }
125:
126:            public static List getStringList(String name) {
127:                return AttributeExtractor.getStringList(result,
128:                        ATTRIBUTE_PREFIX + name);
129:            }
130:
131:            public static List getLowerCaseStringList(String name) {
132:                return AttributeExtractor.getLowerCaseStringList(result,
133:                        ATTRIBUTE_PREFIX + name);
134:            }
135:
136:            public static List getLowerCaseURLList(String name) {
137:                return AttributeExtractor.getLowerCaseURLList(result,
138:                        ATTRIBUTE_PREFIX + name);
139:            }
140:
141:            public static String getLowerCaseString(String name,
142:                    String defaultValue) {
143:                return AttributeExtractor.getLowerCaseString(result,
144:                        ATTRIBUTE_PREFIX + name, defaultValue);
145:
146:            }
147:
148:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.