public abstract class AbstractNutsExecCommand extends NutsWorkspaceCommandBase<NutsExecCommand> implements NutsExecCommand
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractNutsExecCommand.SPrintStream |
| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
command |
protected NutsDefinition |
commandDefinition |
protected String |
directory |
protected boolean |
dry |
protected Map<String,String> |
env |
protected NutsPrintStream |
err |
protected boolean |
executed |
protected NutsExecutionType |
executionType |
protected List<String> |
executorOptions |
protected boolean |
failFast |
protected InputStream |
in |
protected NutsPrintStream |
out |
protected boolean |
redirectErrorStream |
protected NutsExecutionException |
result |
protected NutsRunAs |
runAs |
session, ws| Constructor and Description |
|---|
AbstractNutsExecCommand(NutsWorkspace ws) |
_LOG, _LOGOP, checkSession, configure, configure, copyFromWorkspaceCommandBase, copySession, getCommandName, getSession, getWorkspace, invalidateResult, setSession, setWsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitconfigure, copySession, run, setSession, whichgetSessionconfigure, configureLastprotected NutsDefinition commandDefinition
protected NutsExecutionException result
protected boolean executed
protected String directory
protected NutsPrintStream out
protected NutsPrintStream err
protected InputStream in
protected NutsExecutionType executionType
protected NutsRunAs runAs
protected boolean redirectErrorStream
protected boolean failFast
protected boolean dry
public AbstractNutsExecCommand(NutsWorkspace ws)
public NutsExecCommandFormat formatter()
formatter in interface NutsExecCommandpublic NutsExecCommand setFailFast(boolean failFast)
setFailFast in interface NutsExecCommandpublic boolean isFailFast()
isFailFast in interface NutsExecCommandpublic String[] getCommand()
getCommand in interface NutsExecCommandpublic NutsExecCommand setCommand(NutsDefinition definition)
setCommand in interface NutsExecCommandpublic NutsExecCommand setCommand(String... command)
setCommand in interface NutsExecCommandpublic NutsExecCommand setCommand(Collection<String> command)
setCommand in interface NutsExecCommandpublic NutsExecCommand addCommand(String... command)
addCommand in interface NutsExecCommandpublic NutsExecCommand clearCommand()
clearCommand in interface NutsExecCommandpublic NutsExecCommand addCommand(Collection<String> command)
addCommand in interface NutsExecCommandpublic NutsExecCommand addExecutorOption(String executorOption)
addExecutorOption in interface NutsExecCommandpublic NutsExecCommand addExecutorOptions(String... executorOptions)
addExecutorOptions in interface NutsExecCommandpublic NutsExecCommand addExecutorOptions(Collection<String> executorOptions)
addExecutorOptions in interface NutsExecCommandpublic NutsExecCommand clearExecutorOptions()
clearExecutorOptions in interface NutsExecCommandpublic Map<String,String> getEnv()
getEnv in interface NutsExecCommandpublic NutsExecCommand addEnv(Map<String,String> env)
addEnv in interface NutsExecCommandpublic NutsExecCommand setEnv(String key, String value)
setEnv in interface NutsExecCommandpublic NutsExecCommand setEnv(Map<String,String> env)
setEnv in interface NutsExecCommandpublic NutsExecCommand clearEnv()
clearEnv in interface NutsExecCommandpublic String getDirectory()
getDirectory in interface NutsExecCommandpublic NutsExecCommand setDirectory(String directory)
setDirectory in interface NutsExecCommandpublic InputStream getIn()
getIn in interface NutsExecCommandpublic boolean isInheritSystemIO()
isInheritSystemIO in interface NutsExecCommandpublic NutsExecCommand setInheritSystemIO(boolean inheritSystemIO)
setInheritSystemIO in interface NutsExecCommandpublic NutsExecCommand setIn(InputStream in)
setIn in interface NutsExecCommandpublic NutsPrintStream getOut()
getOut in interface NutsExecCommandpublic NutsExecCommand grabOutputString()
grabOutputString in interface NutsExecCommandpublic NutsExecCommand grabErrorString()
grabErrorString in interface NutsExecCommandpublic String getOutputString()
getOutputString in interface NutsExecCommandpublic String getOutputString0()
public String getErrorString()
getErrorString in interface NutsExecCommandpublic NutsExecCommand setOut(NutsPrintStream out)
setOut in interface NutsExecCommandpublic NutsExecCommand setErr(NutsPrintStream err)
setErr in interface NutsExecCommandpublic NutsPrintStream getErr()
getErr in interface NutsExecCommandpublic NutsExecutionType getExecutionType()
getExecutionType in interface NutsExecCommandpublic boolean isRedirectErrorStream()
isRedirectErrorStream in interface NutsExecCommandpublic NutsExecCommand setRedirectErrorStream(boolean redirectErrorStream)
setRedirectErrorStream in interface NutsExecCommandpublic NutsExecCommand setExecutionType(NutsExecutionType executionType)
setExecutionType in interface NutsExecCommandpublic NutsRunAs getRunAs()
getRunAs in interface NutsExecCommandpublic NutsExecCommand setRunAs(NutsRunAs runAs)
setRunAs in interface NutsExecCommandpublic NutsExecCommand copyFrom(NutsExecCommand other)
copyFrom in interface NutsExecCommandpublic NutsExecCommand copy()
copy in interface NutsExecCommandpublic int getResult()
getResult in interface NutsExecCommandpublic String[] getExecutorOptions()
getExecutorOptions in interface NutsExecCommandpublic NutsExecutionException getResultException()
getResultException in interface NutsExecCommandprotected String getExtraErrorMessage()
public boolean configureFirst(NutsCommandLine cmdLine)
configureFirst in interface NutsCommandLineConfigurableconfigureFirst in class NutsWorkspaceCommandBase<NutsExecCommand>public boolean isDry()
isDry in interface NutsExecCommandpublic NutsExecCommand setDry(boolean value)
setDry in interface NutsExecCommandpublic boolean isGrabOutputString()
public boolean isGrabErrorString()
public String getCommandString()
public String getCommandString(ProcessBuilder2.CommandStringFormat f)
public int getSleepMillis()
getSleepMillis in interface NutsExecCommandpublic NutsExecCommand setSleepMillis(int sleepMillis)
setSleepMillis in interface NutsExecCommandpublic String getRedirectOuputFile()
getRedirectOuputFile in interface NutsExecCommandpublic NutsExecCommand setRedirectOuputFile(String redirectOuputFile)
setRedirectOuputFile in interface NutsExecCommandpublic String getRedirectInpuFile()
getRedirectInpuFile in interface NutsExecCommandpublic NutsExecCommand setRedirectInpuFile(String redirectInpuFile)
setRedirectInpuFile in interface NutsExecCommandCopyright © 2021 vpc open source initiative. All rights reserved.