|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.vremanagement.deployer.impl.operators.deployment.Downloader
public class Downloader
Download manager for gCube Packages
| Nested Class Summary | |
|---|---|
static class |
Downloader.PackageType
|
static class |
Downloader.UnreachablePackageException
Unreachable package exception |
| Field Summary | |
|---|---|
File |
downloadedFile
File name of the package downloaded from the Repository service |
protected org.gcube.common.core.utils.logging.GCUBELog |
logger
local logger |
protected String |
packagedir
The folder where the package tarball is uncompressed |
String |
packagename
Name of the package to download |
protected Downloader.PackageType |
packagetype
|
protected String |
packageVersion
Version of the package to download |
protected static String |
REPOSITORY_CLASS
Target service class. |
protected static String |
REPOSITORY_ENDPOINT
Target port-type name. |
protected static String |
REPOSITORY_NAME
Target service name. |
protected AntRunner |
run
Local Ant runner |
protected String |
serviceClass
Service class of the package's service |
protected String |
serviceID
Service ID of the package's service |
protected String |
serviceKey
Service key of the package's service |
protected String |
serviceName
Service name of the package's service |
protected String |
serviceVersion
Service version of the package's service |
protected boolean |
update
|
| Constructor Summary | |
|---|---|
Downloader(org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo deployable_package,
boolean... update)
|
|
| Method Summary | |
|---|---|
String |
downloadPackage(File file)
Downloads the package from a local path |
String |
downloadPackage(org.gcube.common.core.scope.GCUBEScope... scope)
Downloads the package tarball. |
String |
downloadPackage(URI uri)
Downloads the package |
String |
downloadPatch(URI uri)
Downloads the patch |
protected Set<org.apache.axis.message.addressing.EndpointReferenceType> |
findInstances(org.gcube.common.core.scope.GCUBEScope scopeToCheckIn)
Finds instances of the Software Repository service in the current scope(s) |
String |
getPackagedir()
|
String |
getPackageFilesDir()
|
String |
getPackagename()
|
Downloader.PackageType |
getPackagetype()
|
String |
getServiceKey()
|
protected String |
internalHTTPdownload(String baseDir,
URI uri)
|
boolean |
isUpdate()
|
protected void |
removeFiles()
Removes the package files |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AntRunner run
protected final org.gcube.common.core.utils.logging.GCUBELog logger
public String packagename
protected String packageVersion
public File downloadedFile
protected String serviceID
protected String serviceName
protected String serviceKey
protected static final String REPOSITORY_ENDPOINT
protected static final String REPOSITORY_NAME
protected static final String REPOSITORY_CLASS
protected String serviceClass
protected String serviceVersion
protected String packagedir
protected boolean update
protected Downloader.PackageType packagetype
| Constructor Detail |
|---|
public Downloader(org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo deployable_package,
boolean... update)
throws DeployException,
Exception
serviceID - the service ID of the packagepackageName - the name of the packageupdate - it states if the package is going to be updated or not
DeployException
Exception| Method Detail |
|---|
public String downloadPackage(org.gcube.common.core.scope.GCUBEScope... scope)
throws Downloader.UnreachablePackageException,
Exception
scope - the scope where to look for the package
VOException - if an error occurs in the download operation
Downloader.UnreachablePackageException
Exception
public String downloadPackage(File file)
throws DeployException,
IOException,
InvalidPackageArchiveException
file - the tarball on the local file system
InvalidPackageArchiveException
IOException
DeployException
public String downloadPatch(URI uri)
throws Downloader.UnreachablePackageException,
DeployException,
InvalidPackageArchiveException
uri - the uri from which the patch has to be downloaded
Downloader.UnreachablePackageException - it the download fails
InvalidPackageArchiveException
DeployException
public String downloadPackage(URI uri)
throws Downloader.UnreachablePackageException,
DeployException,
InvalidPackageArchiveException
uri - the uri from which the package has to be downloaded
Downloader.UnreachablePackageException - it the download fails
InvalidPackageArchiveException
DeployException
protected String internalHTTPdownload(String baseDir,
URI uri)
throws Downloader.UnreachablePackageException,
DeployException,
InvalidPackageArchiveException
Downloader.UnreachablePackageException
DeployException
InvalidPackageArchiveException
protected void removeFiles()
throws DeployException
DeployException - if the delete operation failsprotected Set<org.apache.axis.message.addressing.EndpointReferenceType> findInstances(org.gcube.common.core.scope.GCUBEScope scopeToCheckIn)
Exceptionpublic String getPackagename()
public String getPackagedir()
public String getPackageFilesDir()
public String getServiceKey()
public Downloader.PackageType getPackagetype()
public boolean isUpdate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||