public abstract class DeployablePackage extends BaseTypedPackage implements Deployable
BaseTypedPackage.TYPE| Modifier and Type | Field and Description |
|---|---|
protected Calendar |
deploymentTime
scopes to add after the next restart
|
protected PackageExtractor |
extractor
The extractor managing the package
|
protected AntRunner |
run
Local Ant runner
|
protected String |
serviceID
the service identifier to which the package belongs to
|
protected org.gcube.common.core.resources.GCUBEService |
serviceprofile
service profile extracted from the deployable package
|
dependencies, installScripts, key, logger, packageFiles, properties, rebootScripts, targetsToAdd, uninstallScripts| Modifier and Type | Method and Description |
|---|---|
protected void |
analysePackage() |
void |
clean()
Cleans up all the temporary resources used to deploy the package
|
void |
deploy(Set<org.gcube.common.core.scope.GCUBEScope> targets)
Deploys the package
|
String |
deployApp(Set<org.gcube.common.core.scope.GCUBEScope> targets)
Deploys the package as an application
|
abstract void |
deployPackage(Set<org.gcube.common.core.scope.GCUBEScope> targets) |
Calendar |
getDeploymentTime() |
protected abstract org.gcube.common.core.resources.service.Package |
getPackageProfile()
Gets the package profile
|
String |
getServiceID() |
org.gcube.common.core.resources.GCUBEService |
getServiceProfile()
Gets the service profile
|
BaseTypedPackage |
getSourcePackage() |
protected void |
notifyDeployCompleted()
Does the latest stuffs and cleanup after a successful deployment
|
void |
postDeploy()
Performs the post-deployment operations
|
void |
preDeploy()
Performs the pre-deployment operations
|
protected void |
runInstallScripts()
Executes the installation scripts for the package
|
getType, setTypeaddDependencies, addFile2Package, addInstallScript, addRebootScript, addScope, addUninstallScript, getDependencies, getInstallScripts, getKey, getPackageFileList, getProperty, getRebootScripts, getScopes, getScopesToAdd, getSerializationFile, getTargetPlatform, getTargetsToAdd, getUninstallScripts, notifiyTargetsAdded, printFiles, removeFileFromPackage, removeScope, removeScopes, setProperty, setScopes, setScopesToAdd, setTargetPlatform, setTargetsToAdd, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTargetPlatform, getTargetsToAdd, notifiyTargetsAdded, requireRestart, setTargetsToAdd, verifyprotected transient PackageExtractor extractor
protected transient AntRunner run
protected transient org.gcube.common.core.resources.GCUBEService serviceprofile
protected String serviceID
protected Calendar deploymentTime
protected final void analysePackage()
public final void deploy(Set<org.gcube.common.core.scope.GCUBEScope> targets) throws PackageAldreadyDeployedException, DeployException, InvalidPackageArchiveException
Deployabledeploy in interface DeployablePackageAldreadyDeployedException - if the package is already deployed in the nodeDeployException - if something fails during the deployment activitiesInvalidPackageArchiveException - if the format of the downloaded package is not validpublic abstract void deployPackage(Set<org.gcube.common.core.scope.GCUBEScope> targets) throws PackageAldreadyDeployedException, DeployException, InvalidPackageArchiveException
protected abstract org.gcube.common.core.resources.service.Package getPackageProfile()
public org.gcube.common.core.resources.GCUBEService getServiceProfile()
protected void runInstallScripts()
throws DeployException,
InvalidPackageArchiveException
DeployException - if an error occurs during the execution of one of the given scriptsInvalidPackageArchiveException - if the format of the downloaded package is not validpublic final void clean()
throws DeployException
Deployableclean in interface DeployableDeployExceptionpublic void preDeploy()
throws InvalidPackageArchiveException,
DeployException
DeployablepreDeploy in interface DeployableInvalidPackageArchiveExceptionDeployExceptionpublic void postDeploy()
throws InvalidPackageArchiveException,
DeployException
DeployablepostDeploy in interface DeployableDeployExceptionInvalidPackageArchiveExceptionpublic String getServiceID()
public final Calendar getDeploymentTime()
protected final void notifyDeployCompleted()
public String deployApp(Set<org.gcube.common.core.scope.GCUBEScope> targets) throws PackageAldreadyDeployedException, DeployException, InvalidPackageArchiveException
DeployabledeployApp in interface Deployabletargets - target scopesPackageAldreadyDeployedExceptionDeployExceptionInvalidPackageArchiveExceptionpublic BaseTypedPackage getSourcePackage()
getSourcePackage in interface DeployableCopyright © 2015. All Rights Reserved.