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

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.DeployablePackage
              extended by org.gcube.common.vremanagement.deployer.impl.resources.deployment.DMainPackage
All Implemented Interfaces:
Serializable, Deployable

public class DMainPackage
extends DeployablePackage

An extension of DeployablePackage which specializes in main package deployment

Author:
Manuele Simi (CNR-ISTI)
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  String garFile
           
protected  String garID
           
protected  String garname
           
protected  org.gcube.common.core.resources.service.MainPackage packageprofile
           
 
Fields inherited from class org.gcube.common.vremanagement.deployer.impl.resources.deployment.DeployablePackage
deploymentTime, extractor, run, serviceID, serviceprofile
 
Fields inherited from class org.gcube.common.vremanagement.deployer.impl.resources.BasePackage
dependencies, installScripts, key, logger, packageFiles, properties, rebootScripts, targetsToAdd, uninstallScripts
 
Constructor Summary
DMainPackage(org.gcube.common.core.resources.service.MainPackage packageprofile, PackageExtractor extractor)
          Creates a new main deployable package
 
Method Summary
 void deployPackage(Set<org.gcube.common.core.scope.GCUBEScope> targets)
          
protected  org.gcube.common.core.resources.service.Package getPackageProfile()
          Gets the package profile
 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.deployment.DeployablePackage
analysePackage, clean, deploy, deployApp, getDeploymentTime, getServiceID, getServiceProfile, getSourcePackage, notifyDeployCompleted, postDeploy, preDeploy, runInstallScripts
 
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
getTargetPlatform, getTargetsToAdd, notifiyTargetsAdded, setTargetsToAdd
 

Field Detail

packageprofile

protected transient org.gcube.common.core.resources.service.MainPackage packageprofile

garID

protected String garID

garFile

protected String garFile

garname

protected String garname
Constructor Detail

DMainPackage

public DMainPackage(org.gcube.common.core.resources.service.MainPackage packageprofile,
                    PackageExtractor extractor)
             throws Exception
Creates a new main deployable package

Parameters:
packageprofile - the package profile
downloader - the manager used to download the package from the Software Repository service
Throws:
Exception - if the GAR file is not found or valid
Method Detail

deployPackage

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

Specified by:
deployPackage in class DeployablePackage
Throws:
DeployException
InvalidPackageArchiveException

requireRestart

public boolean requireRestart()
States if after the deployment, it is required to restart the container

Returns:
true if the container needs to be restarted, false otherwise

getPackageProfile

protected org.gcube.common.core.resources.service.Package getPackageProfile()
Gets the package profile

Specified by:
getPackageProfile in class DeployablePackage
Returns:
the package profile

verify

public boolean verify()
               throws InvalidPackageArchiveException
Verifies if the package has been correctly deployed

Returns:
true if the packages has been correctly deployed, false otherwise
Throws:
InvalidPackageArchiveException - if the package cannot be verified


Copyright © 2012. All Rights Reserved.