Source Code Cross Referenced for ConfigContentProvider.java in  » Net » Terracotta » org » terracotta » dso » views » 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 » Net » Terracotta » org.terracotta.dso.views 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
003:         * notice. All rights reserved.
004:         */
005:        package org.terracotta.dso.views;
006:
007:        import org.eclipse.jface.viewers.ITreeContentProvider;
008:        import org.eclipse.jface.viewers.Viewer;
009:
010:        import com.terracottatech.config.Application;
011:        import com.terracottatech.config.DsoApplication;
012:        import com.terracottatech.config.TcConfigDocument.TcConfig;
013:
014:        public class ConfigContentProvider implements  ITreeContentProvider {
015:            RootsWrapper rootsWrapper;
016:            LocksWrapper locksWrapper;
017:            AutolocksWrapper autolocksWrapper;
018:            NamedLocksWrapper namedLocksWrapper;
019:            TransientFieldsWrapper transientFieldsWrapper;
020:            InstrumentedClassesWrapper instrumentedClassesWrapper;
021:            IncludesWrapper includesWrapper;
022:            ExcludesWrapper excludesWrapper;
023:            DistributedMethodsWrapper distributedMethodsWrapper;
024:            AdditionalBootJarClassesWrapper additionalBootJarClassesWrapper;
025:
026:            public Object[] getChildren(Object parentElement) {
027:                if (parentElement instanceof  RootsWrapper) {
028:                    return ((RootsWrapper) parentElement).createRootWrappers();
029:                } else if (parentElement instanceof  TransientFieldsWrapper) {
030:                    return ((TransientFieldsWrapper) parentElement)
031:                            .createTransientFieldWrappers();
032:                } else if (parentElement instanceof  AdditionalBootJarClassesWrapper) {
033:                    return ((AdditionalBootJarClassesWrapper) parentElement)
034:                            .createBootClassWrappers();
035:                } else if (parentElement instanceof  DistributedMethodsWrapper) {
036:                    return ((DistributedMethodsWrapper) parentElement)
037:                            .createDistributedMethodWrappers();
038:                } else if (parentElement instanceof  LocksWrapper) {
039:                    LocksWrapper locks = (LocksWrapper) parentElement;
040:                    return new Object[] {
041:                            autolocksWrapper = new AutolocksWrapper(locks),
042:                            namedLocksWrapper = new NamedLocksWrapper(locks) };
043:                } else if (parentElement instanceof  InstrumentedClassesWrapper) {
044:                    InstrumentedClassesWrapper ic = ((InstrumentedClassesWrapper) parentElement);
045:                    return new Object[] {
046:                            includesWrapper = new IncludesWrapper(ic),
047:                            excludesWrapper = new ExcludesWrapper(ic) };
048:                } else if (parentElement instanceof  AutolocksWrapper) {
049:                    return ((AutolocksWrapper) parentElement)
050:                            .createAutolockWrappers();
051:                } else if (parentElement instanceof  NamedLocksWrapper) {
052:                    return ((NamedLocksWrapper) parentElement)
053:                            .createNamedLockWrappers();
054:                } else if (parentElement instanceof  IncludesWrapper) {
055:                    return ((IncludesWrapper) parentElement)
056:                            .createIncludeWrappers();
057:                } else if (parentElement instanceof  ExcludesWrapper) {
058:                    return ((ExcludesWrapper) parentElement)
059:                            .createExcludeWrappers();
060:                }
061:
062:                return null;
063:            }
064:
065:            public Object getParent(Object element) {
066:                return null;
067:            }
068:
069:            public boolean hasChildren(Object element) {
070:                return element instanceof  TreeRoot
071:                        || element instanceof  RootsWrapper
072:                        && ((RootsWrapper) element).sizeOfRootArray() > 0
073:                        || element instanceof  LocksWrapper
074:                        || element instanceof  AutolocksWrapper
075:                        && ((AutolocksWrapper) element).sizeOfAutolockArray() > 0
076:                        || element instanceof  NamedLocksWrapper
077:                        && ((NamedLocksWrapper) element).sizeOfNamedLockArray() > 0
078:                        || element instanceof  InstrumentedClassesWrapper
079:                        || element instanceof  IncludesWrapper
080:                        && ((IncludesWrapper) element).sizeOfIncludeArray() > 0
081:                        || element instanceof  ExcludesWrapper
082:                        && ((ExcludesWrapper) element).sizeOfExcludeArray() > 0
083:                        || element instanceof  TransientFieldsWrapper
084:                        && ((TransientFieldsWrapper) element)
085:                                .sizeOfFieldNameArray() > 0
086:                        || element instanceof  AdditionalBootJarClassesWrapper
087:                        && ((AdditionalBootJarClassesWrapper) element)
088:                                .sizeOfIncludeArray() > 0
089:                        || element instanceof  DistributedMethodsWrapper
090:                        && ((DistributedMethodsWrapper) element)
091:                                .sizeOfMethodExpressionArray() > 0;
092:            }
093:
094:            public Object[] getElements(Object inputElement) {
095:                if (inputElement == TreeRoot.EMPTY_ROOT) {
096:                    return new Object[0];
097:                } else if (inputElement instanceof  TreeRoot) {
098:                    TcConfig config = ((TreeRoot) inputElement).getRoot();
099:                    if (config == null) {
100:                        return new Object[0];
101:                    } else {
102:                        Application app = config.getApplication();
103:                        if (app == null)
104:                            app = config.addNewApplication();
105:                        DsoApplication dsoApp = app.getDso();
106:                        if (dsoApp == null)
107:                            dsoApp = app.addNewDso();
108:
109:                        return new Object[] {
110:                                rootsWrapper = new RootsWrapper(dsoApp),
111:                                locksWrapper = new LocksWrapper(dsoApp),
112:                                transientFieldsWrapper = new TransientFieldsWrapper(
113:                                        dsoApp),
114:                                instrumentedClassesWrapper = new InstrumentedClassesWrapper(
115:                                        dsoApp),
116:                                distributedMethodsWrapper = new DistributedMethodsWrapper(
117:                                        dsoApp),
118:                                additionalBootJarClassesWrapper = new AdditionalBootJarClassesWrapper(
119:                                        dsoApp) };
120:                    }
121:                }
122:                return null;
123:            }
124:
125:            public void dispose() {
126:                /**/
127:            }
128:
129:            public void inputChanged(Viewer viewer, Object oldInput,
130:                    Object newInput) {
131:                /**/
132:            }
133:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.