jenkins.plugins.shiningpanda.command
Class ShellCommand

java.lang.Object
  extended by jenkins.plugins.shiningpanda.command.Command
      extended by jenkins.plugins.shiningpanda.command.ShellCommand
Direct Known Subclasses:
UnixCommand, WindowsCommand

public abstract class ShellCommand
extends Command


Field Summary
protected  boolean convert
          Convert command to match platform specificities
 
Constructor Summary
protected ShellCommand(String command, boolean ignoreExitCode, boolean convert)
          Constructor using fields.
 
Method Summary
protected  String getContents()
          Get the content of the script file
protected  hudson.EnvVars getEnvironment(hudson.FilePath pwd, hudson.EnvVars environment)
          Be able to have a late environment processing.
protected abstract  String getSourceContent()
          Get the script content before potential conversions.
protected abstract  String getSourceSeparator()
          Get the separator to replace during conversion.
protected abstract  Pattern getSourceVariable()
          Get the variable pattern.
protected abstract  String getTargetSeparator()
          Get the separator.
protected abstract  String getTargetVariable()
          Get the variable replacement pattern.
 
Methods inherited from class jenkins.plugins.shiningpanda.command.Command
createScriptFile, get, getArguments, getCommand, getExtension, isExitCodeIgnored, launch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

convert

protected boolean convert
Convert command to match platform specificities

Constructor Detail

ShellCommand

protected ShellCommand(String command,
                       boolean ignoreExitCode,
                       boolean convert)
Constructor using fields.

Parameters:
command - The content of the execution script
ignoreExitCode - Is exit code ignored?
convert - Convert batch to shell
Method Detail

getSourceContent

protected abstract String getSourceContent()
Get the script content before potential conversions.

Returns:
The contents

getSourceSeparator

protected abstract String getSourceSeparator()
Get the separator to replace during conversion.

Returns:
The separator

getTargetSeparator

protected abstract String getTargetSeparator()
Get the separator.

Returns:
The separator

getSourceVariable

protected abstract Pattern getSourceVariable()
Get the variable pattern.

Returns:
The variable pattern

getTargetVariable

protected abstract String getTargetVariable()
Get the variable replacement pattern.

Returns:
The variable replacement pattern

getEnvironment

protected hudson.EnvVars getEnvironment(hudson.FilePath pwd,
                                        hudson.EnvVars environment)
Description copied from class: Command
Be able to have a late environment processing.

Overrides:
getEnvironment in class Command
Parameters:
pwd - The working directory
environment - The environment
Returns:
The processed environment

getContents

protected final String getContents()
Description copied from class: Command
Get the content of the script file

Specified by:
getContents in class Command
Returns:
The content of the file


Copyright © 2004-2012. All Rights Reserved.