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)
Adds a the URI of a bundle that contains some packages to install.
|
void |
addBundle(URL bundleURL)
Adds a URL of a bundle that contains some packages to install.
|
void |
addBundlesFromDirectory(File bundlesDirectory)
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.
|
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 |
reset() |
getManager
void reset()
void addBundle(File bundleFile) throws InstallPackageServiceException
InstallerManager
class.bundleURI
- the URI of a bundle.InstallPackageServiceException
- it is thrown if there is an exception reading the URI.void addBundle(URL bundleURL) throws InstallPackageServiceException
InstallerManager
class.bundleURL
- the URL
of a bundle.InstallPackageServiceException
- it is thrown if there is an exception reading the URL
.void addBundlesFromDirectory(File bundlesDirectory) throws InstallPackageServiceException
bundlesDirectory
- a directory that contains bundles.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
- InstallPackageServiceException
List<String> getCategories()