Expose AbstractProject.AbstractProjectDescriptor#validateLabelExpression for plugins

This commit is contained in:
Oliver Gondža committed 2014-11-06 13:29:08 +01:00
1 parent e607048d46
commit e985ee69ff
1 file changed
+10
@@ -2043,6 +2043,16 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
public FormValidation doCheckLabel(@AncestorInPath AbstractProject<?,?> project,
@QueryParameter String value) {
return validateLabelExpression(value, project);
}
/**
* Validate label expression string.
*
* @param project May be specified to perform project specific validation.
* @since TODO
*/
public static @Nonnull FormValidation validateLabelExpression(String value, @CheckForNull AbstractProject<?, ?> project) {
if (Util.fixEmpty(value)==null)
return FormValidation.ok(); // nothing typed yet
try {