public abstract class UndeployablePackage extends BaseTypedPackage implements Undeployable
BaseTypedPackage.TYPEdependencies, installScripts, key, logger, packageFiles, properties, rebootScripts, targetsToAdd, uninstallScripts| Constructor and Description |
|---|
UndeployablePackage(BaseTypedPackage base) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDependencies(Set<KeyData> dependencies)
Adds new depencencies to the package
|
void |
addFile2Package(File file)
Adds a file to the list of package files.
|
void |
addInstallScript(String installScript) |
void |
addRebootScript(String rebootScript) |
void |
addScope(org.gcube.common.core.scope.GCUBEScope scope)
Adds a new scope to the package
|
void |
addUninstallScript(String uninstallScript) |
Set<KeyData> |
getDependencies()
Gets the list of dependencies of the package
|
List<String> |
getInstallScripts() |
KeyData |
getKey()
Gets the package unique key.
|
List<File> |
getPackageFileList()
Gets the list of files installed with the package
|
String |
getProperty(String name)
Gets a property from the package
|
List<String> |
getRebootScripts() |
Set<org.gcube.common.core.scope.GCUBEScope> |
getScopes()
Gets the target scopes to which the package is joined
|
Set<org.gcube.common.core.scope.GCUBEScope> |
getScopesToAdd()
Gets the target scopes to add to the package at the next restart
|
File |
getSerializationFile() |
org.gcube.common.core.resources.common.PlatformDescription |
getTargetPlatform()
Gets the target platform of this package
|
BaseTypedPackage.TYPE |
getType() |
List<String> |
getUninstallScripts() |
protected abstract void |
packageUndeploy(Set<org.gcube.common.core.scope.GCUBEScope> scopes,
boolean cleanState)
Performs package-specific undeployment actions
|
void |
postUndeploy()
Performs the following post-undeployment operations
execute the uninstall scripts from the unistall
remove all the reboot scripts from the reboot
|
void |
preUndeploy()
Performs the pre-undeployment operations
|
void |
printFiles() |
void |
removeFileFromPackage(File file)
Removes a file from the list of package files
|
void |
removeScope(org.gcube.common.core.scope.GCUBEScope scope)
Removes a scope from the package
|
void |
removeScopes(Set<org.gcube.common.core.scope.GCUBEScope> scopes)
Removes the given scopes from the package
|
boolean |
requireRestart()
States if after the undeployment, it is required to restart the container
|
void |
setProperty(String name,
String value)
Adds a property to the packge
|
void |
setScopes(Set<org.gcube.common.core.scope.GCUBEScope> scopes)
Sets the target scopes to which the package is joined
|
void |
setScopesToAdd(Set<org.gcube.common.core.scope.GCUBEScope> scopesToAdd)
Sets the target scopes to add to the package at the next restart
|
void |
setTargetPlatform(org.gcube.common.core.resources.common.PlatformDescription description)
Sets the target platform of this package
|
void |
setType(BaseTypedPackage.TYPE type) |
void |
undeploy(Set<org.gcube.common.core.scope.GCUBEScope> scopes,
boolean cleanState)
Undeploys the package from the scopes
|
boolean |
verify()
Verifies if the package has been correctly undeployed
|
getTargetsToAdd, notifiyTargetsAdded, setTargetsToAdd, toStringpublic UndeployablePackage(BaseTypedPackage base)
public void postUndeploy()
throws InvalidPackageArchiveException,
DeployException
postUndeploy in interface UndeployableDeployExceptionInvalidPackageArchiveExceptionpublic void preUndeploy()
throws InvalidPackageArchiveException,
DeployException
preUndeploy in interface UndeployableDeployExceptionInvalidPackageArchiveExceptionpublic void undeploy(Set<org.gcube.common.core.scope.GCUBEScope> scopes, boolean cleanState) throws DeployException, InvalidPackageArchiveException
undeploy in interface Undeployablescopes - scopes from which the package has to be undeployedcleanState - states if the package's state must be also removed after undeploymentDeployExceptionInvalidPackageArchiveExceptionprotected abstract void packageUndeploy(Set<org.gcube.common.core.scope.GCUBEScope> scopes, boolean cleanState) throws DeployException, InvalidPackageArchiveException
scopes - scopes from which the package has to be undeployedcleanState - states if the package's state must be also removed after undeploymentDeployExceptionInvalidPackageArchiveExceptionpublic void addDependencies(Set<KeyData> dependencies)
addDependencies in class BasePackagedependencies - the dependencies to addpublic void addFile2Package(File file)
addFile2Package in class BasePackagefile - the new file belonging the packagepublic void addInstallScript(String installScript)
addInstallScript in class BasePackagepublic void addRebootScript(String rebootScript)
addRebootScript in class BasePackagepublic void addUninstallScript(String uninstallScript)
addUninstallScript in class BasePackagepublic Set<KeyData> getDependencies()
getDependencies in class BasePackagepublic List<String> getInstallScripts()
getInstallScripts in class BasePackagepublic KeyData getKey()
getKey in class BasePackagepublic List<File> getPackageFileList()
getPackageFileList in class BasePackagepublic List<String> getRebootScripts()
getRebootScripts in class BasePackagepublic Set<org.gcube.common.core.scope.GCUBEScope> getScopes()
getScopes in class BasePackagepublic Set<org.gcube.common.core.scope.GCUBEScope> getScopesToAdd()
getScopesToAdd in class BasePackagepublic File getSerializationFile()
getSerializationFile in class BasePackagepublic BaseTypedPackage.TYPE getType()
getType in class BaseTypedPackagepublic List<String> getUninstallScripts()
getUninstallScripts in class BasePackagepublic void printFiles()
printFiles in class BasePackagepublic void removeFileFromPackage(File file)
removeFileFromPackage in class BasePackagefile - the file to removepublic void removeScopes(Set<org.gcube.common.core.scope.GCUBEScope> scopes)
removeScopes in class BasePackagescopes - the scopes to removepublic void setScopes(Set<org.gcube.common.core.scope.GCUBEScope> scopes)
setScopes in class BasePackagescopes - the targets to setpublic void setScopesToAdd(Set<org.gcube.common.core.scope.GCUBEScope> scopesToAdd)
setScopesToAdd in class BasePackagescopesToAdd - the scopesToAdd to setpublic void addScope(org.gcube.common.core.scope.GCUBEScope scope)
addScope in class BasePackagescope - the new scopepublic void removeScope(org.gcube.common.core.scope.GCUBEScope scope)
removeScope in class BasePackagescope - the scope to removepublic void setType(BaseTypedPackage.TYPE type)
setType in class BaseTypedPackagetype - the type to setpublic void setProperty(String name, String value)
setProperty in class BasePackagename - the property to setvalue - the value of the propertypublic String getProperty(String name)
getProperty in class BasePackagepublic boolean verify()
throws InvalidPackageArchiveException
Undeployableverify in interface UndeployableInvalidPackageArchiveException - if the package cannot be verifiedpublic boolean requireRestart()
UndeployablerequireRestart in interface Undeployablepublic org.gcube.common.core.resources.common.PlatformDescription getTargetPlatform()
BasePackagegetTargetPlatform in class BasePackagepublic void setTargetPlatform(org.gcube.common.core.resources.common.PlatformDescription description)
BasePackagesetTargetPlatform in class BasePackagedescription - the description of the target platformCopyright © 2015. All Rights Reserved.