@Override public boolean configure(StaplerRequest req, JSONObject json) throws FormException { List<EnvInjectGlobalPasswordEntry> envInjectGlobalPasswordEntriesList = req.bindParametersToList(EnvInjectGlobalPasswordEntry.class, "envInject."); envInjectGlobalPasswordEntries = envInjectGlobalPasswordEntriesList.toArray(new EnvInjectGlobalPasswordEntry[envInjectGlobalPasswordEntriesList.size()]); save(); return true; }
@Override public boolean configure(StaplerRequest req, JSONObject json) throws hudson.model.Descriptor.FormException { this.installations = req.bindParametersToList(TestLinkInstallation.class, "TestLink.").toArray( new TestLinkInstallation[0]); save(); return true; }
@Override public boolean configure(StaplerRequest req, net.sf.json.JSONObject json) throws FormException { profiles.replaceBy(req.bindParametersToList(S3Profile.class, "s3.")); save(); return true; }
@Override public boolean configure(StaplerRequest req, JSONObject formData) throws FormException { installations = req.bindParametersToList(RubyInstallation.class, "rake.") .toArray(new RubyInstallation[0]); rvm = req.bindParameters(Rvm.class, "rvm."); installations = getGlobalRubies(rvm, installations); save(); return true; }
/** * Creates a new instance of {@link CoberturaPublisher} from a submitted form. */ @Override public CoberturaPublisher newInstance(StaplerRequest req, JSONObject formData) throws FormException { // Null check because findbugs insists, despite the API guaranteeing this is never null. if (req == null) { throw new FormException("req cannot be null", ""); } CoberturaPublisher instance = req.bindJSON(CoberturaPublisher.class, formData); ConvertUtils.register(CoberturaPublisherTarget.CONVERTER, CoverageMetric.class); List<CoberturaPublisherTarget> targets = req .bindParametersToList(CoberturaPublisherTarget.class, "cobertura.target."); if (0 == targets.size()) { targets = bindTargetsFromForm(formData); } try { instance.setTargets(targets); } catch (AbortException ex) { Logger.getLogger(CoberturaPublisher.class.getName()).log(Level.SEVERE, null, ex); } return instance; }
@Override public boolean configure(final StaplerRequest req, final JSONObject json) throws FormException { parsingRulesGlobal = req.bindParametersToList(ParserRuleFile.class, "log-parser.").toArray(new ParserRuleFile[0]); useLegacyFormatting = json.getJSONObject("log-parser").getBoolean( "useLegacyFormatting"); save(); return true; } }
@Override public boolean configure(StaplerRequest req, JSONObject formData) throws FormException { Pool[] pools = req.bindParametersToList(Pool.class, "pool.").toArray(new Pool[] {}); for (Pool p : pools) { p.name = checkPoolName(p.name); checkPortNumbers(p.ports); } this.pools = pools; save(); return super.configure(req,formData); }