root / tags / v2_0_0_Build_2052 / extensions / org.gvsig.installer / org.gvsig.installer.swing / org.gvsig.installer.swing.api / src / main / java / org / gvsig / installer / swing / api / SwingInstallerManager.java @ 38854
History | View | Annotate | Download (5.29 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á</a>
|
56 |
*/
|
57 |
public interface SwingInstallerManager { |
58 |
|
59 |
/**
|
60 |
* Registers a class that implements a wizard to create an installer of a
|
61 |
* 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 installer from a
|
72 |
* gvSIG installation directory.
|
73 |
*
|
74 |
* @return The wizard to create an installer.
|
75 |
* @throws MakePluginPackageWizardException
|
76 |
* If there is a problem creating the wizard.
|
77 |
*/
|
78 |
public MakePluginPackageWizard createMakePluginPackageWizard(
|
79 |
File applicationDirectory, File installFolder) |
80 |
throws MakePluginPackageWizardException;
|
81 |
|
82 |
/**
|
83 |
* Registers a class that implements a wizard to execte an installer to
|
84 |
* install a set of plugins in a gvSIG installation directory.
|
85 |
*
|
86 |
* @param clazz
|
87 |
* Class that inherits of the
|
88 |
* {@link AbstractInstallPackageWizard} abstract class.
|
89 |
*/
|
90 |
public void registerInstallPackageWizard( |
91 |
Class<? extends AbstractInstallPackageWizard> clazz); |
92 |
|
93 |
/**
|
94 |
* This method returns a class that is used to execute an installer to
|
95 |
* install a set of plugins in a gvSIG installation directory.
|
96 |
*
|
97 |
* @return The wizard to execute an installer.
|
98 |
* @throws InstallPackageWizardException
|
99 |
* If there is a problem creating the wizard.
|
100 |
*/
|
101 |
public AbstractInstallPackageWizard createInstallPackageWizard(
|
102 |
File applicationDirectory, File installFolder) |
103 |
throws InstallPackageWizardException;
|
104 |
|
105 |
/**
|
106 |
* Returns the current application version.
|
107 |
*
|
108 |
* @return the current application version
|
109 |
*/
|
110 |
public String getApplicationVersion(); |
111 |
|
112 |
/**
|
113 |
* Sets the current application version.
|
114 |
*
|
115 |
* @param gvSIGVersion
|
116 |
* the current application version
|
117 |
*/
|
118 |
public void setApplicationVersion(String gvSIGVersion); |
119 |
|
120 |
/**
|
121 |
* Returns the default URL to download packages from.
|
122 |
*
|
123 |
* @return the default URL to download packages from
|
124 |
*/
|
125 |
public URL getDefaultDownloadURL(); |
126 |
|
127 |
/**
|
128 |
* Sets the default URL to download packages from
|
129 |
*
|
130 |
* @param defaultDownloadURL
|
131 |
* the default URL to download packages from
|
132 |
*/
|
133 |
public void setDefaultDownloadURL(URL defaultDownloadURL); |
134 |
|
135 |
/**
|
136 |
* Translate a key in a text using the current application language
|
137 |
*
|
138 |
* @param key
|
139 |
* The key to translate
|
140 |
* @return The translated key
|
141 |
*/
|
142 |
public String getText(String key); |
143 |
|
144 |
/**
|
145 |
* Returns a reference to the {@link InstallerManager}.
|
146 |
*
|
147 |
* @return a reference to the {@link InstallerManager}
|
148 |
*/
|
149 |
public InstallerManager getInstallerManager();
|
150 |
|
151 |
public JShowPackageStatusAndAskContinuePanel createJShowPackageStatusAndAskContinuePanel(
|
152 |
List<PackageInfo> packages, String message); |
153 |
|
154 |
public JPackageInfoPanel createPackageInfoPanel();
|
155 |
|
156 |
public JOutputPanel createOutputPanel();
|
157 |
|
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 void addDefaultDownloadURL(String url) throws MalformedURLException; |
167 |
|
168 |
public List<URL> getDefaultDownloadURLs(); |
169 |
} |