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(java.io.File bundleFile,
SimpleTaskStatus taskStatus)
Adds a the URI of a bundle that contains some packages to install.
|
void |
addBundle(java.net.URL bundleURL,
SimpleTaskStatus taskStatus)
Adds a URL of a bundle that contains some packages to install.
|
void |
addBundlesFromDirectory(java.io.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.
|
java.util.List<java.lang.String> |
getCategories()
Gets the list of all the categories of *all* the packages.
|
java.util.List<java.lang.String> |
getDefaultSelectedPackagesIDs() |
int |
getPackageCount() |
PackageInfo |
getPackageInfo(int index)
Return the package information for a concrete position.
|
PackageInfo |
getPackageInfo(java.lang.String packageCode)
Return the package information for a concrete position.
|
java.util.Properties |
getProperties()
Get the proprties associates to this bundle.
|
java.util.List<java.lang.String> |
getTypes()
Gets the list of different the types of *all* the packages.
|
void |
installPackage(java.io.File applicationDirectory,
PackageInfo packageInfo)
Install a package in a concrete gvSIG installation directory.
|
void |
installPackage(java.io.File applicationDirectory,
java.lang.String packageCode)
Install a package in a concrete gvSIG installation directory.
|
void |
installPackageProviders(SimpleTaskStatus taskStatus) |
boolean |
needInstallPackageProviders() |
void |
reset() |
getManager
void reset()
void addBundle(java.io.File bundleFile, SimpleTaskStatus taskStatus) throws InstallPackageServiceException
InstallerManager
class.bundleFile
- taskStatus
- InstallPackageServiceException
- it is thrown if there is an exception reading the URI.void addBundle(java.net.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(java.io.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(java.io.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(java.io.File applicationDirectory, java.lang.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(java.lang.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
java.util.List<java.lang.String> getDefaultSelectedPackagesIDs()
java.util.Properties getProperties()
java.util.List<java.lang.String> getCategories()
java.util.List<java.lang.String> getTypes()
boolean needInstallPackageProviders()
void installPackageProviders(SimpleTaskStatus taskStatus)