com.atlassian.bamboo.build.strategy
Class CronTriggerBuildStrategy

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

public class CronTriggerBuildStrategy
extends AbstractQuartzStrategy

Build strategy specified by a cron expression

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.atlassian.bamboo.build.strategy.AbstractQuartzStrategy
scheduler
 
Fields inherited from interface com.atlassian.bamboo.build.strategy.QuartzStrategy
BUILD_STRATEGY, REPOSITORY_CHANGE_JOB, TRIGGER_CONDITIONS_CONFIGURATION, TRIGGER_ID, TRIGGERED_OBJECT_ID, TRIGGERING_REPOSITORIES
 
Constructor Summary
CronTriggerBuildStrategy()
           
 
Method Summary
 void addDefaultValues(BuildConfiguration buildConfiguration)
           
 java.lang.String getCronExpression()
           
 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.
protected  java.lang.Class<? extends org.quartz.Job> getStrategyJob()
           
protected  org.quartz.Trigger getTrigger(Triggerable plan)
           
 void populateFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
          Update the current object with data in the HierarchicalConfiguration
 void setCronExpression(java.lang.String cronExpression)
           
 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.AbstractQuartzStrategy
canTrigger, getScheduler, getUniqueId, init, initialiseJob, removeJob, setScheduler
 
Methods inherited from class com.atlassian.bamboo.build.strategy.AbstractBuildStrategy
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
getTriggerConditionsConfiguration, getUserDescription, setId, setUserDescription
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 

Constructor Detail

CronTriggerBuildStrategy

public CronTriggerBuildStrategy()
Method Detail

getKey

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

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.

Returns:
String must not be null

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface BuildStrategy
Overrides:
getDescription 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

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

addDefaultValues

public void addDefaultValues(BuildConfiguration buildConfiguration)
Specified by:
addDefaultValues in interface BuildStrategy
Overrides:
addDefaultValues 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

getStrategyJob

@NotNull
protected java.lang.Class<? extends org.quartz.Job> getStrategyJob()
Specified by:
getStrategyJob in class AbstractQuartzStrategy

getTrigger

@Nullable
protected org.quartz.Trigger getTrigger(@NotNull
                                                 Triggerable plan)
Specified by:
getTrigger in class AbstractQuartzStrategy

getCronExpression

public java.lang.String getCronExpression()

setCronExpression

public void setCronExpression(java.lang.String cronExpression)


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