public class DefaultInstallPackageService extends Thread implements InstallPackageService
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
DefaultInstallPackageService(DefaultInstallerManager manager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBundle(File bundle,
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 directory,
SimpleTaskStatus taskStatus)
In reads a directory and reads all the bundles.
|
void |
downloadPackage(PackageInfo packageInfo) |
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() |
Manager |
getManager()
Returns a reference to the
Manager which manages this server. |
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() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic DefaultInstallPackageService(DefaultInstallerManager manager)
public void reset()
reset in interface InstallPackageServicepublic void installPackage(File applicationDirectory, PackageInfo packageInfo) throws InstallPackageServiceException
InstallPackageService#addBundle(File) or the
#addBundlesFromDirectory(File) method.installPackage in interface InstallPackageServiceapplicationDirectory - 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.public void installPackage(File applicationDirectory, String packageCode) throws InstallPackageServiceException
InstallPackageService#addBundle(File) or the
#addBundlesFromDirectory(File) method.installPackage in interface InstallPackageServiceapplicationDirectory - 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#public PackageInfo getPackageInfo(int index)
InstallPackageService#addBundle(File) or the #addBundlesFromDirectory(File)
method.getPackageInfo in interface InstallPackageServiceindex - the position of the package.null if the
package doesn't exist.public PackageInfo getPackageInfo(String packageCode)
InstallPackageService#addBundle(File) or the #addBundlesFromDirectory(File)
method.getPackageInfo in interface InstallPackageServicepackageCode - the code of the package.null if the
package doesn't exist.public void addBundle(File bundle, SimpleTaskStatus taskStatus) throws InstallPackageServiceException
InstallPackageServiceInstallerManager class.addBundle in interface InstallPackageServiceInstallPackageServiceException - it is thrown if there is an exception reading the URI.public void addBundle(URL bundleURL, SimpleTaskStatus taskStatus) throws InstallPackageServiceException
InstallPackageServiceInstallerManager class.addBundle in interface InstallPackageServicebundleURL - the URL of a bundle.InstallPackageServiceException - it is thrown if there is an exception reading the URL
.public void addBundlesFromDirectory(File directory, SimpleTaskStatus taskStatus) throws InstallPackageServiceException
InstallPackageServiceaddBundlesFromDirectory in interface InstallPackageServicedirectory - a directory that contains bundles.InstallPackageServiceException - If there is any problem reading the directory of bundles.public int getPackageCount()
getPackageCount in interface InstallPackageService#addBundle(File) or the
#addBundlesFromDirectory(File) method.public Manager getManager()
ServiceManager which manages this server.getManager in interface ServiceManagerpublic void downloadPackage(PackageInfo packageInfo) throws InstallPackageServiceException
InstallPackageServiceExceptionpublic void downloadPackage(PackageInfo packageInfo, SimpleTaskStatus taskStatus) throws InstallPackageServiceException
InstallPackageServicedownloadPackage in interface InstallPackageServiceInstallPackageServiceExceptionpublic List<String> getDefaultSelectedPackagesIDs()
getDefaultSelectedPackagesIDs in interface InstallPackageServicepublic Properties getProperties()
InstallPackageServicegetProperties in interface InstallPackageServicepublic List<String> getCategories()
InstallPackageServicegetCategories in interface InstallPackageServicepublic List<String> getTypes()
InstallPackageServicegetTypes in interface InstallPackageServicepublic boolean needInstallPackageProviders()
needInstallPackageProviders in interface InstallPackageServicepublic void installPackageProviders(SimpleTaskStatus taskStatus)
installPackageProviders in interface InstallPackageService