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
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
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 3
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
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
}