Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.installer / org.gvsig.installer.lib / org.gvsig.installer.lib.spi / src / main / java / org / gvsig / installer / lib / spi / InstallerProviderManager.java @ 34444

History | View | Annotate | Download (3.24 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.lib.spi;
29

    
30
import org.gvsig.installer.lib.api.PackageInfo;
31
import org.gvsig.installer.lib.spi.execution.InstallPackageProvider;
32
import org.gvsig.tools.service.ServiceException;
33
import org.gvsig.tools.service.spi.ProviderManager;
34

    
35
/**
36
 * <p>
37
 * 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
 * </p>
42
 * <p>
43
 * 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
 * </p>
50
 * <p>
51
 * This manager provides the functionality to register and to create a providers
52
 * for every package.
53
 * </p>
54
 * 
55
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
56
 */
57
public interface InstallerProviderManager extends ProviderManager {
58

    
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
    /**
86
     * Returns the name to use for the package info file.
87
     * 
88
     * @return the name of the package info file
89
     */
90
    public String getPackageInfoFileName();
91
}