Statistics
| Revision:

root / 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 @ 32498

History | View | Annotate | Download (2.93 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.InstallerInfo;
31
import org.gvsig.installer.lib.spi.execution.InstallerExecutionProvider;
32
import org.gvsig.tools.service.ServiceException;
33
import org.gvsig.tools.service.spi.ProviderManager;
34

    
35
/**
36
 * <p>
37
 * This manager offers to the providers that are executed in an installation process 
38
 * of some functionalities that they need to complete their task. It also offers
39
 * the functionality to create a new provider using the provider name.
40
 * </p>
41
 * <p>
42
 * All the plugins to install have to have some install properties defined
43
 * by the {@link InstallerInfo} class. This class is just a set of properties 
44
 * and there is a property named <b>type</b> that can be retrieved by the
45
 * {@link InstallerInfo#getType()} method that defines the plugin type 
46
 * (a new plugin, theme...). This property is used to create a {@link InstallerExecutionProvider}
47
 * that is used to install the selected plugin.
48
 * </p>
49
 * <p>
50
 * For each different type of plugin a new provider has to be
51
 * registered using the plugin type.
52
 * </p>
53
 * 
54
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
55
 */
56
public interface InstallerProviderManager extends ProviderManager {
57
        
58
        /**
59
         * Creates a new provider to execute an installer to add a new plugin in gvSIG. 
60
         * @param providerName
61
         * The provider name used on the registration of the provider. This name is the
62
         * type attribute defined by {@link InstallerInfo}.
63
         * @return
64
         * A porvider that can be used to install a plugin.
65
         * @throws ServiceException
66
         * If the provider doesn't exist or if there is a problem creating the provider.
67
         */
68
        public InstallerExecutionProvider createExecutionProvider(String providerName) throws ServiceException;
69
        
70
        /**
71
         * Creates the services that be used for the providers to execute or
72
         * create a new installer.
73
         * @return
74
         * The services used to create or execute an installer.
75
         */
76
        public InstallerProviderServices createInstallerProviderServices();
77
        
78
}
79