org.gcube.common.vremanagement.deployer.impl.resources.deployment
Class ExternalDeployablePackage

java.lang.Object
  extended by org.gcube.common.vremanagement.deployer.impl.resources.BasePackage
      extended by org.gcube.common.vremanagement.deployer.impl.resources.BaseTypedPackage
          extended by org.gcube.common.vremanagement.deployer.impl.resources.deployment.ExternalDeployablePackage
All Implemented Interfaces:
Serializable, Deployable
Direct Known Subclasses:
DExternalLibraryPackage

public abstract class ExternalDeployablePackage
extends BaseTypedPackage
implements Deployable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gcube.common.vremanagement.deployer.impl.resources.BaseTypedPackage
BaseTypedPackage.TYPE
 
Field Summary
protected  ExternalPackageExtractor extractor
           
protected  AntRunner run
          Local Ant runner
 
Fields inherited from class org.gcube.common.vremanagement.deployer.impl.resources.BasePackage
dependencies, installScripts, key, logger, packageFiles, properties, rebootScripts, targetsToAdd, uninstallScripts
 
Method Summary
 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
abstract  void deployPackage(Set<org.gcube.common.core.scope.GCUBEScope> targets)
           
 BaseTypedPackage getSourcePackage()
           
 void postDeploy()
          Performs the post-deployment operations
 void preDeploy()
          Performs the pre-deployment operations
 boolean requireRestart()
          States if after the deployment, it is required to restart the container
 boolean verify()
          Verifies if the package has been correctly deployed
 
Methods inherited from class org.gcube.common.vremanagement.deployer.impl.resources.BaseTypedPackage
getType, setType
 
Methods inherited from class org.gcube.common.vremanagement.deployer.impl.resources.BasePackage
addDependencies, 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, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.gcube.common.vremanagement.deployer.impl.resources.deployment.Deployable
deployApp, getTargetPlatform, getTargetsToAdd, notifiyTargetsAdded, setTargetsToAdd
 

Field Detail

run

protected transient AntRunner run
Local Ant runner


extractor

protected transient ExternalPackageExtractor extractor
Method Detail

verify

public boolean verify()
               throws InvalidPackageArchiveException
Description copied from interface: Deployable
Verifies if the package has been correctly deployed

Specified by:
verify in interface Deployable
Returns:
true if the packages has been correctly deployed, false otherwise
Throws:
InvalidPackageArchiveException - if the package cannot be verified

preDeploy

public void preDeploy()
               throws InvalidPackageArchiveException,
                      DeployException
Description copied from interface: Deployable
Performs the pre-deployment operations

Specified by:
preDeploy in interface Deployable
Throws:
InvalidPackageArchiveException
DeployException

postDeploy

public void postDeploy()
                throws InvalidPackageArchiveException,
                       DeployException
Description copied from interface: Deployable
Performs the post-deployment operations

Specified by:
postDeploy in interface Deployable
Throws:
DeployException
InvalidPackageArchiveException

clean

public void clean()
           throws DeployException
Description copied from interface: Deployable
Cleans up all the temporary resources used to deploy the package

Specified by:
clean in interface Deployable
Throws:
DeployException

requireRestart

public boolean requireRestart()
Description copied from interface: Deployable
States if after the deployment, it is required to restart the container

Specified by:
requireRestart in interface Deployable
Returns:
true if the container needs to be restarted, false otherwise

getSourcePackage

public BaseTypedPackage getSourcePackage()
Specified by:
getSourcePackage in interface Deployable
Returns:
the source package of this deployable

deploy

public final void deploy(Set<org.gcube.common.core.scope.GCUBEScope> targets)
                  throws DeployException,
                         InvalidPackageArchiveException
Description copied from interface: Deployable
Deploys the package

Specified by:
deploy in interface Deployable
Throws:
DeployException - if something fails during the deployment activities
InvalidPackageArchiveException - if the format of the downloaded package is not valid

deployPackage

public abstract void deployPackage(Set<org.gcube.common.core.scope.GCUBEScope> targets)
                            throws DeployException,
                                   InvalidPackageArchiveException
Throws:
DeployException
InvalidPackageArchiveException


Copyright © 2013. All Rights Reserved.