|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.vremanagement.deployer.impl.resources.BasePackage
org.gcube.common.vremanagement.deployer.impl.resources.BaseTypedPackage
org.gcube.common.vremanagement.deployer.impl.resources.undeployment.UndeployablePackage
public abstract class UndeployablePackage
Base undeployable package
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.gcube.common.vremanagement.deployer.impl.resources.BaseTypedPackage |
|---|
BaseTypedPackage.TYPE |
| Field Summary |
|---|
| Fields inherited from class org.gcube.common.vremanagement.deployer.impl.resources.BasePackage |
|---|
dependencies, installScripts, key, logger, packageFiles, properties, rebootScripts, targetsToAdd, uninstallScripts |
| Constructor Summary | |
|---|---|
UndeployablePackage(BaseTypedPackage base)
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class org.gcube.common.vremanagement.deployer.impl.resources.BasePackage |
|---|
getTargetsToAdd, notifiyTargetsAdded, setTargetsToAdd, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UndeployablePackage(BaseTypedPackage base)
| Method Detail |
|---|
public void postUndeploy()
throws InvalidPackageArchiveException,
DeployException
postUndeploy in interface UndeployableDeployException
InvalidPackageArchiveException
public void preUndeploy()
throws InvalidPackageArchiveException,
DeployException
preUndeploy in interface UndeployableDeployException
InvalidPackageArchiveException
public 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 undeployment
DeployException
InvalidPackageArchiveException
protected 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 undeployment
DeployException
InvalidPackageArchiveExceptionpublic 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 set
public 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 BasePackage
public boolean verify()
throws InvalidPackageArchiveException
Undeployable
verify in interface UndeployableInvalidPackageArchiveException - if the package cannot be verifiedpublic boolean requireRestart()
Undeployable
requireRestart in interface Undeployablepublic org.gcube.common.core.resources.common.PlatformDescription getTargetPlatform()
BasePackage
getTargetPlatform in class BasePackagepublic void setTargetPlatform(org.gcube.common.core.resources.common.PlatformDescription description)
BasePackage
setTargetPlatform in class BasePackagedescription - the description of the target platform
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||