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 / SwingInstallerManager.java @ 40560

History | View | Annotate | Download (5.34 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;
30

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

    
36
import javax.swing.JPanel;
37

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

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

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

    
71
        /**
72
         * This method returns a class that is used to create an installer from a
73
         * gvSIG installation directory.
74
         * 
75
         * @return 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 installFolder)
81
                        throws MakePluginPackageWizardException;
82

    
83
        /**
84
         * Registers a class that implements a wizard to execte an installer to
85
         * install a set of plugins in a gvSIG installation directory.
86
         * 
87
         * @param clazz
88
         *            Class that inherits of the
89
         *            {@link AbstractInstallPackageWizard} 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 installer to
96
         * install a set of plugins in a gvSIG installation directory.
97
         * 
98
         * @return The wizard to execute an installer.
99
         * @throws InstallPackageWizardException
100
         *             If there is a problem creating the wizard.
101
         */
102
        public AbstractInstallPackageWizard createInstallPackageWizard(
103
                        File applicationDirectory, File installFolder)
104
                        throws InstallPackageWizardException;
105

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

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

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

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

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

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

    
152
        public JShowPackageStatusAndAskContinuePanel createJShowPackageStatusAndAskContinuePanel(
153
                        List<PackageInfo> packages, String message);
154

    
155
        public JPackageInfoPanel createPackageInfoPanel();
156

    
157
        public JOutputPanel createOutputPanel();
158

    
159
        public JProgressPanel createProgressPanel();
160

    
161
        public void setDefaultDownloadURL(String defaultDownloadURLs);
162

    
163
        public void setDefaultDownloadURL(File defaultDownloadURLs);
164

    
165
        public void addDefaultDownloadURL(URL url);
166

    
167
        public void addDefaultDownloadURL(String url) throws MalformedURLException;
168

    
169
        public List<URL> getDefaultDownloadURLs();
170
}