com.atlassian.bitbucket.scm.CommandBuilderSupport<B extends com.atlassian.bitbucket.scm.CommandBuilderSupport<B>> |
Known Indirect Subclasses
|
Provides a unifying abstraction for common functionality expected to be provided by both free-form
CommandBuilder
s and, for those plugins which choose to provide them, type-safe builders.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clears any environment variables which have been set.
| |||||||||||
Applies the default
CommandExitHandler . | |||||||||||
Applies the default working directory, which is the working directory for the current Java process.
| |||||||||||
Sets the
CommandExitHandler which should be invoked after the command exits. | |||||||||||
Removes the environment variable with the provided
name if it has been set | |||||||||||
Adds an environment variable with the specified
name and value . | |||||||||||
Sets the working directory which should be used when the command is run.
| |||||||||||
Sets the working directory which should be used when the command is run.
| |||||||||||
Sets the working directory which should be used when the command is run.
|
Clears any environment variables which have been set.
this
Applies the default CommandExitHandler
. The default exit handler used is based on the builder in play;
each builder is free to define its own default exit handler.
Note: If no explicit exit handler is set
, the default will be applied
automatically when the command is built
; it is not possible to build a
command without an exit handler.
this
Applies the default working directory, which is the working directory for the current Java process. This may be useful for commands that create directories, such as SCM clone commands.
this
Sets the CommandExitHandler
which should be invoked after the command exits. This handler receives:
Throwable
thrown during processingvalue | the handler which should be invoked when the command exits |
---|
this
NullPointerException | if the provided value is null
|
---|
Removes the environment variable with the provided name
if it has been set
name | the name of the environment variable to clear |
---|
this
IllegalArgumentException | if name is empty or blank |
---|---|
NullPointerException | if name is null |
Adds an environment variable with the specified name
and value
. Both parameters are required,
and an exception will be thrown if either is not provided.
name | the name of the environment variable to set |
---|---|
value | the value to set for the environment variable |
this
IllegalArgumentException | if name or value is empty or blank |
---|---|
NullPointerException | if name or value is null |
Sets the working directory which should be used when the command is run. Paths provided here should be absolute, to ensure the command runs in the correct directory.
value | the absolute path to the desired working directory |
---|
this
IllegalArgumentException | if value references a nonexistent path, or a file |
---|---|
NullPointerException | if the provided value is null
|
Sets the working directory which should be used when the command is run.
value | the desired working directory |
---|
this
IllegalArgumentException | if value references a nonexistent path, or a file |
---|---|
NullPointerException | if the provided value is null
|
Sets the working directory which should be used when the command is run.
value | the desired working directory |
---|
this
IllegalArgumentException | if value references a nonexistent path, or a file |
---|---|
NullPointerException | if the provided value is null |