com.atlassian.bamboo.build.strategy
Class AfterSuccessfulPlanTrigger

java.lang.Object
  extended by com.atlassian.bamboo.build.strategy.AbstractBuildStrategy
      extended by com.atlassian.bamboo.build.strategy.AfterSuccessfulPlanTrigger
All Implemented Interfaces:
BuildStrategy, BambooIdProvider, ConvertibleFromConfig, UpdatableBuildStrategy, java.io.Serializable

public class AfterSuccessfulPlanTrigger
extends AbstractBuildStrategy
implements UpdatableBuildStrategy

See Also:
Serialized Form

Field Summary
static java.lang.String KEY
           
static java.lang.String TRIGGERING_PLAN_KEY
           
 
Constructor Summary
AfterSuccessfulPlanTrigger()
           
 
Method Summary
 boolean canTrigger(java.lang.Class<? extends Triggerable> triggerableType)
          Default implementation: trigger only works for Chains
 java.lang.String getDescription()
           
 java.lang.String getKey()
          A lowercase string key to identify the build strategy
 java.lang.String getName()
          Returns the display name of the strategy type.
 void init(Triggerable triggerable)
          Default to do nothing
 void onRemove(Triggerable triggerable)
          Called on removal of this BuildStrategy
 void onSave(Triggerable triggerable)
          Called on creation and update of this BuildStrategy
 void populateFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
          Update the current object with data in the HierarchicalConfiguration
 void setEnvironmentDependencyService(EnvironmentDependencyService environmentDependencyService)
           
 void setImmutablePlanCacheService(ImmutablePlanCacheService immutablePlanCacheService)
           
 void setTriggeringPlan(PlanKey triggeringPlan)
           
 org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
          Generate a HierarchicalConfiguration from the current state of the object
 ErrorCollection validate(BuildConfiguration buildConfiguration)
          Takes in a BuildConfiguration and returns any errors possible
 
Methods inherited from class com.atlassian.bamboo.build.strategy.AbstractBuildStrategy
addDefaultValues, getBuildStrategyManager, getId, getTextProvider, getTriggerConditionsConfiguration, getUserDescription, setId, setUserDescription
 
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.build.strategy.BuildStrategy
addDefaultValues, getTriggerConditionsConfiguration, getUserDescription, setId, setUserDescription
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 

Field Detail

KEY

public static final java.lang.String KEY
See Also:
Constant Field Values

TRIGGERING_PLAN_KEY

public static final java.lang.String TRIGGERING_PLAN_KEY
See Also:
Constant Field Values
Constructor Detail

AfterSuccessfulPlanTrigger

public AfterSuccessfulPlanTrigger()
Method Detail

getKey

public java.lang.String getKey()
Description copied from interface: BuildStrategy
A lowercase string key to identify the build strategy

Specified by:
getKey in interface BuildStrategy
Returns:
String must not be null

getName

public java.lang.String getName()
Description copied from interface: BuildStrategy
Returns the display name of the strategy type.

Specified by:
getName in interface BuildStrategy
Returns:
String must not be null

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface BuildStrategy
Overrides:
getDescription in class AbstractBuildStrategy

onSave

public void onSave(@NotNull
                   Triggerable triggerable)
Description copied from interface: UpdatableBuildStrategy
Called on creation and update of this BuildStrategy

Specified by:
onSave in interface UpdatableBuildStrategy

onRemove

public void onRemove(@NotNull
                     Triggerable triggerable)
Description copied from interface: UpdatableBuildStrategy
Called on removal of this BuildStrategy

Specified by:
onRemove in interface UpdatableBuildStrategy

init

public void init(@NotNull
                 Triggerable triggerable)
Description copied from class: AbstractBuildStrategy
Default to do nothing

Specified by:
init in interface BuildStrategy
Overrides:
init in class AbstractBuildStrategy

populateFromConfig

public void populateFromConfig(@NotNull
                               org.apache.commons.configuration.HierarchicalConfiguration config)
Description copied from interface: ConvertibleFromConfig
Update the current object with data in the HierarchicalConfiguration

Specified by:
populateFromConfig in interface ConvertibleFromConfig
Overrides:
populateFromConfig in class AbstractBuildStrategy

toConfiguration

@NotNull
public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
Description copied from interface: ConvertibleFromConfig
Generate a HierarchicalConfiguration from the current state of the object

Specified by:
toConfiguration in interface ConvertibleFromConfig
Overrides:
toConfiguration in class AbstractBuildStrategy
Returns:
Always returns an HierarchicalConfiguration. Never null

validate

public ErrorCollection validate(BuildConfiguration buildConfiguration)
Description copied from interface: BuildStrategy
Takes in a BuildConfiguration and returns any errors possible

Specified by:
validate in interface BuildStrategy
Overrides:
validate in class AbstractBuildStrategy
Parameters:
buildConfiguration - not null
Returns:
ErrorCollection. must not be null

canTrigger

public boolean canTrigger(@NotNull
                          java.lang.Class<? extends Triggerable> triggerableType)
Description copied from class: AbstractBuildStrategy
Default implementation: trigger only works for Chains

Specified by:
canTrigger in interface BuildStrategy
Overrides:
canTrigger in class AbstractBuildStrategy
Returns:
true iff build strategy is applicable to a Triggerable type

setEnvironmentDependencyService

public void setEnvironmentDependencyService(EnvironmentDependencyService environmentDependencyService)

setImmutablePlanCacheService

public void setImmutablePlanCacheService(ImmutablePlanCacheService immutablePlanCacheService)

setTriggeringPlan

public void setTriggeringPlan(PlanKey triggeringPlan)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.