File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\core\src\main\java\hudson\matrix\MatrixConfigurationSorter.java.html

1 package hudson.matrix;
2
3 import hudson.ExtensionPoint;
4 import hudson.model.AbstractDescribableImpl;
5 import hudson.util.FormValidation;
6
7 import java.util.Comparator;
8
9 /**
10 * Add sorting for configurations {@link MatrixConfiguration}s of matrix job {@link MatrixProject}
11 *
12 * @since 1.439
13 * @author Lucie Votypkova
14 * @see MatrixConfigurationSorterDescriptor
15 */
16 public abstract class MatrixConfigurationSorter extends AbstractDescribableImpl<MatrixConfigurationSorter> implements ExtensionPoint, Comparator<MatrixConfiguration> {
17
18 /**
19 * Checks if this sorter is properly configured and applicable for the given project.
20 *
21 * <p>
22 * This method is invoked when the configuration is submitted to ensure that the sorter is compatible
23 * with the current project configuration (most probably with its {@link Axis}.)
24 *
25 * @param p
26 * Project for which this sorter is being used for.
27 * @throws FormValidation
28 * If you need to report an error to the user and reject the form submission.
29 */
30 public abstract void validate(MatrixProject p) throws FormValidation;
31
32 @Override
33 public MatrixConfigurationSorterDescriptor getDescriptor() {
34 return (MatrixConfigurationSorterDescriptor)super.getDescriptor();
35 }
36 }
37