public interface InstallPackageService extends Service
This service is used to read a bundle file and install the packages contained in it. It has methods to read the packages contained in a bundle and to install one of them.
The bundle is a file that has been created using the
MakePluginPackageService service. It is possible to create an
installer manually, but it has to have the structure defined by the
InstallerManager class.
| Modifier and Type | Method and Description |
|---|---|
void |
addBundle(File bundleFile,
SimpleTaskStatus taskStatus)
Adds a the URI of a bundle that contains some packages to install.
|
void |
addBundle(URL bundleURL,
SimpleTaskStatus taskStatus)
Adds a URL of a bundle that contains some packages to install.
|
void |
addBundlesFromDirectory(File bundlesDirectory,
SimpleTaskStatus taskStatus)
In reads a directory and reads all the bundles.
|
void |
downloadPackage(PackageInfo packageInfo,
SimpleTaskStatus taskStatus)
Download the package and register it in the manager.
|
List<String> |
getCategories()
Gets the list of all the categories of *all* the packages.
|
List<String> |
getDefaultSelectedPackagesIDs() |
int |
getPackageCount() |
PackageInfo |
getPackageInfo(int index)
Return the package information for a concrete position.
|
PackageInfo |
getPackageInfo(String packageCode)
Return the package information for a concrete position.
|
Properties |
getProperties()
Get the proprties associates to this bundle.
|
List<String> |
getTypes()
Gets the list of different the types of *all* the packages.
|
void |
installPackage(File applicationDirectory,
PackageInfo packageInfo)
Install a package in a concrete gvSIG installation directory.
|
void |
installPackage(File applicationDirectory,
String packageCode)
Install a package in a concrete gvSIG installation directory.
|
void |
installPackageProviders(SimpleTaskStatus taskStatus) |
boolean |
needInstallPackageProviders() |
void |
reset() |
getManagervoid reset()
void addBundle(File bundleFile, SimpleTaskStatus taskStatus) throws InstallPackageServiceException
InstallerManager class.bundleFile - taskStatus - InstallPackageServiceException - it is thrown if there is an exception reading the URI.void addBundle(URL bundleURL, SimpleTaskStatus taskStatus) throws InstallPackageServiceException
InstallerManager class.bundleURL - the URL of a bundle.taskStatus - InstallPackageServiceException - it is thrown if there is an exception reading the URL
.void addBundlesFromDirectory(File bundlesDirectory, SimpleTaskStatus taskStatus) throws InstallPackageServiceException
bundlesDirectory - a directory that contains bundles.taskStatus - InstallPackageServiceException - If there is any problem reading the directory of bundles.void installPackage(File applicationDirectory, PackageInfo packageInfo) throws InstallPackageServiceException
#addBundle(File) or the
#addBundlesFromDirectory(File) method.applicationDirectory - a valid root directory where an instance og gvSIG is
installed.packageInfo - the package to install.InstallPackageServiceException - If there is an error installing the package.void installPackage(File applicationDirectory, String packageCode) throws InstallPackageServiceException
#addBundle(File) or the
#addBundlesFromDirectory(File) method.applicationDirectory - a valid root directory where an instance og gvSIG is
installed.packageCode - the code of the package.InstallPackageServiceException - if there is an error installing the PackageInfo#int getPackageCount()
#addBundle(File) or the
#addBundlesFromDirectory(File) method.PackageInfo getPackageInfo(int index)
#addBundle(File) or the #addBundlesFromDirectory(File)
method.index - the position of the package.null if the
package doesn't exist.PackageInfo getPackageInfo(String packageCode)
#addBundle(File) or the #addBundlesFromDirectory(File)
method.packageCode - the code of the package.null if the
package doesn't exist.void downloadPackage(PackageInfo packageInfo, SimpleTaskStatus taskStatus) throws InstallPackageServiceException
packageInfo - InstallPackageServiceExceptionProperties getProperties()
List<String> getCategories()
List<String> getTypes()
boolean needInstallPackageProviders()
void installPackageProviders(SimpleTaskStatus taskStatus)