Added public methods to directly access configuration options
This commit is contained in:
parent
35287d7d6d
commit
6e8d3c2cd6
2 changed files with 63 additions and 18 deletions
|
@ -147,6 +147,15 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the operation should fail if the command exit value/status is not 0.
|
||||
*
|
||||
* @return {@code true} or {@code false}
|
||||
*/
|
||||
public boolean isFailOnExit() {
|
||||
return failOnExit_;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the command timeout.
|
||||
*
|
||||
|
@ -158,6 +167,15 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the command timeout.
|
||||
*
|
||||
* @return the timeout
|
||||
*/
|
||||
public int timeout() {
|
||||
return timeout_;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the working directory.
|
||||
*
|
||||
|
@ -178,4 +196,13 @@ public class ExecOperation extends AbstractOperation<ExecOperation> {
|
|||
public ExecOperation workDir(String dir) {
|
||||
return workDir(new File(dir));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the working directory.
|
||||
*
|
||||
* @return the directory
|
||||
*/
|
||||
public File workDir() {
|
||||
return workDir_;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue