Statistics
| Revision:

root / tags / v2_0_0_Build_2050 / extensions / org.gvsig.installer / org.gvsig.installer.swing / org.gvsig.installer.swing.api / src / main / java / org / gvsig / installer / swing / api / execution / AbstractInstallPackageWizard.java @ 38692

History | View | Annotate | Download (3.73 KB)

1 32269 jpiera
/* gvSIG. Geographic Information System of the Valencian Government
2 33729 cordinyana
 *
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 32269 jpiera
23
/*
24 33729 cordinyana
 * AUTHORS (In addition to CIT):
25
 * 2010 {Prodevelop}   {Task}
26
 */
27
28 32269 jpiera
package org.gvsig.installer.swing.api.execution;
29
30 32401 jpiera
import java.io.File;
31 34925 nfrancisco
import java.util.List;
32 32284 jpiera
33 34925 nfrancisco
import org.gvsig.installer.lib.api.PackageInfo;
34
import org.gvsig.installer.lib.api.execution.InstallPackageService;
35 32565 jpiera
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
36 32627 jpiera
import org.gvsig.installer.swing.api.wizard.AbstractInstallerWizard;
37 32401 jpiera
38 32269 jpiera
/**
39 32512 jpiera
 * <p>
40 33729 cordinyana
 * 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 32512 jpiera
 * </p>
45 32602 jpiera
 * <p>
46 33729 cordinyana
 * 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 32602 jpiera
 * directory.
49
 * </p>
50 32512 jpiera
 *
51 32269 jpiera
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
52
 */
53 35189 nfrancisco
public abstract class AbstractInstallPackageWizard extends
54 37599 nfrancisco
                AbstractInstallerWizard {
55 33729 cordinyana
56 37599 nfrancisco
        private static final long serialVersionUID = -758246118332926598L;
57 33729 cordinyana
58 37599 nfrancisco
        /**
59
         * Constructor
60
         *
61 37822 nfrancisco
         * @see AbstractInstallerWizard#AbstractInstallerWizard(File, File)
62 37599 nfrancisco
         */
63
        public AbstractInstallPackageWizard(File applicationFolder,
64 37822 nfrancisco
                        File installFolder) {
65
                super(applicationFolder, installFolder);
66 37599 nfrancisco
        }
67 33729 cordinyana
68 37599 nfrancisco
        /**
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 33729 cordinyana
79 37599 nfrancisco
        /**
80
         * @return the installerExecutionService
81
         */
82
        public abstract InstallPackageService getInstallerExecutionService();
83 34925 nfrancisco
84 37599 nfrancisco
        /**
85
         * @return the installersToInstall
86
         */
87
        public abstract List<PackageInfo> getInstallersToInstall();
88 34925 nfrancisco
89 37599 nfrancisco
        public abstract void setNextButtonEnabled(boolean isEnabled);
90 34925 nfrancisco
91 37599 nfrancisco
        public abstract void setFinishButtonVisible(boolean isVisible);
92 35189 nfrancisco
93 37599 nfrancisco
        public abstract void setCancelButtonEnabled(boolean isEnabled);
94 34925 nfrancisco
95 37599 nfrancisco
        public abstract void setBackButtonEnabled(boolean isEnabled);
96 34925 nfrancisco
97 37599 nfrancisco
        /**
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 35189 nfrancisco
106 37599 nfrancisco
        /**
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 35189 nfrancisco
113 37599 nfrancisco
        public abstract void setSelectDefaultPackages(boolean isActivated);
114 35189 nfrancisco
115 37599 nfrancisco
        public abstract boolean getSelectDefaultPackages();
116 38434 jldominguez
117
118
        public boolean needsToRestartApplicationAfterFinish() {
119
            // installers need to restart
120
            return true;
121
        }
122 37599 nfrancisco
123 32269 jpiera
}