Source Code Cross Referenced for ActionBase.java in  » Installer » IzPack » com » izforge » izpack » event » 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 » Installer » IzPack » com.izforge.izpack.event 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
003:         * 
004:         * http://izpack.org/
005:         * http://izpack.codehaus.org/
006:         * 
007:         * Copyright 2004 Klaus Bartz 
008:         * 
009:         * Licensed under the Apache License, Version 2.0 (the "License");
010:         * you may not use this file except in compliance with the License.
011:         * You may obtain a copy of the License at
012:         * 
013:         *     http://www.apache.org/licenses/LICENSE-2.0
014:         *     
015:         * Unless required by applicable law or agreed to in writing, software
016:         * distributed under the License is distributed on an "AS IS" BASIS,
017:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018:         * See the License for the specific language governing permissions and
019:         * limitations under the License.
020:         */
021:
022:        package com.izforge.izpack.event;
023:
024:        import java.io.Serializable;
025:        import java.util.HashSet;
026:
027:        /**
028:         * Base class for action classes like AntAction.
029:         * 
030:         * @author Klaus Bartz
031:         * 
032:         */
033:        public class ActionBase implements  Serializable {
034:
035:            // --- String constants for parsing the XML specification -----------------
036:            // --- These definitions are placed here because the const strings are -----
037:            // --- used by more than one InstallerListener and UninstallerListener -----
038:            // --- class. --------------------------------------------------------------
039:
040:            private static final long serialVersionUID = 3690478013149884728L;
041:
042:            public static final String PACK = "pack";
043:
044:            public static final String NAME = "name";
045:
046:            // Order related "symbols"
047:            public static final String ORDER = "order";
048:
049:            public static final String BEFOREPACK = "beforepack";
050:
051:            public static final String AFTERPACK = "afterpack";
052:
053:            public static final String BEFOREPACKS = "beforepacks";
054:
055:            public static final String AFTERPACKS = "afterpacks";
056:
057:            public static final String UNINSTALL_ORDER = "uninstall_order";
058:
059:            public static final String BEFOREDELETION = "beforedeletion";
060:
061:            public static final String AFTERDELETION = "afterdeletion";
062:
063:            public static final String PROPERTY = "property";
064:
065:            public static final String VALUE = "value";
066:
067:            public static final String YES = "yes";
068:
069:            public static final String NO = "no";
070:
071:            public static final String FALSE = "false";
072:
073:            public static final String TRUE = "true";
074:
075:            public static final String QUIET = "quiet";
076:
077:            public static final String VERBOSE = "verbose";
078:
079:            public static final String LOGFILE = "logfile";
080:
081:            public static final String BUILDFILE = "buildfile";
082:
083:            public static final String PROPERTYFILE = "propertyfile";
084:
085:            public static final String PATH = "path";
086:
087:            public static final String SRCDIR = "srcdir";
088:
089:            public static final String TARGETDIR = "targetdir";
090:
091:            public static final String TARGET = "target";
092:
093:            public static final String UNINSTALL_TARGET = "uninstall_target";
094:
095:            public static final String ACTION = "action";
096:
097:            public static final String UNINSTALL_ACTION = "uninstall_action";
098:
099:            public static final String ONDEST = "ondestination";
100:
101:            public static final String COPY = "copy";
102:
103:            public static final String REMOVE = "remove";
104:
105:            public static final String REWIND = "rewind";
106:
107:            public static final String TOUCH = "touch";
108:
109:            public static final String MOVE = "move";
110:
111:            public static final String OVERRIDE = "override";
112:
113:            public static final String UPDATE = "update";
114:
115:            public static final String NOTHING = "nothing";
116:
117:            public static final String FILESET = "fileset";
118:
119:            public static final String MESSAGEID = "messageid";
120:
121:            public static final String INCLUDE = "include";
122:
123:            public static final String INCLUDES = "includes";
124:
125:            public static final String EXCLUDE = "exclude";
126:
127:            public static final String EXCLUDES = "excludes";
128:
129:            public static final String OS = "os";
130:
131:            public static final String FAMILY = "family";
132:
133:            public static final String VERSION = "version";
134:
135:            public static final String ARCH = "arch";
136:
137:            public static final String CASESENSITIVE = "casesensitive";
138:
139:            public static final String UNIX = "unix";
140:
141:            public static final String WINDOWS = "windows";
142:
143:            public static final String MAC = "mac";
144:
145:            public static final String ASKTRUE = "asktrue";
146:
147:            public static final String ASKFALSE = "askfalse";
148:
149:            private static final HashSet<String> installOrders = new HashSet<String>();
150:
151:            private static final HashSet<String> uninstallOrders = new HashSet<String>();
152:
153:            protected String uninstallOrder = ActionBase.BEFOREDELETION;
154:
155:            protected String order = null;
156:
157:            protected String messageID = null;
158:
159:            static {
160:                installOrders.add(ActionBase.BEFOREPACK);
161:                installOrders.add(ActionBase.AFTERPACK);
162:                installOrders.add(ActionBase.BEFOREPACKS);
163:                installOrders.add(ActionBase.AFTERPACKS);
164:                uninstallOrders.add(ActionBase.BEFOREDELETION);
165:                uninstallOrders.add(ActionBase.AFTERDELETION);
166:            }
167:
168:            /**
169:             * Default constructor
170:             */
171:            public ActionBase() {
172:                super ();
173:            }
174:
175:            /**
176:             * Returns the order.
177:             * 
178:             * @return the order
179:             */
180:            public String getOrder() {
181:                return order;
182:            }
183:
184:            /**
185:             * Sets the order to the given string. Valid values are "beforepacks", "beforepack", "afterpack"
186:             * and "afterpacks".
187:             * 
188:             * @param order order to be set
189:             */
190:            public void setOrder(String order) throws Exception {
191:                if (!installOrders.contains(order))
192:                    throw new Exception("Bad value for order.");
193:                this .order = order;
194:            }
195:
196:            /**
197:             * Returns the order for uninstallation.
198:             * 
199:             * @return the order for uninstallation
200:             */
201:            public String getUninstallOrder() {
202:                return uninstallOrder;
203:            }
204:
205:            /**
206:             * Sets the order to the given string for uninstallation. Valid values are "beforedeletion" and
207:             * "afterdeletion".
208:             * 
209:             * @param order order to be set
210:             */
211:            public void setUninstallOrder(String order) throws Exception {
212:                if (!uninstallOrders.contains(order))
213:                    throw new Exception("Bad value for order.");
214:                this .uninstallOrder = order;
215:            }
216:
217:            /**
218:             * Returns the defined message ID for this action.
219:             * 
220:             * @return the defined message ID
221:             */
222:            public String getMessageID() {
223:                return messageID;
224:            }
225:
226:            /**
227:             * Sets the message ID to the given string.
228:             * 
229:             * @param string string to be used as message ID
230:             */
231:            public void setMessageID(String string) {
232:                messageID = string;
233:            }
234:
235:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.