ca.silvermaplesolutions.jenkins.plugins.daxis
Class DynamicAxis

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<hudson.matrix.Axis>
      extended by hudson.matrix.Axis
          extended by ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.matrix.Axis>, Comparable<hudson.matrix.Axis>, Iterable<String>

public class DynamicAxis
extends hudson.matrix.Axis

Implements dynamic axis support through a configurable environment variable. Warnings about type name colliding with a package in Eclipse can be ignored.

Version:
1.0.0

Nested Class Summary
static class DynamicAxis.DescriptorImpl
          Descriptor for this plugin.
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.matrix.Axis
name, values
 
Constructor Summary
DynamicAxis(String name, String varName)
          Always construct from an axis name and environment variable name.
 
Method Summary
 List<String> getValues()
          Overridden to provide a default value in the event the target environment variable cannot be accessed or interpreted.
 String getValueString()
          Overridden to return our environment variable name.
 String getVarName()
          An accessor is required if referenced in the Jelly file.
 List<String> rebuild(hudson.matrix.MatrixBuild.MatrixBuildExecution context)
          Override the new rebuild() feature to dynamically evaluate the configured environment variable name to get list of axis values to use for the current build.
 
Methods inherited from class hudson.matrix.Axis
addBuildVariable, all, compareTo, getDescriptor, getName, indexOf, isSystem, iterator, parsePrefixed, readResolve, size, toString, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DynamicAxis

@DataBoundConstructor
public DynamicAxis(String name,
                                        String varName)
Always construct from an axis name and environment variable name.

Parameters:
name -
varName -
Method Detail

getVarName

public String getVarName()
An accessor is required if referenced in the Jelly file.

Returns:
the name of the variable

getValues

public List<String> getValues()
Overridden to provide a default value in the event the target environment variable cannot be accessed or interpreted.

Overrides:
getValues in class hudson.matrix.Axis
See Also:
Axis.getValues()

getValueString

public String getValueString()
Overridden to return our environment variable name.

Overrides:
getValueString in class hudson.matrix.Axis
See Also:
Axis.getValueString()

rebuild

public List<String> rebuild(hudson.matrix.MatrixBuild.MatrixBuildExecution context)
Override the new rebuild() feature to dynamically evaluate the configured environment variable name to get list of axis values to use for the current build.

Overrides:
rebuild in class hudson.matrix.Axis
See Also:
Axis.rebuild(hudson.matrix.MatrixBuild.MatrixBuildExecution)


Copyright © 2004-2013. All Rights Reserved.