svn-gvsig-desktop / tags / v2_0_0_Build_2021 / extensions / org.gvsig.installer / org.gvsig.installer.swing / org.gvsig.installer.swing.api / src / main / java / org / gvsig / installer / swing / api / SwingInstallerManager.java @ 34107
History | View | Annotate | Download (4.72 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 |
|
33 |
import javax.swing.JPanel; |
34 |
|
35 |
import org.gvsig.installer.lib.api.InstallerManager; |
36 |
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizard; |
37 |
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizardException; |
38 |
import org.gvsig.installer.swing.api.execution.InstallPackageWizard; |
39 |
import org.gvsig.installer.swing.api.execution.InstallPackageWizardException; |
40 |
|
41 |
/**
|
42 |
*
|
43 |
* <p>
|
44 |
* This manager is used to register and create the wizards that are used to
|
45 |
* create and execute an installer. These wizards are classes that inherit of
|
46 |
* {@link JPanel}.
|
47 |
* </p>
|
48 |
*
|
49 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a>
|
50 |
*/
|
51 |
public interface SwingInstallerManager { |
52 |
|
53 |
/**
|
54 |
* Registers a class that implements a wizard to create an installer
|
55 |
* of a plugin from a gvSIG installation directory.
|
56 |
*
|
57 |
* @param clazz
|
58 |
* Class that inherits of the {@link MakePluginPackageWizard}
|
59 |
* abstract class.
|
60 |
*/
|
61 |
public void registerMakePluginPackageWizardInstallerCreationWizard( |
62 |
Class<? extends MakePluginPackageWizard> clazz); |
63 |
|
64 |
/**
|
65 |
* This method returns a class that is used to create an
|
66 |
* installer from a gvSIG installation directory.
|
67 |
*
|
68 |
* @return
|
69 |
* The wizard to create an installer.
|
70 |
* @throws MakePluginPackageWizardException
|
71 |
* If there is a problem creating the wizard.
|
72 |
*/
|
73 |
public MakePluginPackageWizard createMakePluginPackageWizard(
|
74 |
File applicationDirectory, File pluginsFolder, File installFolder) |
75 |
throws MakePluginPackageWizardException;
|
76 |
|
77 |
/**
|
78 |
* Registers a class that implements a wizard to execte an installer
|
79 |
* to install a set of plugins in a gvSIG installation directory.
|
80 |
*
|
81 |
* @param clazz
|
82 |
* Class that inherits of the {@link InstallPackageWizard}
|
83 |
* abstract class.
|
84 |
*/
|
85 |
public void registerInstallPackageWizard( |
86 |
Class<? extends InstallPackageWizard> clazz); |
87 |
|
88 |
/**
|
89 |
* This method returns a class that is used to execute an
|
90 |
* installer to install a set of plugins in a gvSIG installation directory.
|
91 |
*
|
92 |
* @return
|
93 |
* The wizard to execute an installer.
|
94 |
* @throws InstallPackageWizardException
|
95 |
* If there is a problem creating the wizard.
|
96 |
*/
|
97 |
public InstallPackageWizard createInstallPackageWizard(
|
98 |
File applicationDirectory, File pluginsFolder, File installFolder) |
99 |
throws InstallPackageWizardException;
|
100 |
|
101 |
/**
|
102 |
* Returns the current application version.
|
103 |
*
|
104 |
* @return the current application version
|
105 |
*/
|
106 |
public String getApplicationVersion(); |
107 |
|
108 |
/**
|
109 |
* Sets the current application version.
|
110 |
*
|
111 |
* @param gvSIGVersion
|
112 |
* the current application version
|
113 |
*/
|
114 |
public void setApplicationVersion(String gvSIGVersion); |
115 |
|
116 |
/**
|
117 |
* Returns the default URL to download packages from.
|
118 |
*
|
119 |
* @return the default URL to download packages from
|
120 |
*/
|
121 |
public URL getDefaultDownloadURL(); |
122 |
|
123 |
/**
|
124 |
* Sets the default URL to download packages from
|
125 |
*
|
126 |
* @param defaultDownloadURL
|
127 |
* the default URL to download packages from
|
128 |
*/
|
129 |
public void setDefaultDownloadURL(URL defaultDownloadURL); |
130 |
|
131 |
/**
|
132 |
* Translate a key in a text using the current application language
|
133 |
*
|
134 |
* @param key
|
135 |
* The key to translate
|
136 |
* @return
|
137 |
* The translated key
|
138 |
*/
|
139 |
public String getText(String key); |
140 |
|
141 |
/**
|
142 |
* Returns a reference to the {@link InstallerManager}.
|
143 |
*
|
144 |
* @return a reference to the {@link InstallerManager}
|
145 |
*/
|
146 |
public InstallerManager getInstallerManager();
|
147 |
|
148 |
} |