root / tags / v2_0_0_Build_2051 / extensions / org.gvsig.installer / org.gvsig.installer.swing / org.gvsig.installer.swing.api / src / main / java / org / gvsig / installer / swing / api / SwingInstallerManager.java @ 38753
History | View | Annotate | Download (5.29 KB)
1 | 32269 | jpiera | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | 33729 | cordinyana | *
|
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 | 32269 | jpiera | |
23 | /*
|
||
24 | 33729 | cordinyana | * AUTHORS (In addition to CIT):
|
25 | * 2010 {Prodevelop} {Task}
|
||
26 | */
|
||
27 | |||
28 | 32269 | jpiera | package org.gvsig.installer.swing.api; |
29 | |||
30 | 32565 | jpiera | import java.io.File; |
31 | 38439 | cordinyana | import java.net.MalformedURLException; |
32 | 34003 | cordinyana | import java.net.URL; |
33 | 35767 | jjdelcerro | import java.util.List; |
34 | 32565 | jpiera | |
35 | 32512 | jpiera | import javax.swing.JPanel; |
36 | |||
37 | 34005 | cordinyana | import org.gvsig.installer.lib.api.InstallerManager; |
38 | 35767 | jjdelcerro | import org.gvsig.installer.lib.api.PackageInfo; |
39 | 32565 | jpiera | import org.gvsig.installer.swing.api.creation.MakePluginPackageWizard; |
40 | import org.gvsig.installer.swing.api.creation.MakePluginPackageWizardException; |
||
41 | 37169 | nfrancisco | import org.gvsig.installer.swing.api.creation.JOutputPanel; |
42 | import org.gvsig.installer.swing.api.creation.JPackageInfoPanel; |
||
43 | 34925 | nfrancisco | import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard; |
44 | 32565 | jpiera | import org.gvsig.installer.swing.api.execution.InstallPackageWizardException; |
45 | 35767 | jjdelcerro | import org.gvsig.installer.swing.api.execution.JShowPackageStatusAndAskContinuePanel; |
46 | 32269 | jpiera | |
47 | /**
|
||
48 | 32512 | jpiera | *
|
49 | 32598 | jpiera | * <p>
|
50 | 33729 | cordinyana | * 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 | 32512 | jpiera | * </p>
|
54 | *
|
||
55 | 32269 | jpiera | * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a>
|
56 | */
|
||
57 | public interface SwingInstallerManager { |
||
58 | 33729 | cordinyana | |
59 | 37599 | nfrancisco | /**
|
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 | 33729 | cordinyana | |
70 | 37599 | nfrancisco | /**
|
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 | 37822 | nfrancisco | File applicationDirectory, File installFolder) |
80 | 37599 | nfrancisco | throws MakePluginPackageWizardException;
|
81 | 33729 | cordinyana | |
82 | 37599 | nfrancisco | /**
|
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 | 33729 | cordinyana | |
93 | 37599 | nfrancisco | /**
|
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 | 37822 | nfrancisco | File applicationDirectory, File installFolder) |
103 | 37599 | nfrancisco | throws InstallPackageWizardException;
|
104 | 33686 | cordinyana | |
105 | 37599 | nfrancisco | /**
|
106 | * Returns the current application version.
|
||
107 | *
|
||
108 | * @return the current application version
|
||
109 | */
|
||
110 | public String getApplicationVersion(); |
||
111 | 33686 | cordinyana | |
112 | 37599 | nfrancisco | /**
|
113 | * Sets the current application version.
|
||
114 | *
|
||
115 | * @param gvSIGVersion
|
||
116 | * the current application version
|
||
117 | */
|
||
118 | public void setApplicationVersion(String gvSIGVersion); |
||
119 | 33686 | cordinyana | |
120 | 37599 | nfrancisco | /**
|
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 | 34003 | cordinyana | |
127 | 37599 | nfrancisco | /**
|
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 | 34003 | cordinyana | |
135 | 37599 | nfrancisco | /**
|
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 | 33686 | cordinyana | |
144 | 37599 | nfrancisco | /**
|
145 | * Returns a reference to the {@link InstallerManager}.
|
||
146 | *
|
||
147 | * @return a reference to the {@link InstallerManager}
|
||
148 | */
|
||
149 | public InstallerManager getInstallerManager();
|
||
150 | 34005 | cordinyana | |
151 | 37599 | nfrancisco | public JShowPackageStatusAndAskContinuePanel createJShowPackageStatusAndAskContinuePanel(
|
152 | List<PackageInfo> packages, String message); |
||
153 | 37498 | fdiaz | |
154 | 37599 | nfrancisco | public JPackageInfoPanel createPackageInfoPanel();
|
155 | 37498 | fdiaz | |
156 | 37599 | nfrancisco | 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 | 38439 | cordinyana | public void addDefaultDownloadURL(String url) throws MalformedURLException; |
167 | |||
168 | 37599 | nfrancisco | public List<URL> getDefaultDownloadURLs(); |
169 | 32269 | jpiera | } |