svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.installer / org.gvsig.installer.lib / org.gvsig.installer.lib.spi / src / main / java / org / gvsig / installer / lib / spi / InstallerProviderManager.java @ 40560
History | View | Annotate | Download (3.27 KB)
1 | 40560 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | 40435 | jjdelcerro | *
|
4 | 40560 | jjdelcerro | * Copyright (C) 2007-2013 gvSIG Association.
|
5 | *
|
||
6 | 40435 | jjdelcerro | * This program is free software; you can redistribute it and/or
|
7 | * modify it under the terms of the GNU General Public License
|
||
8 | 40560 | jjdelcerro | * as published by the Free Software Foundation; either version 3
|
9 | 40435 | jjdelcerro | * of the License, or (at your option) any later version.
|
10 | 40560 | jjdelcerro | *
|
11 | 40435 | jjdelcerro | * 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 | 40560 | jjdelcerro | *
|
16 | 40435 | jjdelcerro | * 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 | 40560 | jjdelcerro | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 | 40435 | jjdelcerro | * MA 02110-1301, USA.
|
20 | 40560 | jjdelcerro | *
|
21 | * For any additional information, do not hesitate to contact us
|
||
22 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
23 | 40435 | jjdelcerro | */
|
24 | /*
|
||
25 | * AUTHORS (In addition to CIT):
|
||
26 | * 2010 {Prodevelop} {Task}
|
||
27 | */
|
||
28 | |||
29 | package org.gvsig.installer.lib.spi; |
||
30 | |||
31 | import org.gvsig.installer.lib.api.PackageInfo; |
||
32 | import org.gvsig.installer.lib.spi.execution.InstallPackageProvider; |
||
33 | import org.gvsig.tools.service.ServiceException; |
||
34 | import org.gvsig.tools.service.spi.ProviderManager; |
||
35 | import org.gvsig.tools.service.spi.ProviderManager_WithGetFactories; |
||
36 | |||
37 | /**
|
||
38 | * <p>
|
||
39 | * The installation process install packages in gvSIG. These packages has a
|
||
40 | * type, that can be a plugin, theme, translation, etc. For every type of
|
||
41 | * package the installation process needs a provider for installing the
|
||
42 | * packages.
|
||
43 | * </p>
|
||
44 | * <p>
|
||
45 | * All the packages to install have to have some install properties defined by
|
||
46 | * the {@link PackageInfo} class. This class is just a set of properties and
|
||
47 | * there is a property named <b>type</b> that can be retrieved by the
|
||
48 | * {@link PackageInfo#getType()} method that defines the package type. This
|
||
49 | * property is used to create a {@link InstallPackageProvider} that is used to
|
||
50 | * install the selected package.
|
||
51 | * </p>
|
||
52 | * <p>
|
||
53 | * This manager provides the functionality to register and to create a providers
|
||
54 | * for every package.
|
||
55 | * </p>
|
||
56 | *
|
||
57 | * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a>
|
||
58 | */
|
||
59 | public interface InstallerProviderManager extends ProviderManager, ProviderManager_WithGetFactories { |
||
60 | |||
61 | /**
|
||
62 | * Creates a new provider to execute an installer to add a new package in
|
||
63 | * gvSIG.
|
||
64 | *
|
||
65 | * @param providerName
|
||
66 | * the provider name used on the registration of the provider.
|
||
67 | * This name is the type attribute defined by {@link PackageInfo}
|
||
68 | * .
|
||
69 | * @return a provider that can be used to install a package.
|
||
70 | * @throws ServiceException
|
||
71 | * if the provider doesn't exist or if there is a problem
|
||
72 | * creating the provider.
|
||
73 | */
|
||
74 | public InstallPackageProvider createExecutionProvider(String providerName) |
||
75 | throws ServiceException;
|
||
76 | |||
77 | /**
|
||
78 | * Creates the services that be used for the providers to execute or create
|
||
79 | * a new bundle.
|
||
80 | *
|
||
81 | * @return 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 | } |