root / tags / v2_0_0_Build_2051 / extensions / org.gvsig.installer / org.gvsig.installer.swing / org.gvsig.installer.swing.api / src / main / java / org / gvsig / installer / swing / api / execution / AbstractInstallPackageWizard.java @ 38753
History | View | Annotate | Download (3.73 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2010 {Prodevelop} {Task}
|
26 |
*/
|
27 |
|
28 |
package org.gvsig.installer.swing.api.execution; |
29 |
|
30 |
import java.io.File; |
31 |
import java.util.List; |
32 |
|
33 |
import org.gvsig.installer.lib.api.PackageInfo; |
34 |
import org.gvsig.installer.lib.api.execution.InstallPackageService; |
35 |
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException; |
36 |
import org.gvsig.installer.swing.api.wizard.AbstractInstallerWizard; |
37 |
|
38 |
/**
|
39 |
* <p>
|
40 |
* Wizard that is used to open a bundle file to install one or more packages in
|
41 |
* a valid gvSIG directory. This class receive a directory where gvSIG is
|
42 |
* installed and it allows to select from the user interface the packages to
|
43 |
* install.
|
44 |
* </p>
|
45 |
* <p>
|
46 |
* All the classes that inherit if this abstract class have to have a
|
47 |
* constructor with an argument of type {@link File}, that is the application
|
48 |
* directory.
|
49 |
* </p>
|
50 |
*
|
51 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a>
|
52 |
*/
|
53 |
public abstract class AbstractInstallPackageWizard extends |
54 |
AbstractInstallerWizard { |
55 |
|
56 |
private static final long serialVersionUID = -758246118332926598L; |
57 |
|
58 |
/**
|
59 |
* Constructor
|
60 |
*
|
61 |
* @see AbstractInstallerWizard#AbstractInstallerWizard(File, File)
|
62 |
*/
|
63 |
public AbstractInstallPackageWizard(File applicationFolder, |
64 |
File installFolder) {
|
65 |
super(applicationFolder, installFolder);
|
66 |
} |
67 |
|
68 |
/**
|
69 |
* If this method is selected the first window of the wizard is not visible
|
70 |
* and the installation process takes the installers form the default
|
71 |
* directory.
|
72 |
*
|
73 |
* @throws InstallPackageServiceException
|
74 |
* if there an error reading the default directory.
|
75 |
*/
|
76 |
public abstract void installFromDefaultDirectory() |
77 |
throws InstallPackageServiceException;
|
78 |
|
79 |
/**
|
80 |
* @return the installerExecutionService
|
81 |
*/
|
82 |
public abstract InstallPackageService getInstallerExecutionService(); |
83 |
|
84 |
/**
|
85 |
* @return the installersToInstall
|
86 |
*/
|
87 |
public abstract List<PackageInfo> getInstallersToInstall(); |
88 |
|
89 |
public abstract void setNextButtonEnabled(boolean isEnabled); |
90 |
|
91 |
public abstract void setFinishButtonVisible(boolean isVisible); |
92 |
|
93 |
public abstract void setCancelButtonEnabled(boolean isEnabled); |
94 |
|
95 |
public abstract void setBackButtonEnabled(boolean isEnabled); |
96 |
|
97 |
/**
|
98 |
* It will ask the user to select the installation mode to Typical or
|
99 |
* Advanced.
|
100 |
*
|
101 |
* @param askIt
|
102 |
* True or False if the option will be shown to the user or not.
|
103 |
*/
|
104 |
public abstract void setAskTypicalOrCustom(boolean askIt); |
105 |
|
106 |
/**
|
107 |
* To know if the question is set to be shown or not.
|
108 |
*
|
109 |
* @return True if the question is set to be shown or false if not.
|
110 |
*/
|
111 |
public abstract boolean getAskTypicalOrCustom(); |
112 |
|
113 |
public abstract void setSelectDefaultPackages(boolean isActivated); |
114 |
|
115 |
public abstract boolean getSelectDefaultPackages(); |
116 |
|
117 |
|
118 |
public boolean needsToRestartApplicationAfterFinish() { |
119 |
// installers need to restart
|
120 |
return true; |
121 |
} |
122 |
|
123 |
} |