com.atlassian.bamboo.command
Class AbstractCommandDecorator<T extends Command>
java.lang.Object
com.atlassian.bamboo.command.AbstractCommandDecorator<T>
- All Implemented Interfaces:
- CommandDecorator, BambooPluginModule
- Direct Known Subclasses:
- IsolatedLocalRepositoryMavenCommandDecorator, IsolatedTmpDirAntCommandDecorator, IsolatedTmpDirMavenCommandDecorator
public abstract class AbstractCommandDecorator<T extends Command>
- extends java.lang.Object
- implements CommandDecorator
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractCommandDecorator
protected AbstractCommandDecorator(java.lang.Class<T> commandClass)
canDecorate
public boolean canDecorate(Command command)
- Description copied from interface:
CommandDecorator
- Given a command, determine whether or not it can be decorated. If this method returns false, then the
decorateArguments method will not get called.
- Specified by:
canDecorate
in interface CommandDecorator
- Parameters:
command
- the command that will be decorated
- Returns:
true
if the command can be decorated by this Decorator. false otherwise.
init
public void init(BuildContext buildContext)
- Specified by:
init
in interface CommandDecorator
addArgument
protected void addArgument(@NotNull
java.util.List<java.lang.String> args,
@NotNull
java.lang.String argument)
- Argument is added to the beginning of command line.
On Windows the command line might start with /c call script.bat
therefore options shall be added starting from index 3
- Parameters:
args
- Commandline argumentsargument
- Argument to be added to commandline
getCommand
@Nullable
protected T getCommand()
getBuildContext
@Nullable
protected BuildContext getBuildContext()
quoteArgument
@NotNull
protected java.lang.String quoteArgument(@NotNull
java.lang.String argument)
Copyright © 2011 Atlassian. All Rights Reserved.