public class BasePackage extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Set<KeyData> |
dependencies
package's dependencies
|
protected List<String> |
installScripts
The list of installation scripts
|
protected KeyData |
key
the package unique key
|
org.gcube.common.core.utils.logging.GCUBELog |
logger
local logger
|
protected List<File> |
packageFiles
The list of files installed with the package
|
protected Map<String,String> |
properties
package-specific properties
|
protected List<String> |
rebootScripts
The list of reboot scripts
|
protected ArrayList<String> |
targetsToAdd
scopes to add after the next restart
|
protected List<String> |
uninstallScripts
The list of uninstall scripts
|
| Modifier | Constructor and Description |
|---|---|
protected |
BasePackage() |
|
BasePackage(String serviceClass,
String serviceName,
String serviceVersion,
String packagename,
String packageVersion) |
| 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
|
List<org.gcube.common.core.scope.GCUBEScope> |
getTargetsToAdd()
Sets the target scopes to add to the package at the next restart
|
List<String> |
getUninstallScripts() |
void |
notifiyTargetsAdded(List<org.gcube.common.core.scope.GCUBEScope> targets)
Notifies to the package that it has been added to the given target scopes
|
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
|
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 |
setTargetsToAdd(List<org.gcube.common.core.scope.GCUBEScope> targetsToAdd)
Sets the target scopes to add to the package at the next restart
|
String |
toString() |
public transient org.gcube.common.core.utils.logging.GCUBELog logger
protected KeyData key
public KeyData getKey()
public File getSerializationFile()
public List<File> getPackageFileList()
public void addFile2Package(File file)
file - the new file belonging the packagepublic void removeFileFromPackage(File file)
file - the file to removepublic void printFiles()
public void addInstallScript(String installScript)
installScripts - the installScripts to setpublic void addRebootScript(String rebootScript)
rebootScripts - the rebootScripts to setpublic void addUninstallScript(String uninstallScript)
uninstallScripts - the uninstallScripts to setpublic Set<org.gcube.common.core.scope.GCUBEScope> getScopes()
public void setScopes(Set<org.gcube.common.core.scope.GCUBEScope> scopes)
scopes - the targets to setpublic void addScope(org.gcube.common.core.scope.GCUBEScope scope)
scope - the new scopepublic void removeScope(org.gcube.common.core.scope.GCUBEScope scope)
scope - the scope to removepublic void removeScopes(Set<org.gcube.common.core.scope.GCUBEScope> scopes)
scopes - the scopes to removepublic Set<org.gcube.common.core.scope.GCUBEScope> getScopesToAdd()
public void setScopesToAdd(Set<org.gcube.common.core.scope.GCUBEScope> scopesToAdd)
scopesToAdd - the scopesToAdd to setpublic Set<KeyData> getDependencies()
public void addDependencies(Set<KeyData> dependencies)
dependencies - the dependencies to addpublic void setProperty(String name, String value)
name - the property to setvalue - the value of the propertypublic String getProperty(String name)
public org.gcube.common.core.resources.common.PlatformDescription getTargetPlatform()
public void setTargetPlatform(org.gcube.common.core.resources.common.PlatformDescription description)
description - the description of the target platformpublic final List<org.gcube.common.core.scope.GCUBEScope> getTargetsToAdd()
public final void setTargetsToAdd(List<org.gcube.common.core.scope.GCUBEScope> targetsToAdd)
targetsToAdd - the targets scopespublic final void notifiyTargetsAdded(List<org.gcube.common.core.scope.GCUBEScope> targets)
targets - the target scopeCopyright © 2015. All Rights Reserved.