Source Code Cross Referenced for UninstallData.java in  » Installer » IzPack » com » izforge » izpack » installer » 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.installer 
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:         * Licensed under the Apache License, Version 2.0 (the "License");
008:         * you may not use this file except in compliance with the License.
009:         * You may obtain a copy of the License at
010:         * 
011:         *     http://www.apache.org/licenses/LICENSE-2.0
012:         *     
013:         * Unless required by applicable law or agreed to in writing, software
014:         * distributed under the License is distributed on an "AS IS" BASIS,
015:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016:         * See the License for the specific language governing permissions and
017:         * limitations under the License.
018:         */
019:
020:        package com.izforge.izpack.installer;
021:
022:        import java.util.ArrayList;
023:        import java.util.HashMap;
024:        import java.util.List;
025:        import java.util.Map;
026:
027:        import com.izforge.izpack.ExecutableFile;
028:
029:        /**
030:         * Holds uninstallation data. Implemented as a singleton.
031:         * 
032:         * @author Julien Ponge created October 27, 2002
033:         */
034:        public class UninstallData {
035:            /** The uninstall data object. */
036:            private static UninstallData instance = null;
037:
038:            /** The installed files list. */
039:            private List<String> installedFilesList;
040:
041:            /** The uninstallable files list. */
042:            private List uninstallableFilesList;
043:
044:            /** The executables list. */
045:            private List executablesList;
046:
047:            /** The uninstaller jar filename. */
048:            private String uninstallerJarFilename;
049:
050:            /** The uninstaller path. */
051:            private String uninstallerPath;
052:
053:            /** Additional uninstall data like uninstaller listener list. */
054:            private Map<String, Object> additionalData;
055:
056:            /** Filesmap which should removed by the root user for another user */
057:            private String rootScript;
058:
059:            /** The constructor. */
060:            private UninstallData() {
061:                installedFilesList = new ArrayList<String>();
062:                uninstallableFilesList = new ArrayList();
063:                executablesList = new ArrayList();
064:                additionalData = new HashMap<String, Object>();
065:                rootScript = "";
066:            }
067:
068:            /** Constant RootFiles = "rootfiles" */
069:            public final static String ROOTSCRIPT = "rootscript";
070:
071:            /**
072:             * Returns the instance (it is a singleton).
073:             * 
074:             * @return The instance.
075:             */
076:            public synchronized static UninstallData getInstance() {
077:                if (instance == null)
078:                    instance = new UninstallData();
079:                return instance;
080:            }
081:
082:            /**
083:             * Adds a file to the data.
084:             * 
085:             * @param path The file to add.
086:             * @param uninstall If true, file must be uninstalled.
087:             */
088:            public synchronized void addFile(String path, boolean uninstall) {
089:                if (path != null) {
090:                    installedFilesList.add(path);
091:                    if (uninstall)
092:                        uninstallableFilesList.add(path);
093:                }
094:            }
095:
096:            /**
097:             * Returns the installed files list.
098:             * 
099:             * @return The installed files list.
100:             */
101:            public List<String> getInstalledFilesList() {
102:                return installedFilesList;
103:            }
104:
105:            /**
106:             * Returns the uninstallable files list.
107:             * 
108:             * @return The uninstallable files list.
109:             */
110:            public List getUninstalableFilesList() {
111:                return uninstallableFilesList;
112:            }
113:
114:            /**
115:             * Adds an executable to the data.
116:             * 
117:             * @param file The executable file.
118:             */
119:            public synchronized void addExecutable(ExecutableFile file) {
120:                executablesList.add(file);
121:            }
122:
123:            /**
124:             * Returns the executables list.
125:             * 
126:             * @return The executables list.
127:             */
128:            public List getExecutablesList() {
129:                return executablesList;
130:            }
131:
132:            /**
133:             * Returns the uninstaller jar filename.
134:             * 
135:             * @return The uninstaller jar filename.
136:             */
137:            public synchronized String getUninstallerJarFilename() {
138:                return uninstallerJarFilename;
139:            }
140:
141:            /**
142:             * Sets the uninstaller jar filename.
143:             * 
144:             * @param name The uninstaller jar filename.
145:             */
146:            public synchronized void setUninstallerJarFilename(String name) {
147:                uninstallerJarFilename = name;
148:            }
149:
150:            /**
151:             * Returns the path to the uninstaller.
152:             * 
153:             * @return The uninstaller filename path.
154:             */
155:            public String getUninstallerPath() {
156:                return uninstallerPath;
157:            }
158:
159:            /**
160:             * Sets the uninstaller path.
161:             * 
162:             * @param path The uninstaller path.
163:             */
164:            public void setUninstallerPath(String path) {
165:                uninstallerPath = path;
166:            }
167:
168:            /**
169:             * Returns additional uninstall data like uninstaller listener list.
170:             * 
171:             * @return additional uninstall data
172:             */
173:            public Map<String, Object> getAdditionalData() {
174:                return additionalData;
175:            }
176:
177:            /**
178:             * Sets additional uninstall data like uninstaller listener list.
179:             * 
180:             * @param name key for the additional uninstall data
181:             * @param value the additional uninstall data
182:             */
183:            public void addAdditionalData(String name, Object value) {
184:                additionalData.put(name, value);
185:            }
186:
187:            /**
188:             * Adds the given File to delete several Shortcuts as Root for the given Users.
189:             * 
190:             * @param aRootUninstallScript The Script to exec as Root at uninstall.
191:             */
192:            public void addRootUninstallScript(String aRootUninstallScript) {
193:                rootScript = aRootUninstallScript == null ? ""
194:                        : aRootUninstallScript;
195:            }
196:
197:            /**
198:             * Returns the root data.
199:             * 
200:             * @return root data
201:             */
202:            public String getRootScript() {
203:                return rootScript;
204:            }
205:
206:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.