public abstract class BaseStep
extends java.lang.Object
implements com.xebialabs.deployit.plugin.api.flow.Step
| Modifier and Type | Field and Description |
|---|---|
protected com.xebialabs.deployit.plugin.overthere.HostContainer |
container |
protected com.xebialabs.deployit.plugin.api.flow.ExecutionContext |
ctx |
static java.lang.String |
FREEMARKER_FILE_EXT |
protected org.slf4j.Logger |
logger |
protected com.xebialabs.overthere.OverthereConnection |
remoteConn |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseStep(com.xebialabs.deployit.plugin.overthere.HostContainer container) |
protected |
BaseStep(java.lang.String description,
com.xebialabs.deployit.plugin.overthere.HostContainer container) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
classpathResourceExists(java.lang.String resource) |
protected ArtifactUploader |
createArtifactUploader() |
void |
createOrReplaceHostFile(java.lang.String content,
java.lang.String remoteFile) |
protected void |
disconnect() |
protected abstract com.xebialabs.deployit.plugin.api.flow.StepExitCode |
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)
Deprecated.
Use
evaluateTemplate(String, Map, boolean) instead. |
java.lang.String |
evaluateTemplate(java.lang.String templatePath,
java.util.Map<java.lang.String,java.lang.Object> vars,
boolean maskPasswords) |
java.lang.String |
evaluateTemplate(java.lang.String templatePath,
java.util.Map<java.lang.String,java.lang.Object> vars,
boolean maskPasswords,
ArtifactUploader artifactUploader) |
ArtifactUploader |
getArtifactUploader() |
com.xebialabs.deployit.plugin.overthere.HostContainer |
getContainer() |
protected com.xebialabs.deployit.plugin.api.flow.ExecutionContext |
getCtx() |
java.lang.String |
getDescription() |
java.lang.String |
getHostFileSeparator() |
java.lang.String |
getHostLineSeparator() |
com.xebialabs.overthere.OverthereConnection |
getLocalConnection() |
com.xebialabs.overthere.OverthereConnection |
getRemoteConnection() |
com.xebialabs.overthere.OverthereFile |
getRemoteWorkingDirectory() |
java.lang.String |
getRemoteWorkingDirPath() |
com.xebialabs.deployit.plugin.api.flow.StepExitCode |
handleExecute(com.xebialabs.deployit.plugin.api.flow.ExecutionContext ctx) |
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) |
static java.lang.String |
substringAfterLast(java.lang.String str,
char sub) |
static java.lang.String |
substringAfterLast(java.lang.String str,
char sub,
java.lang.String defaultValue) |
protected com.xebialabs.overthere.OverthereFile |
uploadToWorkingDirectory(java.io.File content,
java.lang.String fileName) |
protected com.xebialabs.overthere.OverthereFile |
uploadToWorkingDirectory(java.lang.String content,
java.lang.String fileName) |
protected com.xebialabs.overthere.OverthereFile |
uploadToWorkingDirectory(java.net.URL content,
java.lang.String fileName) |
public static final java.lang.String FREEMARKER_FILE_EXT
protected com.xebialabs.deployit.plugin.overthere.HostContainer container
protected transient com.xebialabs.overthere.OverthereConnection remoteConn
protected transient com.xebialabs.deployit.plugin.api.flow.ExecutionContext ctx
protected final org.slf4j.Logger logger
protected BaseStep(java.lang.String description,
com.xebialabs.deployit.plugin.overthere.HostContainer container)
protected BaseStep(com.xebialabs.deployit.plugin.overthere.HostContainer container)
public java.lang.String getDescription()
getDescription in interface com.xebialabs.deployit.plugin.api.flow.Steppublic com.xebialabs.deployit.plugin.api.flow.StepExitCode handleExecute(com.xebialabs.deployit.plugin.api.flow.ExecutionContext ctx)
throws java.lang.Exception
java.lang.Exceptionprotected abstract com.xebialabs.deployit.plugin.api.flow.StepExitCode doExecute()
throws java.lang.Exception
java.lang.Exceptionprotected com.xebialabs.deployit.plugin.api.flow.ExecutionContext getCtx()
public com.xebialabs.deployit.plugin.overthere.HostContainer getContainer()
public com.xebialabs.overthere.OverthereFile getRemoteWorkingDirectory()
public com.xebialabs.overthere.OverthereConnection getLocalConnection()
public com.xebialabs.overthere.OverthereConnection getRemoteConnection()
protected void disconnect()
public ArtifactUploader getArtifactUploader()
public java.lang.String getRemoteWorkingDirPath()
public void setRemoteWorkingDirPath(java.lang.String remoteWorkingDirPath)
public boolean isRetainRemoteWorkingDirOnCompletion()
public void setRetainRemoteWorkingDirOnCompletion(boolean deleteWorkingDirOnCompletion)
protected com.xebialabs.overthere.OverthereFile uploadToWorkingDirectory(java.lang.String content,
java.lang.String fileName)
protected com.xebialabs.overthere.OverthereFile uploadToWorkingDirectory(java.io.File content,
java.lang.String fileName)
protected com.xebialabs.overthere.OverthereFile uploadToWorkingDirectory(java.net.URL content,
java.lang.String fileName)
public boolean hostFileExists(java.lang.String remoteFile)
public java.lang.String getHostLineSeparator()
public java.lang.String getHostFileSeparator()
public java.lang.String readHostFile(java.lang.String remoteFile)
public java.lang.String[] readHostFileLines(java.lang.String remoteFile)
public void createOrReplaceHostFile(java.lang.String content,
java.lang.String remoteFile)
public freemarker.ext.dom.NodeModel readHostXmlFileAsModel(java.lang.String remoteXmlFile)
public java.lang.String evaluateTemplate(java.lang.String templatePath,
java.util.Map<java.lang.String,java.lang.Object> vars)
evaluateTemplate(String, Map, boolean) instead.public java.lang.String evaluateTemplate(java.lang.String templatePath,
java.util.Map<java.lang.String,java.lang.Object> vars,
boolean maskPasswords)
public java.lang.String evaluateTemplate(java.lang.String templatePath,
java.util.Map<java.lang.String,java.lang.Object> vars,
boolean maskPasswords,
ArtifactUploader artifactUploader)
protected ArtifactUploader createArtifactUploader()
protected void evaluateTemplate(com.xebialabs.overthere.OverthereFile renderTo,
java.lang.String templatePath,
java.util.Map<java.lang.String,java.lang.Object> vars)
public java.lang.String resolveOsSpecificTemplate(java.lang.String template)
public boolean classpathResourceExists(java.lang.String resource)
public static java.lang.String substringAfterLast(java.lang.String str,
char sub,
java.lang.String defaultValue)
public static java.lang.String substringAfterLast(java.lang.String str,
char sub)