Class PackagesCache
java.lang.Object
org.gvsig.installer.lib.impl.execution.PackagesCache
- All Implemented Interfaces:
Iterable<org.gvsig.installer.lib.api.PackageInfo>
-
Constructor Summary
ConstructorsConstructorDescriptionPackagesCache(org.gvsig.installer.lib.spi.InstallPackageProviderServices installerProviderServices) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBundledPackage(org.gvsig.installer.lib.api.PackageInfo pkg, File bundleFile, String bundleEntryName) voidaddBundledPackageIndex(org.gvsig.installer.lib.api.PackageInfo pkg, File bundleFile, String bundleEntryName) voidaddPackage(org.gvsig.installer.lib.api.PackageInfo pkg, File f) voidaddPackageIndex(org.gvsig.installer.lib.api.PackageInfo pkg) booleancontains(org.gvsig.installer.lib.api.PackageInfo packageInfo) voiddownload(org.gvsig.installer.lib.api.PackageInfo packageInfo, org.gvsig.tools.task.SimpleTaskStatus taskStatus) org.gvsig.installer.lib.api.PackageInfoget(int n) getFile(org.gvsig.installer.lib.api.PackageInfo packageInfo) Return the file associated to this package.getInputStream(org.gvsig.installer.lib.api.PackageInfo packageInfo) Return the InputStream of the package.booleanisDownloaded(org.gvsig.installer.lib.api.PackageInfo packageInfo) Iterator<org.gvsig.installer.lib.api.PackageInfo> iterator()intsize()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
PackagesCache
public PackagesCache(org.gvsig.installer.lib.spi.InstallPackageProviderServices installerProviderServices)
-
-
Method Details
-
addPackage
-
addPackageIndex
public void addPackageIndex(org.gvsig.installer.lib.api.PackageInfo pkg) -
addBundledPackage
-
addBundledPackageIndex
-
getFile
Return the file associated to this package. If the package is a standalone package it return the file of package. If the package is a standalone package index, return the file of the associated package, downloading it if need. If is a package in a bundle, return the file of the bundle.- Parameters:
packageInfo-- Returns:
-
contains
public boolean contains(org.gvsig.installer.lib.api.PackageInfo packageInfo) -
isDownloaded
public boolean isDownloaded(org.gvsig.installer.lib.api.PackageInfo packageInfo) -
download
public void download(org.gvsig.installer.lib.api.PackageInfo packageInfo, org.gvsig.tools.task.SimpleTaskStatus taskStatus) -
getInputStream
Return the InputStream of the package. If is a package index, download if need the package and return a InputStream of the package associated to the index. If is a package in a bundle, return a InputStream without extract the package of the bundle.- Parameters:
packageInfo-- Returns:
-
iterator
-
size
public int size() -
get
public org.gvsig.installer.lib.api.PackageInfo get(int n)
-