Source Code Cross Referenced for FabricBaseBean.java in  » Portal » Open-Portal » com » sun » portal » admin » console » fabric » 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.admin.console.fabric 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /**
02:         * $Id: FabricBaseBean.java,v 1.4 2005/09/21 15:29:42 fo160993 Exp $
03:         * Copyright 2005 Sun Microsystems, Inc. All
04:         * rights reserved. Use of this product is subject
05:         * to license terms. Federal Acquisitions:
06:         * Commercial Software -- Government Users
07:         * Subject to Standard License Terms and
08:         * Conditions.
09:         *
10:         * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11:         * are trademarks or registered trademarks of Sun Microsystems,
12:         * Inc. in the United States and other countries.
13:         */package com.sun.portal.admin.console.fabric;
14:
15:        import java.io.IOException;
16:        import java.util.logging.Level;
17:        import java.util.Set;
18:        import java.util.Map;
19:        import java.util.Collections;
20:
21:        import javax.management.MBeanServerConnection;
22:        import javax.management.ObjectName;
23:
24:        import com.sun.portal.admin.common.util.AdminUtil;
25:        import com.sun.portal.admin.common.util.AdminClientUtil;
26:        import com.sun.portal.admin.console.common.PortalBaseBean;
27:
28:        public class FabricBaseBean extends PortalBaseBean {
29:
30:            protected String getPortalAttribute(String portalId, String name) {
31:                String value = null;
32:                try {
33:                    ObjectName objectName = AdminUtil.getPortalMBeanObjectName(
34:                            AdminUtil.DEFAULT_DOMAIN, portalId);
35:
36:                    // Setting the params and signature
37:                    Object[] params = { AdminUtil.PORTAL_MBEAN_TYPE, name };
38:                    String[] signature = { "java.lang.String",
39:                            "java.lang.String" };
40:
41:                    value = (String) getMBeanServerConnection().invoke(
42:                            objectName, "getAttributeValue", params, signature);
43:                } catch (Exception e) {
44:                    log(
45:                            Level.SEVERE,
46:                            "FabricBaseBean.getPortalAttribute(): Failed to get attribute value for portal "
47:                                    + portalId + " and attribute " + name, e);
48:                    value = "";
49:                }
50:                return value;
51:            }
52:
53:            protected Map getInstanceAttributes(String portalId,
54:                    String instanceId, Set names) {
55:                Map values = null;
56:                try {
57:                    ObjectName objectName = AdminUtil
58:                            .getInstanceMBeanObjectName(
59:                                    AdminUtil.DEFAULT_DOMAIN, portalId,
60:                                    instanceId);
61:
62:                    // Setting the params and signature
63:                    Object[] params = {
64:                            AdminUtil.PORTAL_SERVER_INSTANCE_MBEAN_TYPE, names };
65:                    String[] signature = { "java.lang.String", "java.util.Set" };
66:
67:                    values = (Map) getMBeanServerConnection().invoke(
68:                            objectName, "getMultipleAttributeValues", params,
69:                            signature);
70:                } catch (Exception e) {
71:                    log(
72:                            Level.SEVERE,
73:                            "FabricBaseBean.getInstanceAttributes(): Failed to get attribute value for portal "
74:                                    + portalId + " and attributes " + names, e);
75:                    values = Collections.EMPTY_MAP;
76:                }
77:                return values;
78:            }
79:
80:            /**
81:             * Gets a localized string from the resoucebundle
82:             * @param key A key string
83:             * @return  A localized String for the key
84:             */
85:            protected String getFabricI18N(String key) {
86:                return getLocalizedString("fabric", key);
87:            }
88:
89:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.