Statistics
| Revision:

svn-gvsig-desktop / 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 @ 33743

History | View | Annotate | Download (4.05 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

    
32
import javax.swing.JPanel;
33

    
34
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizard;
35
import org.gvsig.installer.swing.api.creation.MakePluginPackageWizardException;
36
import org.gvsig.installer.swing.api.execution.InstallPackageWizard;
37
import org.gvsig.installer.swing.api.execution.InstallPackageWizardException;
38

    
39
/**
40
 * 
41
 * <p>
42
 * This manager is used to register and create the wizards that are used to
43
 * create and execute an installer. These wizards are classes that inherit of
44
 * {@link JPanel}.
45
 * </p>
46
 * 
47
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
48
 */
49
public interface SwingInstallerManager {
50

    
51
    /**
52
     * Registers a class that implements a wizard to create an installer
53
     * of a plugin from a gvSIG installation directory.
54
     * 
55
     * @param clazz
56
     *            Class that inherits of the {@link MakePluginPackageWizard}
57
     *            abstract class.
58
     */
59
    public void registerMakePluginPackageWizardInstallerCreationWizard(
60
        Class<? extends MakePluginPackageWizard> clazz);
61

    
62
    /**
63
     * This method returns a class that is used to create an
64
     * installer from a gvSIG installation directory.
65
     * 
66
     * @return
67
     *         The wizard to create an installer.
68
     * @throws MakePluginPackageWizardException
69
     *             If there is a problem creating the wizard.
70
     */
71
    public MakePluginPackageWizard createMakePluginPackageWizard(
72
        File applicationDirectory, File pluginsFolder, File installFolder)
73
        throws MakePluginPackageWizardException;
74

    
75
    /**
76
     * Registers a class that implements a wizard to execte an installer
77
     * to install a set of plugins in a gvSIG installation directory.
78
     * 
79
     * @param clazz
80
     *            Class that inherits of the {@link InstallPackageWizard}
81
     *            abstract class.
82
     */
83
    public void registerInstallPackageWizard(
84
        Class<? extends InstallPackageWizard> clazz);
85

    
86
    /**
87
     * This method returns a class that is used to execute an
88
     * installer to install a set of plugins in a gvSIG installation directory.
89
     * 
90
     * @return
91
     *         The wizard to execute an installer.
92
     * @throws InstallPackageWizardException
93
     *             If there is a problem creating the wizard.
94
     */
95
    public InstallPackageWizard createInstallPackageWizard(
96
        File applicationDirectory, File pluginsFolder, File installFolder)
97
        throws InstallPackageWizardException;
98

    
99
    /**
100
     * Returns the current application version.
101
     * 
102
     * @return the current application version
103
     */
104
    public String getApplicationVersion();
105

    
106
    /**
107
     * Sets the current application version.
108
     * 
109
     * @param gvSIGVersion
110
     *            the current application version
111
     */
112
    public void setApplicationVersion(String gvSIGVersion);
113

    
114
    /**
115
     * Translate a key in a text using the current application language
116
     * 
117
     * @param key
118
     *            The key to translate
119
     * @return
120
     *         The translated key
121
     */
122
    public String getText(String key);
123

    
124
}