Statistics
| Revision:

svn-gvsig-desktop / tags / v2_0_0_Build_2021 / extensions / org.gvsig.installer / org.gvsig.installer.lib / org.gvsig.installer.lib.spi / src / main / java / org / gvsig / installer / lib / spi / InstallerProviderManager.java @ 34107

History | View | Annotate | Download (3.07 KB)

1 32400 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 32400 jpiera
23
/*
24 33729 cordinyana
 * AUTHORS (In addition to CIT):
25
 * 2010 {Prodevelop}   {Task}
26
 */
27
28 32400 jpiera
package org.gvsig.installer.lib.spi;
29
30 32563 jpiera
import org.gvsig.installer.lib.api.PackageInfo;
31 32598 jpiera
import org.gvsig.installer.lib.spi.execution.InstallPackageProvider;
32 32400 jpiera
import org.gvsig.tools.service.ServiceException;
33
import org.gvsig.tools.service.spi.ProviderManager;
34
35
/**
36 32498 jpiera
 * <p>
37 33729 cordinyana
 * The installation process install packages in gvSIG. These packages has a
38
 * type, that can be a plugin, theme, translation, etc. For every type of
39
 * package the installation process needs a provider for installing the
40
 * packages.
41 32498 jpiera
 * </p>
42
 * <p>
43 33729 cordinyana
 * All the packages to install have to have some install properties defined by
44
 * the {@link PackageInfo} class. This class is just a set of properties and
45
 * there is a property named <b>type</b> that can be retrieved by the
46
 * {@link PackageInfo#getType()} method that defines the package type. This
47
 * property is used to create a {@link InstallPackageProvider} that is used to
48
 * install the selected package.
49 32498 jpiera
 * </p>
50
 * <p>
51 33729 cordinyana
 * This manager provides the functionality to register and to create a providers
52
 * for every package.
53 32498 jpiera
 * </p>
54
 *
55 32400 jpiera
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
56
 */
57
public interface InstallerProviderManager extends ProviderManager {
58 33729 cordinyana
59
    /**
60
     * Creates a new provider to execute an installer to add a new package in
61
     * gvSIG.
62
     *
63
     * @param providerName
64
     *            the provider name used on the registration of the provider.
65
     *            This name is the
66
     *            type attribute defined by {@link PackageInfo}.
67
     * @return
68
     *         a provider that can be used to install a package.
69
     * @throws ServiceException
70
     *             if the provider doesn't exist or if there is a problem
71
     *             creating the provider.
72
     */
73
    public InstallPackageProvider createExecutionProvider(String providerName)
74
        throws ServiceException;
75
76
    /**
77
     * Creates the services that be used for the providers to execute or
78
     * create a new bundle.
79
     *
80
     * @return
81
     *         the services used to create or execute an bundle.
82
     */
83
    public InstallPackageProviderServices createInstallerProviderServices();
84
85 32400 jpiera
}