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


001:        /**
002:         * Copyright 2004 Sun Microsystems, Inc. All
003:         * rights reserved. Use of this product is subject
004:         * to license terms. Federal Acquisitions:
005:         * Commercial Software -- Government Users
006:         * Subject to Standard License Terms and
007:         * Conditions.
008:         *
009:         * Sun, Sun Microsystems, the Sun logo, and Sun ONE
010:         * are trademarks or registered trademarks of Sun Microsystems,
011:         * Inc. in the United States and other countries.
012:         */package com.sun.portal.fabric.tasks;
013:
014:        import java.util.*;
015:        import java.util.logging.Level;
016:        import java.util.logging.Logger;
017:        import java.util.logging.LogRecord;
018:
019:        import com.sun.portal.admin.common.context.PSConfigContext;
020:        import com.sun.portal.admin.common.context.PortalDomainContext;
021:        import com.sun.portal.admin.common.util.AdminUtil;
022:        import com.sun.portal.admin.server.PASModule;
023:        import com.sun.portal.fabric.tasks.SearchSetup;
024:        import com.sun.portal.log.common.PortalLogger;
025:
026:        public class CreateSearchServerThread extends Thread {
027:
028:            //private Logger logger = null;
029:            private static Logger logger = PortalLogger
030:                    .getLogger(CreateSearchServerThread.class);
031:            private PSConfigContext cc = null;
032:            private PortalDomainContext pdc = null;
033:            private List path = null;
034:            private String searchServerID = null;
035:            private Properties webContainerProperties = null;
036:            public int status = 0;
037:
038:            public CreateSearchServerThread(PSConfigContext cc,
039:                    PortalDomainContext pdc, List path, String searchServerID,
040:                    Properties webContainerProperties) {
041:                this .cc = cc;
042:                this .pdc = pdc;
043:                this .path = path;
044:                this .searchServerID = searchServerID;
045:                this .webContainerProperties = webContainerProperties;
046:                this .status = 0;
047:            }
048:
049:            public void run() {
050:                try {
051:                    status = 1;
052:                    SearchSetup ss = new SearchSetup();
053:
054:                    status = 2;
055:                    ss
056:                            .configuration(cc, searchServerID,
057:                                    webContainerProperties);
058:
059:                    status = 3;
060:                    ss.deployment(cc, searchServerID, searchServerID,
061:                            webContainerProperties);
062:
063:                    status = 4;
064:                    Map m = new HashMap();
065:                    m.put("Type", getProperty(webContainerProperties,
066:                            "WebContainerType"));
067:                    m.put("Protocol", getProperty(webContainerProperties,
068:                            "Scheme"));
069:                    m.put("Host", getProperty(webContainerProperties, "Host"));
070:                    m.put("Port", getProperty(webContainerProperties, "Port"));
071:                    m.put("Domain", getProperty(webContainerProperties,
072:                            "WebContainerDomainName"));
073:                    m.put("Instance", getProperty(webContainerProperties,
074:                            "WebContainerInstanceName"));
075:                    m.put("Cell", getProperty(webContainerProperties,
076:                            "WebContainerDeployCell"));
077:                    m.put("Node", getProperty(webContainerProperties,
078:                            "WebContainerDeployNode"));
079:                    m.put("ManagedServer", getProperty(webContainerProperties,
080:                            "WebContainerManagedServer"));
081:                    m.put("AdministrationProtocol", getProperty(
082:                            webContainerProperties, "WebContainerAdminScheme"));
083:                    m.put("AdministrationHost", getProperty(
084:                            webContainerProperties, "WebContainerAdminHost"));
085:                    m.put("AdministrationPort", getProperty(
086:                            webContainerProperties, "WebContainerAdminPort"));
087:                    m.put("Administrator", getProperty(webContainerProperties,
088:                            "WebContainerAdminUid"));
089:                    m.put("AdministrationPassword",
090:                            getProperty(webContainerProperties,
091:                                    "WebContainerAdminPassword"));
092:                    m.put("MasterPassword", getProperty(webContainerProperties,
093:                            "WebContainerMasterPassword"));
094:                    m.put("JDKDirectory", getProperty(webContainerProperties,
095:                            "WebContainerJDKDir"));
096:                    m.put("InstallDirectory", getProperty(
097:                            webContainerProperties, "WebContainerInstallDir"));
098:                    m.put("InstanceDirectory", getProperty(
099:                            webContainerProperties, "WebContainerInstanceDir"));
100:                    m.put("DocumentRootDirectory", getProperty(
101:                            webContainerProperties, "WebContainerDocRoot"));
102:                    pdc.createResource(AdminUtil.SEARCHSERVER_MBEAN_TYPE, path,
103:                            searchServerID, m);
104:                    List childPath = AdminUtil.getChildPath(path,
105:                            searchServerID);
106:                    pdc.createResource(AdminUtil.SEARCH_DATABASE_MBEAN_TYPE,
107:                            childPath, "database", m);
108:                    pdc.createResource(AdminUtil.SEARCH_ROBOT_MBEAN_TYPE,
109:                            childPath, "robot", m);
110:                    pdc.createResource(AdminUtil.SEARCH_SITEPROBE_MBEAN_TYPE,
111:                            childPath, "siteprobe", m);
112:                    pdc.createResource(
113:                            AdminUtil.SEARCH_AUTOCLASSIFY_MBEAN_TYPE,
114:                            childPath, "autoclassify", m);
115:                    pdc.createResource(AdminUtil.SEARCH_CATEGORY_MBEAN_TYPE,
116:                            childPath, "category", m);
117:                    PASModule.reloadMBeans(pdc,
118:                            AdminUtil.SEARCHSERVER_MBEAN_TYPE, path);
119:
120:                    status = 0;
121:                } catch (Exception e) {
122:                    if (logger.isLoggable(Level.SEVERE)) {
123:                        LogRecord rec = new LogRecord(Level.SEVERE,
124:                                "PSFB_CSPFT0221");
125:                        rec.setLoggerName(logger.getName());
126:                        rec.setParameters(new Object[] { searchServerID });
127:                        rec.setThrown(e);
128:                        logger.log(rec);
129:                    }
130:                    status = -1;
131:                }
132:            }
133:
134:            private String getProperty(Properties p, String key) {
135:                if (p.containsKey(key)) {
136:                    return p.getProperty(key);
137:                } else {
138:                    return "";
139:                }
140:            }
141:
142:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.