Source Code Cross Referenced for EnvEntryProcessor.java in  » Workflow-Engines » osbl-1_0 » core » 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 » Workflow Engines » osbl 1_0 » core 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * 
003:         */package core;
004:
005:        import gui.section.IEnvEntryViewer;
006:
007:        import java.util.Set;
008:
009:        import org.eclipse.core.runtime.CoreException;
010:        import org.eclipse.core.runtime.IProgressMonitor;
011:        import org.eclipse.core.runtime.OperationCanceledException;
012:        import org.eclipse.ltk.core.refactoring.Change;
013:        import org.eclipse.ltk.core.refactoring.CompositeChange;
014:        import org.eclipse.ltk.core.refactoring.RefactoringStatus;
015:        import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
016:        import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
017:        import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
018:        import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
019:
020:        import diagram.section.EnvEntry;
021:
022:        /** <p>The processor is where the work is delegated to if participants are 
023:         * involved. The processor loads the participants and manages the lifecycle
024:         * of the refactoring. In order to do that, the refactoring entry point 
025:         * methods must be implemented.</p>
026:         *
027:         * @author sh
028:         */
029:        public class EnvEntryProcessor extends RefactoringProcessor {
030:
031:            // the info object containing all necesary info for the refactoring
032:            private final RefactorInfo info;
033:
034:            // the delegate object which does all the refactoring work
035:            private final EnvEntryDelegate delegate;
036:
037:            /**
038:             * Constructor
039:             * 
040:             * @param info the refactoring info object 
041:             * @param envEntry the selected environment entry to change
042:             * @param changeListeners the Listeners which listen to envEntry changes
043:             */
044:            public EnvEntryProcessor(final RefactorInfo info,
045:                    final EnvEntry envEntry,
046:                    final Set<IEnvEntryViewer> changeListeners) {
047:                this .info = info;
048:                // FIXME
049:                // the viewer set and the envEntry is needed to execute the table model update
050:                // after an environment entry has changed. It will be
051:                // transmitted from the EnvEntryList, to RefactorEnvEntryAction,
052:                // to EnvEntryProcessor and finally to EnvEntryDelegate where the
053:                // update will be performed.
054:                delegate = new EnvEntryDelegate(info, envEntry, changeListeners);
055:            }
056:
057:            /* 
058:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getElements()
059:             */
060:            @Override
061:            public Object[] getElements() {
062:                // usually, this would be some element object in the object model on which
063:                // we work (e.g. a Java element if we were in the Java Model); in this case 
064:                // we have only the property name
065:
066:                return new Object[] { info.getOldName() };
067:            }
068:
069:            /* 
070:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getIdentifier()
071:             */
072:            @Override
073:            public String getIdentifier() {
074:                return getClass().getName();
075:            }
076:
077:            /* 
078:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getProcessorName()
079:             */
080:            @Override
081:            public String getProcessorName() {
082:                return "Refactor Environment Entry";
083:            }
084:
085:            /* 
086:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#isApplicable()
087:             */
088:            @Override
089:            public boolean isApplicable() throws CoreException {
090:                return true;
091:            }
092:
093:            /* 
094:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#checkInitialConditions(org.eclipse.core.runtime.IProgressMonitor)
095:             */
096:            @Override
097:            public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
098:                    throws CoreException, OperationCanceledException {
099:                return delegate.checkInitialConditions();
100:            }
101:
102:            /* (non-Javadoc)
103:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#checkFinalConditions(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
104:             */
105:            @Override
106:            public RefactoringStatus checkFinalConditions(IProgressMonitor pm,
107:                    CheckConditionsContext context) throws CoreException,
108:                    OperationCanceledException {
109:                return delegate.checkFinalConditions(pm, context);
110:            }
111:
112:            /* 
113:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#createChange(org.eclipse.core.runtime.IProgressMonitor)
114:             */
115:            @Override
116:            public Change createChange(IProgressMonitor pm)
117:                    throws CoreException, OperationCanceledException {
118:
119:                CompositeChange result = new CompositeChange(getProcessorName());
120:                delegate.createChange(pm, result);
121:                return result;
122:            }
123:
124:            /* (non-Javadoc)
125:             * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#loadParticipants(org.eclipse.ltk.core.refactoring.RefactoringStatus, org.eclipse.ltk.core.refactoring.participants.SharableParticipants)
126:             */
127:            @Override
128:            public RefactoringParticipant[] loadParticipants(
129:                    RefactoringStatus status,
130:                    SharableParticipants sharedParticipants)
131:                    throws CoreException {
132:                // This would be the place to load the participants via the 
133:                // ParticipantManager and decide which of them are allowed to participate.
134:                return new RefactoringParticipant[0];
135:            }
136:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.