Source Code Cross Referenced for ANTTaskEnvironment.java in  » Code-Analyzer » beautyJ » de » gulden » framework » amoda » environment » ant » 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 » Code Analyzer » beautyJ » de.gulden.framework.amoda.environment.ant 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Project: AMODA - Abstract Modeled Application
003:         * Class:   de.gulden.framework.amoda.environment.ant.ANTTaskEnvironment
004:         * Version: snapshot-beautyj-1.1
005:         *
006:         * Date:    2004-09-29
007:         *
008:         * This is a snapshot version of the AMODA 0.2 development branch,
009:         * it is not released as a seperate version.
010:         * For AMODA, see http://amoda.berlios.de/.
011:         *  
012:         * This is licensed under the GNU Lesser General Public License (LGPL)
013:         * and comes with NO WARRANTY.
014:         *
015:         * Author:  Jens Gulden
016:         * Email:   amoda@jensgulden.de
017:         */
018:
019:        package de.gulden.framework.amoda.environment.ant;
020:
021:        import de.gulden.framework.amoda.environment.commandline.*;
022:        import de.gulden.framework.amoda.generic.core.*;
023:        import de.gulden.framework.amoda.model.core.*;
024:        import de.gulden.framework.amoda.model.data.*;
025:        import de.gulden.framework.amoda.model.data.Value;
026:        import de.gulden.framework.amoda.model.interaction.*;
027:        import java.lang.*;
028:        import java.util.*;
029:
030:        /**
031:         * Class ANTTaskEnvironment.
032:         *  
033:         * @author  Jens Gulden
034:         * @version  snapshot-beautyj-1.1
035:         */
036:        public class ANTTaskEnvironment extends
037:                CommandLineApplicationEnvironment {
038:
039:            // ------------------------------------------------------------------------
040:            // --- fields                                                           ---
041:            // ------------------------------------------------------------------------
042:
043:            protected List inputValues = new ArrayList();
044:
045:            protected ANTTaskApplicationWrapper taskWrapper;
046:
047:            // ------------------------------------------------------------------------
048:            // --- methods                                                          ---
049:            // ------------------------------------------------------------------------
050:
051:            public ANTTaskApplicationWrapper getTaskWrapper() {
052:                return taskWrapper;
053:            }
054:
055:            public void setTaskWrapper(
056:                    ANTTaskApplicationWrapper aNTTaskApplicationWrapper) {
057:                if (this .taskWrapper != aNTTaskApplicationWrapper) {
058:                    this .taskWrapper = aNTTaskApplicationWrapper;
059:                    if (aNTTaskApplicationWrapper != null)
060:                        aNTTaskApplicationWrapper.setEnvironment(this );
061:                }
062:            }
063:
064:            public ArgsParser createArgsParser() {
065:                return null;
066:            }
067:
068:            public void launch(Application application) {
069:                GenericApplication genericApplication = (GenericApplication) application; // application must be of type GenericApplication
070:                setGenericApplication(genericApplication);
071:                // everything has been initialized before through called from ANT, so directly launch now
072:                try {
073:                    launchAfterInit(genericApplication);
074:                } catch (Throwable t) {
075:                    getGenericApplication().fatalError(t);
076:                }
077:            }
078:
079:            public void doErrorMessage(ErrorMessage msg) {
080:                if (msg.exitApplication()) {
081:                    Throwable t = msg.getCause();
082:                    if (t != null) {
083:                        throw new org.apache.tools.ant.BuildException(msg
084:                                .getText()
085:                                + " - " + t.getMessage(), t);
086:                    } else {
087:                        throw new org.apache.tools.ant.BuildException(msg
088:                                .getText());
089:                    }
090:                } else {
091:                    getTaskWrapper().log(msg.getText(),
092:                            org.apache.tools.ant.Project.MSG_ERR);
093:                }
094:            }
095:
096:            public Value[] getInputValues() {
097:                de.gulden.framework.amoda.generic.data.GenericValue[] v = new de.gulden.framework.amoda.generic.data.GenericValue[inputValues
098:                        .size()];
099:                for (int i = 0; i < v.length; i++) {
100:                    v[i] = new de.gulden.framework.amoda.generic.data.GenericValue();
101:                    Object o = inputValues.get(i);
102:                    if (o instanceof  Src) { // <src path="..."/>
103:                        v[i].setType(java.io.File.class);
104:                        v[i].set(((Src) o).getPath());
105:                    } else if (o instanceof  de.gulden.framework.amoda.environment.ant.Value) { // <value input="..."/>
106:                        v[i].setType(String.class);
107:                        v[i]
108:                                .set(((de.gulden.framework.amoda.environment.ant.Value) o)
109:                                        .getInput());
110:                    }
111:                }
112:                return v;
113:            }
114:
115:            void addInput(Object input) {
116:                // All inner tags of the ANT-wrapped application are considered to be input values from AMODA's point of view
117:                // currently, input can be of type "Src" or "Value", which mean any AMODA application running in ANT
118:                // can have <src path=".."> or <value input=".."> tags as children.
119:                inputValues.add(input);
120:                /*
121:                de.gulden.framework.amoda.model.data.Value[] oldV = getInputValues();
122:                de.gulden.framework.amoda.model.data.Value[] v;
123:                if (oldV != null) {
124:                    v = new de.gulden.framework.amoda.model.data.Value[ oldV.length + 1 ];
125:                    System.arraycopy(oldV, 0, v, 0, oldV.length);
126:                } else {
127:                    v = new de.gulden.framework.amoda.model.data.Value[1];
128:                }
129:                v[v.length-1] = value;
130:                setInputValues(v);*/
131:            }
132:
133:        } // end ANTTaskEnvironment
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.