com.atlassian.bamboo.command
Class AbstractCommandDecorator<T extends Command>

java.lang.Object
  extended by com.atlassian.bamboo.command.AbstractCommandDecorator<T>
All Implemented Interfaces:
CommandDecorator, BambooPluginModule
Direct Known Subclasses:
AbstractAntCommandDecorator, AbstractMaven2CommandDecorator, AbstractMavenCommandDecorator

public abstract class AbstractCommandDecorator<T extends Command>
extends java.lang.Object
implements CommandDecorator


Constructor Summary
protected AbstractCommandDecorator(java.lang.Class<T> commandClass)
           
 
Method Summary
 boolean canDecorate(Command command)
          Given a command, determine whether or not it can be decorated.
protected  BuildContext getBuildContext()
           
protected  T getCommand()
           
 void init(BuildContext buildContext)
           
protected  java.lang.String quoteArgument(java.lang.String argument)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.command.CommandDecorator
decorateArguments
 

Constructor Detail

AbstractCommandDecorator

protected AbstractCommandDecorator(java.lang.Class<T> commandClass)
Method Detail

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

getCommand

@Nullable
protected T getCommand()

getBuildContext

@Nullable
protected BuildContext getBuildContext()

quoteArgument

@NotNull
protected java.lang.String quoteArgument(@NotNull
                                                 java.lang.String argument)


Copyright © 2010 Atlassian. All Rights Reserved.