net.praqma.jenkins.configrotator
Class AbstractConfigurationRotatorSCM

java.lang.Object
  extended by net.praqma.jenkins.configrotator.AbstractConfigurationRotatorSCM
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<AbstractConfigurationRotatorSCM>
Direct Known Subclasses:
ClearCaseUCM, Git

public abstract class AbstractConfigurationRotatorSCM
extends Object
implements hudson.model.Describable<AbstractConfigurationRotatorSCM>, hudson.ExtensionPoint


Nested Class Summary
 class AbstractConfigurationRotatorSCM.ChangeLogWriter<C extends AbstractConfigurationComponent,T extends AbstractConfiguration<C>>
           
 class AbstractConfigurationRotatorSCM.Performer<C>
           
 class AbstractConfigurationRotatorSCM.Poller<C extends AbstractConfiguration>
           
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
protected  AbstractConfiguration projectConfiguration
           
 
Constructor Summary
AbstractConfigurationRotatorSCM()
           
 
Method Summary
static hudson.DescriptorExtensionList<AbstractConfigurationRotatorSCM,ConfigurationRotatorSCMDescriptor<AbstractConfigurationRotatorSCM>> all()
          All registered AbstractConfigurationRotatorSCMs.
abstract  ConfigRotatorChangeLogParser createChangeLogParser()
           
abstract  AbstractConfigurationRotatorSCM.ChangeLogWriter getChangeLogWriter(File changeLogFile, hudson.model.BuildListener listener, hudson.model.AbstractBuild<?,?> build)
           
 AbstractConfiguration getConfiguration()
           
 hudson.model.Descriptor<AbstractConfigurationRotatorSCM> getDescriptor()
           
static List<ConfigurationRotatorSCMDescriptor<?>> getDescriptors()
           
 File getFeedPath()
           
 String getFeedURL()
           
 ConfigurationRotatorBuildAction getLastResult(hudson.model.AbstractProject<?,?> project, Class<? extends AbstractConfigurationRotatorSCM> clazz)
           
 ArrayList<ConfigurationRotatorBuildAction> getLastResults(hudson.model.AbstractProject<?,?> project, Class<? extends AbstractConfigurationRotatorSCM> clazz, int limit)
           
abstract  String getName()
          Return the name of the type
abstract  AbstractConfigurationRotatorSCM.Performer getPerform(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.BuildListener listener)
          Perform the actual config rotation
abstract  AbstractConfigurationRotatorSCM.Poller getPoller(hudson.model.AbstractProject<?,?> project, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.TaskListener listener)
           
 ConfigurationRotatorBuildAction getPreviousResult(hudson.model.AbstractBuild<?,?> build, Class<? extends AbstractConfigurationRotatorSCM> clazz)
           
abstract
<TT extends AbstractTarget>
List<TT>
getTargets()
           
abstract  AbstractConfiguration nextConfiguration(hudson.model.TaskListener listener, AbstractConfiguration configuration, hudson.FilePath workspace)
           
 void printConfiguration(PrintStream out, AbstractConfiguration cfg)
           
 void setConfiguration(AbstractConfiguration configuration)
           
abstract  void setConfigurationByAction(hudson.model.AbstractProject<?,?> project, ConfigurationRotatorBuildAction action)
           
abstract
<TT extends AbstractTarget>
void
setTargets(List<TT> targets)
           
abstract  boolean wasReconfigured(hudson.model.AbstractProject<?,?> project)
          This method only makes sense when the variable justConfigured is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

projectConfiguration

protected AbstractConfiguration projectConfiguration
Constructor Detail

AbstractConfigurationRotatorSCM

public AbstractConfigurationRotatorSCM()
Method Detail

getName

public abstract String getName()
Return the name of the type


setConfiguration

public void setConfiguration(AbstractConfiguration configuration)

getConfiguration

public AbstractConfiguration getConfiguration()

nextConfiguration

public abstract AbstractConfiguration nextConfiguration(hudson.model.TaskListener listener,
                                                        AbstractConfiguration configuration,
                                                        hudson.FilePath workspace)
                                                 throws ConfigurationRotatorException
Throws:
ConfigurationRotatorException

getPoller

public abstract AbstractConfigurationRotatorSCM.Poller getPoller(hudson.model.AbstractProject<?,?> project,
                                                                 hudson.Launcher launcher,
                                                                 hudson.FilePath workspace,
                                                                 hudson.model.TaskListener listener)

getPerform

public abstract AbstractConfigurationRotatorSCM.Performer getPerform(hudson.model.AbstractBuild<?,?> build,
                                                                     hudson.Launcher launcher,
                                                                     hudson.FilePath workspace,
                                                                     hudson.model.BuildListener listener)
                                                              throws IOException
Perform the actual config rotation

Parameters:
build -
launcher -
workspace -
listener -
Returns:
Throws:
IOException

setConfigurationByAction

public abstract void setConfigurationByAction(hudson.model.AbstractProject<?,?> project,
                                              ConfigurationRotatorBuildAction action)
                                       throws IOException
Throws:
IOException

wasReconfigured

public abstract boolean wasReconfigured(hudson.model.AbstractProject<?,?> project)
This method only makes sense when the variable justConfigured is set. Meaning the configuration was just saved.

Parameters:
project -
Returns:

createChangeLogParser

public abstract ConfigRotatorChangeLogParser createChangeLogParser()

setTargets

public abstract <TT extends AbstractTarget> void setTargets(List<TT> targets)

getTargets

public abstract <TT extends AbstractTarget> List<TT> getTargets()

printConfiguration

public void printConfiguration(PrintStream out,
                               AbstractConfiguration cfg)

getChangeLogWriter

public abstract AbstractConfigurationRotatorSCM.ChangeLogWriter getChangeLogWriter(File changeLogFile,
                                                                                   hudson.model.BuildListener listener,
                                                                                   hudson.model.AbstractBuild<?,?> build)
Parameters:
changeLogFile -
listener -
build -
Throws:
IOException
ConfigurationRotatorException
InterruptedException

getDescriptor

public hudson.model.Descriptor<AbstractConfigurationRotatorSCM> getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<AbstractConfigurationRotatorSCM>

all

public static hudson.DescriptorExtensionList<AbstractConfigurationRotatorSCM,ConfigurationRotatorSCMDescriptor<AbstractConfigurationRotatorSCM>> all()
All registered AbstractConfigurationRotatorSCMs.


getDescriptors

public static List<ConfigurationRotatorSCMDescriptor<?>> getDescriptors()

getLastResult

public ConfigurationRotatorBuildAction getLastResult(hudson.model.AbstractProject<?,?> project,
                                                     Class<? extends AbstractConfigurationRotatorSCM> clazz)

getPreviousResult

public ConfigurationRotatorBuildAction getPreviousResult(hudson.model.AbstractBuild<?,?> build,
                                                         Class<? extends AbstractConfigurationRotatorSCM> clazz)

getLastResults

public ArrayList<ConfigurationRotatorBuildAction> getLastResults(hudson.model.AbstractProject<?,?> project,
                                                                 Class<? extends AbstractConfigurationRotatorSCM> clazz,
                                                                 int limit)

getFeedPath

public File getFeedPath()

getFeedURL

public String getFeedURL()


Copyright © 2004-2013. All Rights Reserved.