com.xebialabs.deployit.plugin.generic.step
Class GenericBaseStep
java.lang.Object
com.xebialabs.deployit.plugin.generic.step.GenericBaseStep
- All Implemented Interfaces:
- com.xebialabs.deployit.plugin.api.deployment.execution.DeploymentStep, com.xebialabs.deployit.plugin.api.execution.Step<com.xebialabs.deployit.plugin.api.deployment.execution.DeploymentExecutionContext>, java.io.Serializable
- Direct Known Subclasses:
- ArtifactCopyStep, ArtifactDeleteStep, ScriptExecutionStep
public abstract class GenericBaseStep
- extends java.lang.Object
- implements com.xebialabs.deployit.plugin.api.deployment.execution.DeploymentStep
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from interface com.xebialabs.deployit.plugin.api.execution.Step |
com.xebialabs.deployit.plugin.api.execution.Step.Result |
|
Constructor Summary |
protected |
GenericBaseStep(int order,
com.xebialabs.deployit.plugin.overthere.HostContainer container)
|
protected |
GenericBaseStep(int order,
java.lang.String description,
com.xebialabs.deployit.plugin.overthere.HostContainer container)
|
|
Method Summary |
boolean |
classpathResourceExists(java.lang.String resource)
|
void |
createOrReplaceHostFile(java.lang.String content,
java.lang.String remoteFile)
|
protected void |
disconnect()
|
protected abstract com.xebialabs.deployit.plugin.api.execution.Step.Result |
doExecute()
|
protected void |
evaluateTemplate(com.xebialabs.overthere.OverthereFile renderTo,
java.lang.String templatePath,
java.util.Map<java.lang.String,java.lang.Object> vars)
|
java.lang.String |
evaluateTemplate(java.lang.String templatePath,
java.util.Map<java.lang.String,java.lang.Object> vars)
|
com.xebialabs.deployit.plugin.api.execution.Step.Result |
execute(com.xebialabs.deployit.plugin.api.deployment.execution.DeploymentExecutionContext ctx)
|
protected com.xebialabs.deployit.plugin.overthere.HostContainer |
getContainer()
|
protected com.xebialabs.deployit.plugin.api.deployment.execution.DeploymentExecutionContext |
getCtx()
|
java.lang.String |
getDescription()
|
java.lang.String |
getHostFileSeparator()
|
java.lang.String |
getHostLineSeparator()
|
com.xebialabs.overthere.OverthereConnection |
getLocalConnection()
|
int |
getOrder()
|
com.xebialabs.overthere.OverthereConnection |
getRemoteConnection()
|
com.xebialabs.overthere.OverthereFile |
getRemoteWorkingDirectory()
|
java.lang.String |
getRemoteWorkingDirPath()
|
boolean |
hostFileExists(java.lang.String remoteFile)
|
boolean |
isRetainRemoteWorkingDirOnCompletion()
|
java.lang.String |
readHostFile(java.lang.String remoteFile)
|
java.lang.String[] |
readHostFileLines(java.lang.String remoteFile)
|
freemarker.ext.dom.NodeModel |
readHostXmlFileAsModel(java.lang.String remoteXmlFile)
|
java.lang.String |
resolveOsSpecificTemplate(java.lang.String template)
|
void |
setRemoteWorkingDirPath(java.lang.String remoteWorkingDirPath)
|
void |
setRetainRemoteWorkingDirOnCompletion(boolean deleteWorkingDirOnCompletion)
|
java.lang.String |
substringAfterLast(java.lang.String str,
char sub)
|
java.lang.String |
substringAfterLast(java.lang.String str,
char sub,
java.lang.String defaultValue)
|
com.xebialabs.overthere.OverthereFile |
uploadResourceToWorkingDirectory(java.lang.String resource)
|
com.xebialabs.overthere.OverthereFile |
uploadToWorkingDirectory(java.io.File content,
java.lang.String fileName)
|
com.xebialabs.overthere.OverthereFile |
uploadToWorkingDirectory(java.lang.String content,
java.lang.String fileName)
|
com.xebialabs.overthere.OverthereFile |
uploadToWorkingDirectory(java.net.URL content,
java.lang.String fileName)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FREEMARKER_FILE_EXT
public static final java.lang.String FREEMARKER_FILE_EXT
- See Also:
- Constant Field Values
logger
protected final org.slf4j.Logger logger
GenericBaseStep
protected GenericBaseStep(int order,
java.lang.String description,
com.xebialabs.deployit.plugin.overthere.HostContainer container)
GenericBaseStep
protected GenericBaseStep(int order,
com.xebialabs.deployit.plugin.overthere.HostContainer container)
getOrder
public int getOrder()
- Specified by:
getOrder in interface com.xebialabs.deployit.plugin.api.deployment.execution.DeploymentStep
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription in interface com.xebialabs.deployit.plugin.api.execution.Step<com.xebialabs.deployit.plugin.api.deployment.execution.DeploymentExecutionContext>
execute
public com.xebialabs.deployit.plugin.api.execution.Step.Result execute(com.xebialabs.deployit.plugin.api.deployment.execution.DeploymentExecutionContext ctx)
throws java.lang.Exception
- Specified by:
execute in interface com.xebialabs.deployit.plugin.api.execution.Step<com.xebialabs.deployit.plugin.api.deployment.execution.DeploymentExecutionContext>
- Throws:
java.lang.Exception
doExecute
protected abstract com.xebialabs.deployit.plugin.api.execution.Step.Result doExecute()
throws java.lang.Exception
- Throws:
java.lang.Exception
getCtx
protected com.xebialabs.deployit.plugin.api.deployment.execution.DeploymentExecutionContext getCtx()
getContainer
protected com.xebialabs.deployit.plugin.overthere.HostContainer getContainer()
getRemoteWorkingDirectory
public com.xebialabs.overthere.OverthereFile getRemoteWorkingDirectory()
getLocalConnection
public com.xebialabs.overthere.OverthereConnection getLocalConnection()
getRemoteConnection
public com.xebialabs.overthere.OverthereConnection getRemoteConnection()
disconnect
protected void disconnect()
getRemoteWorkingDirPath
public java.lang.String getRemoteWorkingDirPath()
setRemoteWorkingDirPath
public void setRemoteWorkingDirPath(java.lang.String remoteWorkingDirPath)
isRetainRemoteWorkingDirOnCompletion
public boolean isRetainRemoteWorkingDirOnCompletion()
setRetainRemoteWorkingDirOnCompletion
public void setRetainRemoteWorkingDirOnCompletion(boolean deleteWorkingDirOnCompletion)
uploadResourceToWorkingDirectory
public com.xebialabs.overthere.OverthereFile uploadResourceToWorkingDirectory(java.lang.String resource)
uploadToWorkingDirectory
public com.xebialabs.overthere.OverthereFile uploadToWorkingDirectory(java.lang.String content,
java.lang.String fileName)
uploadToWorkingDirectory
public com.xebialabs.overthere.OverthereFile uploadToWorkingDirectory(java.io.File content,
java.lang.String fileName)
uploadToWorkingDirectory
public com.xebialabs.overthere.OverthereFile uploadToWorkingDirectory(java.net.URL content,
java.lang.String fileName)
hostFileExists
public boolean hostFileExists(java.lang.String remoteFile)
getHostLineSeparator
public java.lang.String getHostLineSeparator()
getHostFileSeparator
public java.lang.String getHostFileSeparator()
readHostFile
public java.lang.String readHostFile(java.lang.String remoteFile)
readHostFileLines
public java.lang.String[] readHostFileLines(java.lang.String remoteFile)
createOrReplaceHostFile
public void createOrReplaceHostFile(java.lang.String content,
java.lang.String remoteFile)
readHostXmlFileAsModel
public freemarker.ext.dom.NodeModel readHostXmlFileAsModel(java.lang.String remoteXmlFile)
evaluateTemplate
public java.lang.String evaluateTemplate(java.lang.String templatePath,
java.util.Map<java.lang.String,java.lang.Object> vars)
resolveOsSpecificTemplate
public java.lang.String resolveOsSpecificTemplate(java.lang.String template)
classpathResourceExists
public boolean classpathResourceExists(java.lang.String resource)
evaluateTemplate
protected void evaluateTemplate(com.xebialabs.overthere.OverthereFile renderTo,
java.lang.String templatePath,
java.util.Map<java.lang.String,java.lang.Object> vars)
substringAfterLast
public java.lang.String substringAfterLast(java.lang.String str,
char sub,
java.lang.String defaultValue)
substringAfterLast
public java.lang.String substringAfterLast(java.lang.String str,
char sub)