Statistics
| Revision:

root / 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 @ 37822

History | View | Annotate | Download (5.18 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.URL;
32
import java.util.List;
33

    
34
import javax.swing.JPanel;
35

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

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

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

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

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

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

    
104
        /**
105
         * Returns the current application version.
106
         * 
107
         * @return the current application version
108
         */
109
        public String getApplicationVersion();
110

    
111
        /**
112
         * Sets the current application version.
113
         * 
114
         * @param gvSIGVersion
115
         *            the current application version
116
         */
117
        public void setApplicationVersion(String gvSIGVersion);
118

    
119
        /**
120
         * Returns the default URL to download packages from.
121
         * 
122
         * @return the default URL to download packages from
123
         */
124
        public URL getDefaultDownloadURL();
125

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

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

    
143
        /**
144
         * Returns a reference to the {@link InstallerManager}.
145
         * 
146
         * @return a reference to the {@link InstallerManager}
147
         */
148
        public InstallerManager getInstallerManager();
149

    
150
        public JShowPackageStatusAndAskContinuePanel createJShowPackageStatusAndAskContinuePanel(
151
                        List<PackageInfo> packages, String message);
152

    
153
        public JPackageInfoPanel createPackageInfoPanel();
154

    
155
        public JOutputPanel createOutputPanel();
156

    
157
        public JProgressPanel createProgressPanel();
158

    
159
        public void setDefaultDownloadURL(String defaultDownloadURLs);
160

    
161
        public void setDefaultDownloadURL(File defaultDownloadURLs);
162

    
163
        public void addDefaultDownloadURL(URL url);
164

    
165
        public List<URL> getDefaultDownloadURLs();
166
}