Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.installer / org.gvsig.installer.swing / org.gvsig.installer.swing.api / src / main / java / org / gvsig / installer / swing / api / SwingInstallerManager.java @ 37498

History | View | Annotate | Download (5.58 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;
29

    
30
import java.io.File;
31
import java.net.MalformedURLException;
32
import java.net.URL;
33
import java.util.List;
34

    
35
import javax.swing.JPanel;
36

    
37
import org.gvsig.installer.lib.api.InstallerManager;
38
import org.gvsig.installer.lib.api.PackageInfo;
39
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizard;
40
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizardException;
41
import org.gvsig.installer.swing.api.creation.JOutputPanel;
42
import org.gvsig.installer.swing.api.creation.JPackageInfoPanel;
43
import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard;
44
import org.gvsig.installer.swing.api.execution.InstallPackageWizardException;
45
import org.gvsig.installer.swing.api.execution.JShowPackageStatusAndAskContinuePanel;
46

    
47
/**
48
 * 
49
 * <p>
50
 * This manager is used to register and create the wizards that are used to
51
 * create and execute an installer. These wizards are classes that inherit of
52
 * {@link JPanel}.
53
 * </p>
54
 * 
55
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
56
 */
57
public interface SwingInstallerManager {
58

    
59
    /**
60
     * Registers a class that implements a wizard to create an installer
61
     * of a plugin from a gvSIG installation directory.
62
     * 
63
     * @param clazz
64
     *            Class that inherits of the {@link MakePluginPackageWizard}
65
     *            abstract class.
66
     */
67
    public void registerMakePluginPackageWizardInstallerCreationWizard(
68
        Class<? extends MakePluginPackageWizard> clazz);
69

    
70
    /**
71
     * This method returns a class that is used to create an
72
     * installer from a gvSIG installation directory.
73
     * 
74
     * @return
75
     *         The wizard to create an installer.
76
     * @throws MakePluginPackageWizardException
77
     *             If there is a problem creating the wizard.
78
     */
79
    public MakePluginPackageWizard createMakePluginPackageWizard(
80
        File applicationDirectory, File pluginsFolder, File installFolder)
81
        throws MakePluginPackageWizardException;
82

    
83
    /**
84
     * Registers a class that implements a wizard to execte an installer
85
     * to install a set of plugins in a gvSIG installation directory.
86
     * 
87
     * @param clazz
88
     *            Class that inherits of the {@link AbstractInstallPackageWizard}
89
     *            abstract class.
90
     */
91
    public void registerInstallPackageWizard(
92
        Class<? extends AbstractInstallPackageWizard> clazz);
93

    
94
    /**
95
     * This method returns a class that is used to execute an
96
     * installer to install a set of plugins in a gvSIG installation directory.
97
     * 
98
     * @return
99
     *         The wizard to execute an installer.
100
     * @throws InstallPackageWizardException
101
     *             If there is a problem creating the wizard.
102
     */
103
    public AbstractInstallPackageWizard createInstallPackageWizard(
104
        File applicationDirectory, File pluginsFolder, File installFolder)
105
        throws InstallPackageWizardException;
106

    
107
    /**
108
     * Returns the current application version.
109
     * 
110
     * @return the current application version
111
     */
112
    public String getApplicationVersion();
113

    
114
    /**
115
     * Sets the current application version.
116
     * 
117
     * @param gvSIGVersion
118
     *            the current application version
119
     */
120
    public void setApplicationVersion(String gvSIGVersion);
121

    
122
    /**
123
     * Returns the default URL to download packages from.
124
     * 
125
     * @return the default URL to download packages from
126
     */
127
    public URL getDefaultDownloadURL();
128

    
129
    /**
130
     * Sets the default URL to download packages from
131
     * 
132
     * @param defaultDownloadURL
133
     *            the default URL to download packages from
134
     */
135
    public void setDefaultDownloadURL(URL defaultDownloadURL);
136

    
137
    /**
138
     * Translate a key in a text using the current application language
139
     * 
140
     * @param key
141
     *            The key to translate
142
     * @return
143
     *         The translated key
144
     */
145
    public String getText(String key);
146

    
147
    /**
148
     * Returns a reference to the {@link InstallerManager}.
149
     * 
150
     * @return a reference to the {@link InstallerManager}
151
     */
152
    public InstallerManager getInstallerManager();
153

    
154
    public JShowPackageStatusAndAskContinuePanel createJShowPackageStatusAndAskContinuePanel(List<PackageInfo> packages, String message);
155
    
156
    public JPackageInfoPanel createPackageInfoPanel();
157
    public JOutputPanel createOutputPanel();
158
    public JProgressPanel createProgressPanel() ;
159
    
160
    public void setDefaultDownloadURL(String defaultDownloadURLs);
161

    
162
    public void setDefaultDownloadURL(File defaultDownloadURLs);
163

    
164
    public void addDefaultDownloadURL(URL url);
165
    
166
    public List<URL>getDefaultDownloadURLs();
167
}