public abstract class CommonPackageDeploymentContext extends Object implements DeploymentContext
Modifier and Type | Field and Description |
---|---|
protected StringBuilder |
postInstallation |
protected StringBuilder |
postRemoval |
protected StringBuilder |
preInstallation |
protected StringBuilder |
preRemoval |
Constructor and Description |
---|
CommonPackageDeploymentContext(String packageName) |
Modifier and Type | Method and Description |
---|---|
void |
addInstallDependency(String packageName) |
void |
addPostInstallationScript(Reader reader)
Add a script as post installation script
|
void |
addPostRemovalScript(Reader reader)
Add a script as post removal script
|
void |
addPreInstallationScript(Reader reader)
Add a script as pre installation script
|
void |
addPreRemovalScript(Reader reader)
Add a script as pre removal script
|
Set<String> |
getDependencies() |
String |
getPackageName()
Get the name of the package that will be built
This is the name, not the file name, of the package. |
String |
getPostInstallationString() |
String |
getPostRemovalString() |
String |
getPreInstallationString() |
String |
getPreRemovalString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addDirectory, addFile, runAfterInstallation, runAfterRemoval
protected final StringBuilder postInstallation
protected final StringBuilder preInstallation
protected final StringBuilder postRemoval
protected final StringBuilder preRemoval
public CommonPackageDeploymentContext(String packageName)
public String getPackageName()
DeploymentContext
getPackageName
in interface DeploymentContext
public void addInstallDependency(String packageName)
addInstallDependency
in interface DeploymentContext
public String getPostInstallationString()
public String getPreInstallationString()
public String getPostRemovalString()
public String getPreRemovalString()
public void addPostInstallationScript(Reader reader) throws IOException
DeploymentContext
The method has to close the reader before it returns. Even in the case of an exception.
addPostInstallationScript
in interface DeploymentContext
reader
- the content to addIOException
- if anything goes wrongpublic void addPreInstallationScript(Reader reader) throws IOException
DeploymentContext
The method has to close the reader before it returns. Even in the case of an exception.
addPreInstallationScript
in interface DeploymentContext
reader
- the content to addIOException
- if anything goes wrongpublic void addPostRemovalScript(Reader reader) throws IOException
DeploymentContext
The method has to close the reader before it returns. Even in the case of an exception.
addPostRemovalScript
in interface DeploymentContext
reader
- the content to addIOException
- if anything goes wrongpublic void addPreRemovalScript(Reader reader) throws IOException
DeploymentContext
The method has to close the reader before it returns. Even in the case of an exception.
addPreRemovalScript
in interface DeploymentContext
reader
- the content to addIOException
- if anything goes wrong