com.atlassian.bamboo.build.strategy
Class TriggeredBuildStrategy

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

public class TriggeredBuildStrategy
extends AbstractBuildStrategy
implements RepositoryAwareBuildStrategy

This class lets someone else decide if the build should be built. Could be human, could be a remote SCM trigger....

See Also:
Serialized Form

Field Summary
static java.lang.String NAME
           
static java.lang.String TRIGGER_IP_ADDRESS
           
 
Constructor Summary
TriggeredBuildStrategy()
           
 
Method Summary
 java.lang.String[] getAllowedTriggerIpAddresses()
           
 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.
 java.util.Set<java.lang.Long> getTriggeringRepositories()
          Return a list of repository ids this trigger is configured for.
 java.lang.String getTriggerIpAddress()
           
 void init(Triggerable triggerable)
          Default to do nothing
 void populateFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
          Update the current object with data in the HierarchicalConfiguration
 void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
           
 void setTriggeringRepositories(java.util.Set<java.lang.Long> triggeringRepositories)
          Set list of repository ids this trigger is configured for.
 void setTriggerIpAddress(java.lang.String triggerIpAddress)
          Deprecated. 
 void setTriggerIpAddresses(java.lang.String triggerIpAddresses)
           
 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, canTrigger, 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, canTrigger, getTriggerConditionsConfiguration, getUserDescription, setId, setUserDescription
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 

Field Detail

TRIGGER_IP_ADDRESS

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

NAME

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

TriggeredBuildStrategy

public TriggeredBuildStrategy()
Method Detail

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

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

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

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

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

getTriggerIpAddress

public java.lang.String getTriggerIpAddress()

setTriggerIpAddress

@Deprecated
public void setTriggerIpAddress(java.lang.String triggerIpAddress)
Deprecated. 


setTriggerIpAddresses

public void setTriggerIpAddresses(java.lang.String triggerIpAddresses)

getAllowedTriggerIpAddresses

@NotNull
public java.lang.String[] getAllowedTriggerIpAddresses()

setEventPublisher

public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)

getTriggeringRepositories

public java.util.Set<java.lang.Long> getTriggeringRepositories()
Description copied from interface: RepositoryAwareBuildStrategy
Return a list of repository ids this trigger is configured for.

Specified by:
getTriggeringRepositories in interface RepositoryAwareBuildStrategy
Returns:
Set of Long

setTriggeringRepositories

public void setTriggeringRepositories(java.util.Set<java.lang.Long> triggeringRepositories)
Description copied from interface: RepositoryAwareBuildStrategy
Set list of repository ids this trigger is configured for.

Specified by:
setTriggeringRepositories in interface RepositoryAwareBuildStrategy


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