|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjenkins.plugins.shiningpanda.command.Command
public abstract class Command
Constructor Summary | |
---|---|
protected |
Command(String command,
boolean ignoreExitCode)
Constructor using fields. |
Method Summary | |
---|---|
protected hudson.FilePath |
createScriptFile(hudson.FilePath dir)
Create content of the script execute. |
static Command |
get(boolean isUnix,
String executable,
CommandNature nature,
String command,
boolean ignoreExitCode)
Get the right command executor. |
protected abstract hudson.util.ArgumentListBuilder |
getArguments(hudson.FilePath script)
Get the command line to execute. |
protected String |
getCommand()
Get the content of the script to execute. |
protected abstract 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 |
getExtension()
Get the extension of the script file. |
protected boolean |
isExitCodeIgnored()
Is the exit code ignored? |
boolean |
launch(hudson.Launcher launcher,
hudson.model.TaskListener listener,
hudson.EnvVars environment,
hudson.FilePath pwd)
Launch the command. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Command(String command, boolean ignoreExitCode)
command
- The content of the execution scriptignoreExitCode
- Is exit code ignored?Method Detail |
---|
protected String getCommand()
protected boolean isExitCodeIgnored()
protected abstract String getExtension()
protected abstract String getContents()
protected abstract hudson.util.ArgumentListBuilder getArguments(hudson.FilePath script)
script
- The script to execute
protected hudson.EnvVars getEnvironment(hudson.FilePath pwd, hudson.EnvVars environment)
pwd
- The working directoryenvironment
- The environment
protected hudson.FilePath createScriptFile(hudson.FilePath dir) throws IOException, InterruptedException
dir
- The folder in which the script is created
IOException
InterruptedException
public boolean launch(hudson.Launcher launcher, hudson.model.TaskListener listener, hudson.EnvVars environment, hudson.FilePath pwd) throws InterruptedException
launcher
- The launcherlistener
- The listenerenvironment
- The environmentpwd
- The current directory
InterruptedException
public static Command get(boolean isUnix, String executable, CommandNature nature, String command, boolean ignoreExitCode)
isUnix
- Target execution platformexecutable
- The PYTHON executablenature
- The nature of the command: PYTHON, shell, X shellcommand
- The content of the script to executeignoreExitCode
- Is exit code ignored?
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |