Source Code Cross Referenced for FrontEndViewLogicImpl.java in  » UML » AndroMDA-3.2 » org » andromda » metafacades » emf » uml2 » 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 » UML » AndroMDA 3.2 » org.andromda.metafacades.emf.uml2 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.andromda.metafacades.emf.uml2;
002:
003:        import java.util.ArrayList;
004:        import java.util.Collection;
005:        import java.util.Iterator;
006:        import java.util.LinkedHashMap;
007:        import java.util.List;
008:        import java.util.Map;
009:
010:        import org.andromda.metafacades.uml.ActivityGraphFacade;
011:        import org.andromda.metafacades.uml.EventFacade;
012:        import org.andromda.metafacades.uml.FrontEndAction;
013:        import org.andromda.metafacades.uml.FrontEndUseCase;
014:        import org.andromda.metafacades.uml.ModelElementFacade;
015:        import org.andromda.metafacades.uml.StateMachineFacade;
016:        import org.andromda.metafacades.uml.TransitionFacade;
017:        import org.andromda.metafacades.uml.UMLProfile;
018:        import org.andromda.metafacades.uml.UseCaseFacade;
019:
020:        /**
021:         * MetafacadeLogic implementation for org.andromda.metafacades.uml.FrontEndView.
022:         *
023:         * @see org.andromda.metafacades.uml.FrontEndView
024:         */
025:        public class FrontEndViewLogicImpl extends FrontEndViewLogic {
026:            public FrontEndViewLogicImpl(final Object metaObject,
027:                    final String context) {
028:                super (metaObject, context);
029:            }
030:
031:            /**
032:             * @see org.andromda.metafacades.uml.FrontEndView#isFrontEndView()
033:             */
034:            protected boolean handleIsFrontEndView() {
035:                return this .hasStereotype(UMLProfile.STEREOTYPE_FRONT_END_VIEW);
036:            }
037:
038:            /**
039:             * @see org.andromda.metafacades.uml.FrontEndView#getActions()
040:             */
041:            protected List handleGetActions() {
042:                final List actions = new ArrayList();
043:                final Collection outgoing = this .getOutgoing();
044:                for (final Iterator iterator = outgoing.iterator(); iterator
045:                        .hasNext();) {
046:                    final Object object = iterator.next();
047:                    if (object instanceof  FrontEndAction) {
048:                        actions.add(object);
049:                    }
050:                }
051:                return actions;
052:            }
053:
054:            /**
055:             * @see org.andromda.metafacades.uml.FrontEndView#getUseCase()
056:             */
057:            protected Object handleGetUseCase() {
058:                UseCaseFacade useCase = null;
059:                final StateMachineFacade graphContext = this .getStateMachine();
060:                if (graphContext instanceof  ActivityGraphFacade) {
061:                    useCase = ((ActivityGraphFacade) graphContext).getUseCase();
062:                    if (!(useCase instanceof  FrontEndUseCase)) {
063:                        useCase = null;
064:                    }
065:                }
066:                return useCase;
067:            }
068:
069:            /**
070:             * Override to create the package of the view.
071:             *
072:             * @see org.andromda.metafacades.emf.uml2.ModelElementFacadeLogic#handleGetPackageName()
073:             */
074:            public String handleGetPackageName() {
075:                String packageName = null;
076:                final StateMachineFacade graphContext = this .getStateMachine();
077:
078:                // TODO: Why not use getUseCase ?
079:                if (graphContext instanceof  ActivityGraphFacade) {
080:                    final UseCaseFacade graphUseCase = ((ActivityGraphFacade) graphContext)
081:                            .getUseCase();
082:                    if (graphUseCase instanceof  FrontEndUseCase) {
083:                        final FrontEndUseCase useCase = (FrontEndUseCase) graphUseCase;
084:                        packageName = useCase.getPackageName();
085:                    }
086:                }
087:                return packageName;
088:            }
089:
090:            /**
091:             * @see org.andromda.metafacades.uml.FrontEndView#getVariables()
092:             */
093:            protected List handleGetVariables() {
094:                final Map variablesMap = new LinkedHashMap();
095:                final Collection incoming = this .getIncoming();
096:                for (final Iterator iterator = incoming.iterator(); iterator
097:                        .hasNext();) {
098:                    final TransitionFacade transition = (TransitionFacade) iterator
099:                            .next();
100:                    final EventFacade trigger = transition.getTrigger();
101:                    if (trigger != null) {
102:                        for (final Iterator parameterIterator = trigger
103:                                .getParameters().iterator(); parameterIterator
104:                                .hasNext();) {
105:                            final ModelElementFacade modelElement = (ModelElementFacade) parameterIterator
106:                                    .next();
107:                            variablesMap.put(modelElement.getName(),
108:                                    modelElement);
109:                        }
110:                    }
111:                }
112:                return new ArrayList(variablesMap.values());
113:            }
114:
115:            /**
116:             * @see org.andromda.metafacades.uml.FrontEndView#getAllActionParameters()
117:             */
118:            protected List handleGetAllActionParameters() {
119:                final List actionParameters = new ArrayList();
120:                final Collection actions = this .getActions();
121:                for (final Iterator iterator = actions.iterator(); iterator
122:                        .hasNext();) {
123:                    final FrontEndAction action = (FrontEndAction) iterator
124:                            .next();
125:                    actionParameters.addAll(action.getParameters());
126:                }
127:                return actionParameters;
128:            }
129:
130:            /**
131:             * @see org.andromda.metafacades.uml.FrontEndView#getAllFormFields()
132:             */
133:            protected List handleGetAllFormFields() {
134:                final List actionParameters = new ArrayList();
135:                final Collection actions = this .getActions();
136:                for (final Iterator iterator = actions.iterator(); iterator
137:                        .hasNext();) {
138:                    final FrontEndAction action = (FrontEndAction) iterator
139:                            .next();
140:                    actionParameters.addAll(action.getParameters());
141:                }
142:                return actionParameters;
143:            }
144:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.