/** * Accepts the update to the node configuration. */ @RequirePOST public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { final Jenkins app = Jenkins.getInstance(); app.checkPermission(Jenkins.ADMINISTER); properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors()); this.description = req.getSubmittedForm().getString("description"); updateTransientActions(); save(); FormApply.success(".").generateResponse(req, rsp, null); }
protected void updateTransientActions() { Vector<Action> ta = new Vector<Action>(); // add the config link if (!getApplicablePropertyDescriptors().isEmpty()) { // if there's no property descriptor, there's nothing interesting to configure. ta.add(new Action() { public String getIconFileName() { if (Hudson.getInstance().hasPermission(Hudson.ADMINISTER)) return "setting.png"; else return null; } public String getDisplayName() { return "Configure"; } public String getUrlName() { return "configure"; } }); } for (LabelAtomProperty p : properties) ta.addAll(p.getActions(this)); transientActions = ta; }
protected void updateTransientActions() { Vector<Action> ta = new Vector<Action>(); // add the config link if (!getApplicablePropertyDescriptors().isEmpty()) { // if there's no property descriptor, there's nothing interesting to configure. ta.add(new Action() { public String getIconFileName() { if (Hudson.getInstance().hasPermission(Hudson.ADMINISTER)) { return "setting.png"; } else { return null; } } public String getDisplayName() { return "Configure"; } public String getUrlName() { return "configure"; } }); } for (LabelAtomProperty p : properties) { ta.addAll(p.getActions(this)); } transientActions = ta; }
protected void updateTransientActions() { Vector<Action> ta = new Vector<Action>(); // add the config link if (!getApplicablePropertyDescriptors().isEmpty()) { // if there's no property descriptor, there's nothing interesting to configure. ta.add(new Action() { public String getIconFileName() { if (Hudson.getInstance().hasPermission(Hudson.ADMINISTER)) return "setting.gif"; else return null; } public String getDisplayName() { return "Configure"; } public String getUrlName() { return "configure"; } }); } for (LabelAtomProperty p : properties) ta.addAll(p.getActions(this)); transientActions = ta; }
protected void updateTransientActions() { Vector<Action> ta = new Vector<Action>(); // add the config link if (!getApplicablePropertyDescriptors().isEmpty()) { // if there's no property descriptor, there's nothing interesting to configure. ta.add(new Action() { public String getIconFileName() { if (Hudson.getInstance().hasPermission(Hudson.ADMINISTER)) return "setting.gif"; else return null; } public String getDisplayName() { return "Configure"; } public String getUrlName() { return "configure"; } }); } for (LabelAtomProperty p : properties) ta.addAll(p.getActions(this)); transientActions = ta; }
/** * Accepts the update to the node configuration. */ public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { final Hudson app = Hudson.getInstance(); app.checkPermission(Hudson.ADMINISTER); properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors()); updateTransientActions(); save(); // take the user back to the label top page. rsp.sendRedirect2("."); }
/** * Accepts the update to the node configuration. */ public void doConfigSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException { final Hudson app = Hudson.getInstance(); app.checkPermission(Hudson.ADMINISTER); properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors()); updateTransientActions(); save(); // take the user back to the label top page. rsp.sendRedirect2("."); }
/** * Accepts the update to the node configuration. */ public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { final Hudson app = Hudson.getInstance(); app.checkPermission(Hudson.ADMINISTER); properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors()); updateTransientActions(); save(); // take the user back to the label top page. rsp.sendRedirect2("."); }
/** * Accepts the update to the node configuration. */ public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { final Hudson app = Hudson.getInstance(); app.checkPermission(Hudson.ADMINISTER); properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors()); updateTransientActions(); save(); // take the user back to the label top page. rsp.sendRedirect2("."); }
/** * Accepts the update to the node configuration. */ @RequirePOST public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { final Jenkins app = Jenkins.getInstance(); app.checkPermission(Jenkins.ADMINISTER); properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors()); this.description = req.getSubmittedForm().getString("description"); updateTransientActions(); save(); FormApply.success(".").generateResponse(req, rsp, null); }