|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.AbstractDescribableImpl<Axis>
hudson.matrix.Axis
public class Axis
Configuration axis.
This class represents a single dimension of the configuration matrix. For example, the JAX-WS RI test configuration might include one axis "container={glassfish,tomcat,jetty}" and another axis "stax={sjsxp,woodstox}", and so on.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
Field Summary | |
---|---|
String |
name
Deprecated. as of 1.373 Use getName() |
List<String> |
values
Deprecated. as of 1.373 Use getValues() |
Constructor Summary | |
---|---|
Axis(String name,
List<String> values)
|
|
Axis(String name,
String... values)
|
|
Axis(String name,
String valueString)
Used to build Axis from form. |
Method Summary | |
---|---|
void |
addBuildVariable(String value,
Map<String,String> map)
Converts the selected value (which is among values ) and adds that to the given map,
which serves as the build variables. |
static DescriptorExtensionList<Axis,AxisDescriptor> |
all()
Returns all the registered AxisDescriptor s. |
int |
compareTo(Axis that)
Axis is fully ordered so that we can convert between a list of axis and a string unambiguously. |
AxisDescriptor |
getDescriptor()
Gets the descriptor for this instance. |
String |
getName()
Name of this axis. |
List<String> |
getValues()
Possible values for this axis. |
String |
getValueString()
Used for generating the config UI. |
int |
indexOf(String value)
The inverse of value(int) . |
boolean |
isSystem()
Deprecated. as of 1.373 System vs user difference are generalized into extension point. |
Iterator<String> |
iterator()
|
static Axis |
parsePrefixed(org.kohsuke.stapler.StaplerRequest req,
String name)
Parses the submitted form (where possible values are presented as a list of checkboxes) and creates an axis |
Object |
readResolve()
Previously we used to persist Axis , but now those are divided into subtypes. |
List<String> |
rebuild(MatrixBuild.MatrixBuildExecution context)
Called right at the beginning of MatrixBuild execution to allow Axis to update values
based on the current build. |
int |
size()
|
String |
toString()
|
String |
value(int index)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final String name
getName()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince(value="1.463") public final List<String> values
getValues()
Constructor Detail |
---|
public Axis(String name, List<String> values)
public Axis(String name, String... values)
@DataBoundConstructor public Axis(String name, String valueString)
Axis
from form.
Axis with empty values need to be removed later.
Method Detail |
---|
public boolean isSystem()
public Iterator<String> iterator()
iterator
in interface Iterable<String>
public int size()
public String value(int index)
public int indexOf(String value)
value(int)
.
public int compareTo(Axis that)
compareTo
in interface Comparable<Axis>
public String getName()
public List<String> getValues()
public List<String> rebuild(MatrixBuild.MatrixBuildExecution context)
MatrixBuild
execution to allow Axis
to update values
based on the current build.
Historically, axes values are considered static. They were assumed to reflect what the user has typed in,
and their values are changed only when the project is reconfigured. So abstractions are built around this
notion, and so for example MatrixProject
has the current axes and their values, which it uses
to render its UI.
So when the need was identified to change the values of axes per build, we decided that this be represented
as a kind of project configuration update (where a project gets reconfigured every time a build runs), and
this call back was added to allow Axis
to update the next return value from the getValues()
(which is typically done by updating values
.)
While it is not strictly required, because of these historical reasons, UI will look better if
Future calls to getValues()
return the same values as what this method returns (until
the next rebuild call).
context
- The ongoing build. Never null.
public AxisDescriptor getDescriptor()
Describable
Descriptor
is a singleton for every concrete Describable
implementation, so if a.getClass()==b.getClass() then
a.getDescriptor()==b.getDescriptor() must hold.
getDescriptor
in interface Describable<Axis>
getDescriptor
in class AbstractDescribableImpl<Axis>
public String toString()
toString
in class Object
public String getValueString()
public static Axis parsePrefixed(org.kohsuke.stapler.StaplerRequest req, String name)
public Object readResolve()
Axis
, but now those are divided into subtypes.
So upon deserialization, resolve to the proper type.
public static DescriptorExtensionList<Axis,AxisDescriptor> all()
AxisDescriptor
s.
public void addBuildVariable(String value, Map<String,String> map)
values
) and adds that to the given map,
which serves as the build variables.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |