root / import / ext3D / trunk / install-extension3d / IzPack / src / lib / com / izforge / izpack / event / UninstallerListener.java @ 15280
History | View | Annotate | Download (3.58 KB)
1 |
/*
|
---|---|
2 |
* $Id: UninstallerListener.java,v 1.1 2006/06/14 07:29:07 cesar Exp $
|
3 |
* IzPack
|
4 |
* Copyright (C) 2004 Klaus Bartz
|
5 |
*
|
6 |
* File : UninstallerListener.java
|
7 |
* Description : Custom action listener interface for uninstall time.
|
8 |
* Author's email : klaus.bartz@coi.de
|
9 |
* Author's Website : http://www.coi.de/
|
10 |
*
|
11 |
* This program is free software; you can redistribute it and/or
|
12 |
* modify it under the terms of the GNU General Public License
|
13 |
* as published by the Free Software Foundation; either version 2
|
14 |
* of the License, or any later version.
|
15 |
*
|
16 |
* This program is distributed in the hope that it will be useful,
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19 |
* GNU General Public License for more details.
|
20 |
*
|
21 |
* You should have received a copy of the GNU General Public License
|
22 |
* along with this program; if not, write to the Free Software
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
24 |
*/
|
25 |
|
26 |
package com.izforge.izpack.event; |
27 |
|
28 |
import java.io.File; |
29 |
import java.util.List; |
30 |
|
31 |
import com.izforge.izpack.util.AbstractUIProgressHandler; |
32 |
|
33 |
/**
|
34 |
* <p>Implementations of this class are used
|
35 |
* to handle customizing uninstallation.
|
36 |
* The defined methods are called from the destroyer at
|
37 |
* different, well defined points of uninstallation.</p>
|
38 |
*
|
39 |
* @author Klaus Bartz
|
40 |
*
|
41 |
*/
|
42 |
public interface UninstallerListener |
43 |
{ |
44 |
// ------------------------------------------------------------------------
|
45 |
// Constant Definitions
|
46 |
// ------------------------------------------------------------------------
|
47 |
public static final int BEFORE_DELETION = 1; |
48 |
public static final int AFTER_DELETION = 2; |
49 |
public static final int BEFORE_DELETE = 3; |
50 |
public static final int AFTER_DELETE = 4; |
51 |
|
52 |
/**
|
53 |
* This method will be called from the destroyer before
|
54 |
* the given files will be deleted.
|
55 |
* @param files all files which should be deleted
|
56 |
* @param handler a handler to the current used UIProgressHandler
|
57 |
* @throws Exception
|
58 |
*/
|
59 |
void beforeDeletion(List files, AbstractUIProgressHandler handler) |
60 |
throws Exception; |
61 |
|
62 |
/**
|
63 |
* Returns true if this listener would be informed at every
|
64 |
* delete operation, else false. If it is true, the listener will be called two
|
65 |
* times (before and after) of every action. Handle carefully, else
|
66 |
* performance problems are possible.
|
67 |
* @return true if this listener would be informed at every delete
|
68 |
* operation, else false
|
69 |
*/
|
70 |
boolean isFileListener();
|
71 |
|
72 |
/**
|
73 |
* This method will be called from the destroyer before
|
74 |
* the given file will be deleted.
|
75 |
* @param file file which should be deleted
|
76 |
* @param handler a handler to the current used UIProgressHandler
|
77 |
* @throws Exception
|
78 |
*/
|
79 |
void beforeDelete(File file, AbstractUIProgressHandler handler) |
80 |
throws Exception; |
81 |
/**
|
82 |
* This method will be called from the destroyer after
|
83 |
* the given file was deleted.
|
84 |
* @param file file which was just deleted
|
85 |
* @param handler a handler to the current used UIProgressHandler
|
86 |
* @throws Exception
|
87 |
*/
|
88 |
void afterDelete(File file, AbstractUIProgressHandler handler) |
89 |
throws Exception; |
90 |
/**
|
91 |
* This method will be called from the destroyer after
|
92 |
* the given files are deleted.
|
93 |
* @param files all files which where deleted
|
94 |
* @param handler a handler to the current used UIProgressHandler
|
95 |
* @throws Exception
|
96 |
*/
|
97 |
void afterDeletion(List files, AbstractUIProgressHandler handler) |
98 |
throws Exception; |
99 |
|
100 |
|
101 |
} |