Source Code Cross Referenced for AdminInfoFactory.java in  » ESB » cbesb-1.2 » com » bostechcorp » cbesb » console » 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 » ESB » cbesb 1.2 » com.bostechcorp.cbesb.console.client 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * ChainBuilder ESB
003:         *          Visual Enterprise Integration
004:         * 
005:         * Copyright (C) 2006 Bostech Corporation
006:         * 
007:         * This program is free software; you can redistribute it and/or modify it 
008:         * under the terms of the GNU General Public License as published by the 
009:         * Free Software Foundation; either version 2 of the License, or (at your option) 
010:         * any later version.
011:         *
012:         * This program is distributed in the hope that it will be useful, 
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
014:         * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
015:         * for more details.
016:         * 
017:         * You should have received a copy of the GNU General Public License along with 
018:         * this program; if not, write to the Free Software Foundation, Inc., 
019:         * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020:         *
021:         * AdminInfoFactory
022:         * LPS
023:         * Nov 3, 2007
024:         */package com.bostechcorp.cbesb.console.client;
025:
026:        import com.bostechcorp.cbesb.console.client.about.AboutHelp;
027:        import com.bostechcorp.cbesb.console.client.about.AdminConsoleAbout;
028:        import com.bostechcorp.cbesb.console.client.about.AdminConsoleLicensePanel;
029:        import com.bostechcorp.cbesb.console.client.about.SupportPanel;
030:        import com.bostechcorp.cbesb.console.client.about.VersionPanel;
031:        import com.bostechcorp.cbesb.console.client.assemblies.AssembliesCurrent;
032:        import com.bostechcorp.cbesb.console.client.assemblies.AssembliesCurrentReadOnly;
033:        import com.bostechcorp.cbesb.console.client.assemblies.AssembliesDeploy;
034:        import com.bostechcorp.cbesb.console.client.assemblies.AssembliesDeployReadOnly;
035:        import com.bostechcorp.cbesb.console.client.assemblies.AssembliesHelp;
036:        import com.bostechcorp.cbesb.console.client.components.ComponentsCurrent;
037:        import com.bostechcorp.cbesb.console.client.components.ComponentsCurrentReadOnly;
038:        import com.bostechcorp.cbesb.console.client.components.ComponentsHelp;
039:        import com.bostechcorp.cbesb.console.client.components.ComponentsInstall;
040:        import com.bostechcorp.cbesb.console.client.components.ComponentsInstallReadOnly;
041:        import com.bostechcorp.cbesb.console.client.endpoint.EndpointHelp;
042:        import com.bostechcorp.cbesb.console.client.endpoint.EndpointStatisticsMore;
043:        import com.bostechcorp.cbesb.console.client.endpoint.EndpointStatisticsOne;
044:        import com.bostechcorp.cbesb.console.client.endpoint.EndpointStatusMoreOper;
045:        import com.bostechcorp.cbesb.console.client.endpoint.EndpointStatusMoreUser;
046:        import com.bostechcorp.cbesb.console.client.endpoint.EndpointStatusOneOper;
047:        import com.bostechcorp.cbesb.console.client.endpoint.EndpointStatusOneUser;
048:        import com.bostechcorp.cbesb.console.client.errordb.ErrorDb;
049:        import com.bostechcorp.cbesb.console.client.errordb.ErrorDbReadOnly;
050:        import com.bostechcorp.cbesb.console.client.log.LogHelp;
051:        import com.bostechcorp.cbesb.console.client.log.ServerLogPanel;
052:        import com.bostechcorp.cbesb.console.client.log.SmWrapperLogPanel;
053:        import com.bostechcorp.cbesb.console.client.log.TcWrapperLogPanel;
054:        import com.bostechcorp.cbesb.console.client.preference.AlertSettingsPreferencePanel;
055:        import com.bostechcorp.cbesb.console.client.preference.DefaultPreferencesPanel;
056:        import com.bostechcorp.cbesb.console.client.preference.UserPreferencesPanel;
057:        import com.bostechcorp.cbesb.console.client.setup.SetupPanel;
058:        import com.bostechcorp.cbesb.console.client.useredit.UserEdit;
059:        import com.bostechcorp.cbesb.console.client.useredit.UserEditReadOnly;
060:        import com.bostechcorp.cbesb.console.client.userlogin.UserLoginError;
061:        import com.bostechcorp.cbesb.console.client.userlogin.UserLoginStartupPanel;
062:        import com.bostechcorp.cbesb.console.common.SecurityLoginInfo;
063:        import com.bostechcorp.cbesb.console.i18n.ConsoleMessages;
064:        import com.google.gwt.core.client.GWT;
065:
066:        public class AdminInfoFactory {
067:
068:            public static String STATISTIC = ((ConsoleMessages) GWT
069:                    .create(ConsoleMessages.class)).Statistics();
070:            public static String STATUS = ((ConsoleMessages) GWT
071:                    .create(ConsoleMessages.class)).Status();
072:
073:            public static AdminInfo getComponentsHelp(SecurityLoginInfo info) {
074:                return new AdminInfo(((ConsoleMessages) GWT
075:                        .create(ConsoleMessages.class)).Components(),
076:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
077:                                .Components(), info) {
078:                    public Admin createInstance() {
079:                        return new ComponentsHelp();
080:                    }
081:                };
082:            }
083:
084:            public static AdminInfo getAssembliesHelp(SecurityLoginInfo info) {
085:                return new AdminInfo(((ConsoleMessages) GWT
086:                        .create(ConsoleMessages.class)).Assemblies(),
087:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
088:                                .Assemblies(), info) {
089:                    public Admin createInstance() {
090:                        return new AssembliesHelp();
091:                    }
092:                };
093:            }
094:
095:            public static AdminInfo getEndpointHelp(SecurityLoginInfo info) {
096:                return new AdminInfo(((ConsoleMessages) GWT
097:                        .create(ConsoleMessages.class)).Endpoints(),
098:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
099:                                .Endpoints(), info) {
100:
101:                    public Admin createInstance() {
102:                        return new EndpointHelp();
103:                    }
104:                };
105:            }
106:
107:            public static AdminInfo getEndpointStatus(SecurityLoginInfo info) {
108:                return new AdminInfo(STATUS, STATUS, info) {
109:
110:                    public Admin createInstance() {
111:                        if (!user.getType().equals(SecurityLoginInfo.user)) {
112:                            if ("one".equalsIgnoreCase(user
113:                                    .getSaInEndpointView())) {
114:                                return new EndpointStatusOneOper();
115:                            } else {
116:                                return new EndpointStatusMoreOper();
117:                            }
118:                        } else {
119:                            if ("one".equalsIgnoreCase(user
120:                                    .getSaInEndpointView())) {
121:                                return new EndpointStatusOneUser();
122:                            } else {
123:                                return new EndpointStatusMoreUser();
124:                            }
125:                        }
126:                    }
127:                };
128:            }
129:
130:            public static AdminInfo getEndpointStatistics(SecurityLoginInfo info) {
131:                return new AdminInfo(STATISTIC, STATISTIC, info) {
132:
133:                    public Admin createInstance() {
134:                        if ("one".equalsIgnoreCase(user.getSaInEndpointView())) {
135:                            return new EndpointStatisticsOne();
136:                        } else {
137:                            return new EndpointStatisticsMore();
138:                        }
139:                    }
140:                };
141:            }
142:
143:            public static AdminInfo getLogHelp(SecurityLoginInfo info) {
144:                return new AdminInfo(((ConsoleMessages) GWT
145:                        .create(ConsoleMessages.class)).Log(),
146:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
147:                                .Log(), info) {
148:
149:                    public Admin createInstance() {
150:                        LogHelp log = new LogHelp();
151:                        return log;
152:                    }
153:                };
154:            }
155:
156:            public static AdminInfo getUserEdit(SecurityLoginInfo info) {
157:                return new AdminInfo(((ConsoleMessages) GWT
158:                        .create(ConsoleMessages.class)).UserEdit(),
159:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
160:                                .UserEdit(), info) {
161:
162:                    public Admin createInstance() {
163:                        if (user.getType().equals(
164:                                SecurityLoginInfo.administrator)) {
165:                            return new UserEdit(user);
166:                        } else {
167:                            return new UserEditReadOnly(user);
168:                        }
169:                    }
170:                };
171:            }
172:
173:            public static AdminInfo getUserLoginErr() {
174:                return new AdminInfo(((ConsoleMessages) GWT
175:                        .create(ConsoleMessages.class)).Error(),
176:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
177:                                .Error(), null) {
178:
179:                    public Admin createInstance() {
180:                        return new UserLoginError();
181:                    }
182:                };
183:            }
184:
185:            public static AdminInfo getUserStartup() {
186:                return new AdminInfo(((ConsoleMessages) GWT
187:                        .create(ConsoleMessages.class)).Control(),
188:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
189:                                .Control(), null) {
190:
191:                    public Admin createInstance() {
192:                        return new UserLoginStartupPanel();
193:                    }
194:                };
195:            }
196:
197:            public static AdminInfo getSetup(SecurityLoginInfo info) {
198:                return new AdminInfo(((ConsoleMessages) GWT
199:                        .create(ConsoleMessages.class)).Setup(),
200:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
201:                                .Setup(), info) {
202:
203:                    public Admin createInstance() {
204:                        return new SetupPanel();
205:                    }
206:                };
207:            }
208:
209:            public static AdminInfo getComponentsCurrent(SecurityLoginInfo info) {
210:                return new AdminInfo(((ConsoleMessages) GWT
211:                        .create(ConsoleMessages.class)).Control(),
212:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
213:                                .Control(), info) {
214:
215:                    public Admin createInstance() {
216:
217:                        if (!user.getType().equals(SecurityLoginInfo.user)) {
218:                            return new ComponentsCurrent();
219:                        } else {
220:                            return new ComponentsCurrentReadOnly();
221:                        }
222:                    }
223:                };
224:            }
225:
226:            public static AdminInfo getServerLogView(SecurityLoginInfo info) {
227:                return new AdminInfo(((ConsoleMessages) GWT
228:                        .create(ConsoleMessages.class)).ServerLog(),
229:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
230:                                .ServerLog(), info) {
231:
232:                    public Admin createInstance() {
233:                        return new ServerLogPanel();
234:                    }
235:                };
236:            }
237:
238:            public static AdminInfo getTcLogView(SecurityLoginInfo info) {
239:                return new AdminInfo(((ConsoleMessages) GWT
240:                        .create(ConsoleMessages.class)).TcLog(),
241:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
242:                                .TcLog(), info) {
243:
244:                    public Admin createInstance() {
245:                        return new TcWrapperLogPanel();
246:                    }
247:                };
248:            }
249:
250:            public static AdminInfo getSmLogView(SecurityLoginInfo info) {
251:                return new AdminInfo(((ConsoleMessages) GWT
252:                        .create(ConsoleMessages.class)).SmLog(),
253:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
254:                                .SmLog(), info) {
255:
256:                    public Admin createInstance() {
257:                        return new SmWrapperLogPanel();
258:                    }
259:                };
260:            }
261:
262:            public static AdminInfo getComponentsInstall(SecurityLoginInfo info) {
263:                return new AdminInfo(((ConsoleMessages) GWT
264:                        .create(ConsoleMessages.class)).Install(),
265:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
266:                                .Install(), info) {
267:
268:                    public Admin createInstance() {
269:
270:                        if (!user.getType().equals(SecurityLoginInfo.user)) {
271:                            return new ComponentsInstall();
272:                        } else {
273:                            return new ComponentsInstallReadOnly();
274:                        }
275:                    }
276:                };
277:            }
278:
279:            public static AdminInfo getAssembliesCurrent(SecurityLoginInfo info) {
280:                return new AdminInfo(((ConsoleMessages) GWT
281:                        .create(ConsoleMessages.class)).Control(),
282:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
283:                                .Control(), info) {
284:
285:                    public Admin createInstance() {
286:                        if (!user.getType().equals(SecurityLoginInfo.user)) {
287:                            return new AssembliesCurrent();
288:                        } else {
289:                            return new AssembliesCurrentReadOnly();
290:                        }
291:                    }
292:                };
293:            }
294:
295:            public static AdminInfo getAssembliesDeploy(SecurityLoginInfo info) {
296:                return new AdminInfo(((ConsoleMessages) GWT
297:                        .create(ConsoleMessages.class)).Deploy(),
298:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
299:                                .Deploy(), info) {
300:
301:                    public Admin createInstance() {
302:                        if (!user.getType().equals(SecurityLoginInfo.user)) {
303:                            return new AssembliesDeploy();
304:                        } else {
305:                            return new AssembliesDeployReadOnly();
306:                        }
307:                    }
308:                };
309:            }
310:
311:            public static AdminInfo getErrorDBPanel(SecurityLoginInfo info) {
312:                return new AdminInfo(((ConsoleMessages) GWT
313:                        .create(ConsoleMessages.class)).ErrorDB(),
314:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
315:                                .ErrorDB(), info) {
316:
317:                    public Admin createInstance() {
318:                        if (!user.getType().equals(SecurityLoginInfo.user)) {
319:                            return new ErrorDb();
320:                        } else {
321:                            return new ErrorDbReadOnly();
322:                        }
323:                    }
324:                };
325:            }
326:
327:            public static AdminInfo getDefaultPreferencePanel(
328:                    SecurityLoginInfo info) {
329:                return new AdminInfo(((ConsoleMessages) GWT
330:                        .create(ConsoleMessages.class)).DefaultPreferences(),
331:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
332:                                .DefaultPreferences(), info) {
333:
334:                    public Admin createInstance() {
335:                        DefaultPreferencesPanel preferencePanel = new DefaultPreferencesPanel();
336:                        return preferencePanel;
337:                    }
338:                };
339:            }
340:
341:            public static AdminInfo getAlertSettingsPreferencePanel(
342:                    SecurityLoginInfo info) {
343:                return new AdminInfo(((ConsoleMessages) GWT
344:                        .create(ConsoleMessages.class))
345:                        .AlertSettingsPreferences(), ((ConsoleMessages) GWT
346:                        .create(ConsoleMessages.class))
347:                        .AlertSettingsPreferences(), info) {
348:
349:                    public Admin createInstance() {
350:                        AlertSettingsPreferencePanel preferencePanel = new AlertSettingsPreferencePanel();
351:                        return preferencePanel;
352:                    }
353:                };
354:            }
355:
356:            public static AdminInfo getUserPreferencePanel(
357:                    SecurityLoginInfo info) {
358:                return new AdminInfo(((ConsoleMessages) GWT
359:                        .create(ConsoleMessages.class)).UserPreferences(),
360:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
361:                                .UserPreferences(), info) {
362:
363:                    public Admin createInstance() {
364:                        UserPreferencesPanel preferencePanel = new UserPreferencesPanel(
365:                                String.valueOf(user.getUserId()));
366:                        return preferencePanel;
367:                    }
368:                };
369:            }
370:
371:            public static AdminInfo getAboutPanel(SecurityLoginInfo info) {
372:                return new AdminInfo(((ConsoleMessages) GWT
373:                        .create(ConsoleMessages.class)).About(),
374:                        ((ConsoleMessages) GWT.create(ConsoleMessages.class))
375:                                .About(), info) {
376:
377:                    public Admin createInstance() {
378:                        return new AdminConsoleAbout();
379:                    }
380:                };
381:            }
382:            //
383:            //	public static AdminInfo getVersionPanel(SecurityLoginInfo info) {
384:            //		return new AdminInfo(
385:            //				((ConsoleMessages) GWT.create(ConsoleMessages.class)).Version(),
386:            //				((ConsoleMessages) GWT.create(ConsoleMessages.class)).Version(),
387:            //				info) {
388:            //
389:            //			public Admin createInstance() {
390:            //				VersionPanel versionPanel = new VersionPanel();
391:            //				return versionPanel;
392:            //			}
393:            //		};
394:            //	}
395:            //
396:            //	public static AdminInfo getLicensePanel(SecurityLoginInfo info) {
397:            //		return new AdminInfo(
398:            //				((ConsoleMessages) GWT.create(ConsoleMessages.class)).License(),
399:            //				((ConsoleMessages) GWT.create(ConsoleMessages.class)).License(),
400:            //				info) {
401:            //
402:            //			public Admin createInstance() {
403:            ////				if (Console.getInstance().isAlertMonitor()){
404:            ////				AdminConsoleProLicensePanel licensePanel = new AdminConsoleProLicensePanel();
405:            ////				return licensePanel;
406:            ////				}
407:            ////				else
408:            //				{	AdminConsoleLicensePanel licensePanel = new AdminConsoleLicensePanel();
409:            //					return licensePanel;
410:            //				}
411:            //			}
412:            //		};
413:            //	}
414:            //
415:            //	public static AdminInfo getSupportPanel(SecurityLoginInfo info) {
416:            //		return new AdminInfo(
417:            //				((ConsoleMessages) GWT.create(ConsoleMessages.class)).Support(),
418:            //				((ConsoleMessages) GWT.create(ConsoleMessages.class)).Support(),
419:            //				info) {
420:            //
421:            //			public Admin createInstance() {
422:            //				SupportPanel supportPanel = new SupportPanel();
423:            //				return supportPanel;
424:            //			}
425:            //		};
426:            //	}
427:
428:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.