/** * Creates a new log recorder. */ public HttpResponse doNewLogRecorder(@QueryParameter String name) { Hudson.checkGoodName(name); logRecorders.put(name,new LogRecorder(name)); // redirect to the config screen return new HttpRedirect(name+"/configure"); }
/** * Creates a new log recorder. */ public HttpResponse doNewLogRecorder(@QueryParameter String name) { Hudson.checkGoodName(name); logRecorders.put(name, new LogRecorder(name)); // redirect to the config screen return new HttpRedirect(name + "/configure"); }
/** * Makes sure that the given name is good as a axis name. */ public FormValidation doCheckName(@QueryParameter String value) { if(Util.fixEmpty(value)==null) return FormValidation.ok(); try { Hudson.checkGoodName(value); return FormValidation.ok(); } catch (Failure e) { return FormValidation.error(e.getMessage()); } } }
/** * Creates a new log recorder. */ public HttpResponse doNewLogRecorder(@QueryParameter String name) { Hudson.checkGoodName(name); logRecorders.put(name,new LogRecorder(name)); // redirect to the config screen return new HttpRedirect(name+"/configure"); }
/** * Makes sure that the given name is good as a axis name. */ public FormValidation doCheckName(@QueryParameter String value) { if(Util.fixEmpty(value)==null) return FormValidation.ok(); try { Hudson.checkGoodName(value); return FormValidation.ok(); } catch (Failure e) { return FormValidation.error(e.getMessage()); } } }
/** * Makes sure that the given name is good as a axis name. */ public FormValidation doCheckName(@QueryParameter String value) { if(Util.fixEmpty(value)==null) return FormValidation.ok(); try { Hudson.checkGoodName(value); return FormValidation.ok(); } catch (Failure e) { return FormValidation.error(e.getMessage()); } } }
/** * Creates a new log recorder. */ public HttpResponse doNewLogRecorder(@QueryParameter String name) { Hudson.checkGoodName(name); logRecorders.put(name,new LogRecorder(name)); // redirect to the config screen return new HttpRedirect(name+"/configure"); }
public FormValidation doCheckName(@QueryParameter String value ) { String name = Util.fixEmptyAndTrim(value); if(name==null) return FormValidation.error(Messages.NodeDescripter_CheckName_Mandatory()); try { Hudson.checkGoodName(name); } catch (Failure f) { return FormValidation.error(f.getMessage()); } return FormValidation.ok(); }
public FormValidation doCheckName(@QueryParameter String value) { String name = Util.fixEmptyAndTrim(value); if (name == null) { return FormValidation.error(Messages.NodeDescripter_CheckName_Mandatory()); } try { Hudson.checkGoodName(name); } catch (Failure f) { return FormValidation.error(f.getMessage()); } return FormValidation.ok(); }
public FormValidation doCheckName(@QueryParameter String value ) { String name = Util.fixEmptyAndTrim(value); if(name==null) return FormValidation.error(Messages.NodeDescripter_CheckName_Mandatory()); try { Hudson.checkGoodName(name); } catch (Failure f) { return FormValidation.error(f.getMessage()); } return FormValidation.ok(); }
public FormValidation doCheckName(@QueryParameter String value ) { String name = Util.fixEmptyAndTrim(value); if(name==null) return FormValidation.error(Messages.NodeDescripter_CheckName_Mandatory()); try { Hudson.checkGoodName(name); } catch (Failure f) { return FormValidation.error(f.getMessage()); } return FormValidation.ok(); }
/** * Makes sure that the given name is good as a job name. * @return trimmed name if valid; throws ParseException if not */ private String checkJobName(String name) throws Failure { checkGoodName(name); name = name.trim(); if (getItem(name) != null) { throw new Failure(Messages.Hudson_JobAlreadyExists(name)); } // looks good return name; }
/** * Makes sure that the given name is good as a job name. * @return trimmed name if valid; throws ParseException if not */ private String checkJobName(String name) throws Failure { checkGoodName(name); name = name.trim(); if (getItem(name) != null) { throw new Failure(Messages.Hudson_JobAlreadyExists(name)); } // looks good return name; }
/** * Makes sure that the given name is good as a job name. * @return trimmed name if valid; throws ParseException if not */ private String checkJobName(String name) throws Failure { checkGoodName(name); name = name.trim(); if (getItem(name) != null) { throw new Failure(Messages.Hudson_JobAlreadyExists(name)); } // looks good return name; }
/** * Renames this view. */ public void rename(String newName) throws Failure, FormException { if(name.equals(newName)) return; // noop checkGoodName(newName); if(owner.getView(newName)!=null) throw new FormException(Messages.Hudson_ViewAlreadyExists(newName),"name"); String oldName = name; name = newName; owner.onViewRenamed(this,oldName,newName); }
/** * Renames this view. */ public void rename(String newName) throws Failure, FormException { if(name.equals(newName)) return; // noop checkGoodName(newName); if(owner.getView(newName)!=null) throw new FormException(Messages.Hudson_ViewAlreadyExists(newName),"name"); String oldName = name; name = newName; owner.onViewRenamed(this,oldName,newName); }
/** * Renames this view. */ public void rename(String newName) throws Failure, FormException { if(name.equals(newName)) return; // noop checkGoodName(newName); if(owner.getView(newName)!=null) throw new FormException(Messages.Hudson_ViewAlreadyExists(newName),"name"); String oldName = name; name = newName; owner.onViewRenamed(this,oldName,newName); }
/** * Makes sure that the given name is good as a slave name. * @return trimmed name if valid; throws ParseException if not */ public String checkName(String name) throws Failure { if(name==null) throw new Failure("Query parameter 'name' is required"); name = name.trim(); Hudson.checkGoodName(name); if(Hudson.getInstance().getNode(name)!=null) throw new Failure(Messages.ComputerSet_SlaveAlreadyExists(name)); // looks good return name; }
/** * Makes sure that the given name is good as a slave name. * @return trimmed name if valid; throws ParseException if not */ public String checkName(String name) throws Failure { if(name==null) throw new Failure("Query parameter 'name' is required"); name = name.trim(); Hudson.checkGoodName(name); if(Hudson.getInstance().getNode(name)!=null) throw new Failure(Messages.ComputerSet_SlaveAlreadyExists(name)); // looks good return name; }
/** * Makes sure that the given name is good as a slave name. * @return trimmed name if valid; throws ParseException if not */ public String checkName(String name) throws Failure { if(name==null) throw new Failure("Query parameter 'name' is required"); name = name.trim(); Hudson.checkGoodName(name); if(Hudson.getInstance().getNode(name)!=null) throw new Failure(Messages.ComputerSet_SlaveAlreadyExists(name)); // looks good return name; }