org.gcube.common.vremanagement.deployer.impl.resources.deployment
Interface Deployable

All Known Implementing Classes:
DeployablePackage, DExternalLibraryPackage, DMainPackage, DPlatformApplication, DPlugin, ExternalDeployablePackage

public interface Deployable

Interface for deployable packages

Author:
Manuele Simi (ISTI-CNR)

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
 String deployApp(Set<org.gcube.common.core.scope.GCUBEScope> targets)
          Deploys the package as an application
 BaseTypedPackage getSourcePackage()
           
 org.gcube.common.core.resources.common.PlatformDescription getTargetPlatform()
           
 List<org.gcube.common.core.scope.GCUBEScope> getTargetsToAdd()
           
 void notifiyTargetsAdded(List<org.gcube.common.core.scope.GCUBEScope> targets)
           
 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
 void setTargetsToAdd(List<org.gcube.common.core.scope.GCUBEScope> targetsToAdd)
           
 boolean verify()
          Verifies if the package has been correctly deployed
 

Method Detail

deploy

void deploy(Set<org.gcube.common.core.scope.GCUBEScope> targets)
            throws PackageAldreadyDeployedException,
                   DeployException,
                   InvalidPackageArchiveException
Deploys the package

Parameters:
scopes - target scopes where the package is deployed
Throws:
DeployException - if something fails during the deployment activities
InvalidPackageArchiveException - if the format of the downloaded package is not valid
PackageAldreadyDeployedException - if the package is already deployed in the node

verify

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

preDeploy

void preDeploy()
               throws InvalidPackageArchiveException,
                      DeployException
Performs the pre-deployment operations

Throws:
DeployException
InvalidPackageArchiveException

postDeploy

void postDeploy()
                throws InvalidPackageArchiveException,
                       DeployException
Performs the post-deployment operations

Throws:
DeployException
InvalidPackageArchiveException

clean

void clean()
           throws DeployException
Cleans up all the temporary resources used to deploy the package

Throws:
DeployException

requireRestart

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

getTargetPlatform

org.gcube.common.core.resources.common.PlatformDescription getTargetPlatform()
Returns:
the target platform

deployApp

String deployApp(Set<org.gcube.common.core.scope.GCUBEScope> targets)
                 throws PackageAldreadyDeployedException,
                        DeployException,
                        InvalidPackageArchiveException
Deploys the package as an application

Parameters:
targets - target scopes
Returns:
Throws:
DeployException
InvalidPackageArchiveException
PackageAldreadyDeployedException

getSourcePackage

BaseTypedPackage getSourcePackage()
Returns:
the source package of this deployable

getTargetsToAdd

List<org.gcube.common.core.scope.GCUBEScope> getTargetsToAdd()

setTargetsToAdd

void setTargetsToAdd(List<org.gcube.common.core.scope.GCUBEScope> targetsToAdd)

notifiyTargetsAdded

void notifiyTargetsAdded(List<org.gcube.common.core.scope.GCUBEScope> targets)


Copyright © 2013. All Rights Reserved.