root / import / ext3D / trunk / install-extension3d / IzPack / src / lib / com / izforge / izpack / CustomData.java @ 15280
History | View | Annotate | Download (4.04 KB)
1 | 15280 | rgaitan | /*
|
---|---|---|---|
2 | * $Id: CustomData.java,v 1.1 2006/06/14 07:29:07 cesar Exp $
|
||
3 | * IzPack
|
||
4 | * Copyright (C) 2004 Klaus Bartz
|
||
5 | *
|
||
6 | * File : CustomData.java
|
||
7 | * Description : Custom data description.
|
||
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; |
||
27 | |||
28 | import java.io.Serializable; |
||
29 | import java.util.List; |
||
30 | |||
31 | /**
|
||
32 | * <p>Container for serialized custom data</p>
|
||
33 | *
|
||
34 | * @author Klaus Bartz
|
||
35 | *
|
||
36 | */
|
||
37 | public class CustomData implements Serializable |
||
38 | { |
||
39 | /** Identifier for custom data typ "installer listener". */
|
||
40 | public static final int INSTALLER_LISTENER = 0; |
||
41 | /** Identifier for custom data typ "uninstaller listener". */
|
||
42 | public static final int UNINSTALLER_LISTENER = 1; |
||
43 | /** Identifier for custom data typ "uninstaller lib".
|
||
44 | * This is used for binary libs (DLLs or SHLs or SOs or ...) which
|
||
45 | * will be needed from the uninstaller.
|
||
46 | */
|
||
47 | public static final int UNINSTALLER_LIB = 2; |
||
48 | |||
49 | /** Identifier for custom data typ "uninstaller jar files". */
|
||
50 | public static final int UNINSTALLER_JAR = 3; |
||
51 | |||
52 | |||
53 | /** The contens of the managed custom data. If it is a listener or
|
||
54 | * a uninstaller jar, all contained files are listed with it
|
||
55 | * complete sub path. If it is a uninstaller native
|
||
56 | * library, this value is the path in the installer jar.
|
||
57 | */
|
||
58 | public List contents; |
||
59 | |||
60 | /** Full qualified name of the managed listener. If type
|
||
61 | * is not a listener, this value is undefined.
|
||
62 | */
|
||
63 | public String listenerName; |
||
64 | |||
65 | /** The target operation system of this custom action */
|
||
66 | public List osConstraints = null; |
||
67 | |||
68 | /** Type of this custom action data; possible are
|
||
69 | * INSTALLER_LISTENER, UNINSTALLER_LISTENER, UNINSTALLER_LIB
|
||
70 | * and UNINSTALLER_JAR.
|
||
71 | */
|
||
72 | public int type = 0; |
||
73 | |||
74 | |||
75 | /**
|
||
76 | * Constructs an CustomData object with the needed values.
|
||
77 | * The list names contains all full qualified class names which are
|
||
78 | * needed by the custom action or contained in the jar file.
|
||
79 | * At custom actions the first entry is the custom action self.
|
||
80 | * @param names custom action data names (full qualified class name or library name)
|
||
81 | * @param osConstraints target operation system of this custom action
|
||
82 | * @param type type of this custom data
|
||
83 | public CustomData(List names, List osConstraints, int type)
|
||
84 | {
|
||
85 | this.names = names;
|
||
86 | this.osConstraints = osConstraints;
|
||
87 | this.type = type;
|
||
88 | }
|
||
89 | */
|
||
90 | |||
91 | /**
|
||
92 | * Constructs an CustomData object with the needed values.
|
||
93 | * If a listener will be managed with this object, the full qualified
|
||
94 | * name of the listener self must be set as listener name.
|
||
95 | * If a listener or a jar file for uninstall will be managed, all
|
||
96 | * needed files (class, properties and so on) must be referenced
|
||
97 | * in the contents with the path which they have in the installer jar file.
|
||
98 | * @param listenerName path of the listener
|
||
99 | * @param contents also needed objects referenced with the path in install.jar
|
||
100 | * @param osConstraints target operation system of this custom action
|
||
101 | * @param type type of this custom data
|
||
102 | */
|
||
103 | public CustomData(String listenerName, List contents, List osConstraints, int type) |
||
104 | { |
||
105 | this.listenerName = listenerName;
|
||
106 | this.contents = contents;
|
||
107 | this.osConstraints = osConstraints;
|
||
108 | this.type = type;
|
||
109 | } |
||
110 | |||
111 | } |