/** * Makes sure that the given name is good as a axis name. * * Aside from {@link Jenkins#checkGoodName} this disallows ',' as * special character used in Combination presentation. Note it is not * necessary to disallow '=' in value as everything after the first * occurrence is considered to be a value. * * Subclasses are expected to expose own <tt>doCheck</tt> method possibly delegating to this one. */ public FormValidation checkValue(@QueryParameter String value) { if(Util.fixEmpty(value)==null) return FormValidation.error(Messages.AxisDescriptor_EmptyAxisName()); if (value.contains(",")) return unsafeChar(','); return FormValidation.ok(); }
/** * Makes sure that the given name is good as a axis name. * * Aside from {@link Jenkins#checkGoodName} this disallows ',' and * '=' as special characters used in Combination presentation. */ public FormValidation doCheckName(@QueryParameter String value) { if(Util.fixEmpty(value)==null) return FormValidation.error(Messages.AxisDescriptor_EmptyAxisName()); if (value.contains(",")) return unsafeChar(','); if (value.contains("=")) return unsafeChar('='); try { Jenkins.checkGoodName(value); return FormValidation.ok(); } catch (Failure e) { return FormValidation.error(e.getMessage()); } }