Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.installer / org.gvsig.installer.swing / org.gvsig.installer.swing.api / src / main / java / org / gvsig / installer / swing / api / execution / AbstractInstallPackageWizard.java @ 40560

History | View | Annotate | Download (3.77 KB)

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