/** * Approves all the currently rejected subjects */ @RequirePOST public HttpResponse doApproveAll() throws IOException { StringBuilder buf = new StringBuilder(); for (Class c : rejected.get()) { buf.append(c.getName()).append('\n'); } whitelisted.append(buf.toString()); return HttpResponses.ok(); }
/** * @deprecated as of 1.317 * Use {@link #doQuietDown()} instead. */ @Deprecated @RequirePOST public synchronized void doQuietDown(StaplerResponse rsp) throws IOException, ServletException { doQuietDown().generateResponse(null, rsp, this); }
/** * @deprecated as of 1.489 * Use {@link #doStop()} */ @Deprecated @RequirePOST // #doStop() should be preferred, but better to be safe public void doStop(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { doStop().generateResponse(req,rsp,this); }
@RequirePOST public HttpResponse doClear() throws IOException { handler.clear(); return HttpResponses.redirectToDot(); }
@RequirePOST public HttpResponse doInstallNow() throws IOException { deploy(true); return HttpResponses.redirectTo("../.."); }
@RequirePOST @Deprecated public HttpResponse doPin() throws IOException { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); // See https://groups.google.com/d/msg/jenkinsci-dev/kRobm-cxFw8/6V66uhibAwAJ LOGGER.log(WARNING, "Call to pin plugin has been ignored. Plugin name: " + shortName); return HttpResponses.ok(); }
@RequirePOST @Deprecated public HttpResponse doUnpin() throws IOException { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); // See https://groups.google.com/d/msg/jenkinsci-dev/kRobm-cxFw8/6V66uhibAwAJ LOGGER.log(WARNING, "Call to unpin plugin has been ignored. Plugin name: " + shortName); return HttpResponses.ok(); }
/** * Invalidates the update center JSON data for all the sites and force re-retrieval. * * @since 1.432 */ @RequirePOST public HttpResponse doInvalidateData() { for (UpdateSite site : sites) { site.doInvalidateData(); } return HttpResponses.ok(); }
/** * Depending on whether the user said "examine" or "dismiss", send him to the right place. */ @RequirePOST public HttpResponse doAct(@QueryParameter String dismiss) throws IOException { if(dismiss!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectTo("rule/"); } }
@RequirePOST public HttpResponse doAct(@QueryParameter String dismiss) throws IOException { if(dismiss!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectViaContextPath("configureSecurity"); } } }
@RequirePOST public void doCreateView( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { checkPermission(View.CREATE); views.add(View.create(req,rsp,this)); save(); }
/** * This is the endpoint that receives the update center data file from the browser. */ @RequirePOST public FormValidation doPostBack(StaplerRequest req) throws IOException, GeneralSecurityException { DownloadSettings.checkPostBackAccess(); return updateData(IOUtils.toString(req.getInputStream(),"UTF-8"), true); }
@RequirePOST public synchronized void doCreateView(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, ParseException, FormException { checkPermission(View.CREATE); addView(View.create(req, rsp, this)); }
@RequirePOST public HttpResponse doAct(@QueryParameter String no) throws IOException { if (no == null) { CLI.get().setEnabled(false); } else { disable(true); } return HttpResponses.redirectViaContextPath("manage"); }
/** * Accepts the new description. */ @RequirePOST public synchronized void doSubmitDescription( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { setDescription(req.getParameter("description")); rsp.sendRedirect("."); // go to the top page }
/** * Accepts the new description. */ @RequirePOST public void doSubmitDescription(StaplerRequest req, StaplerResponse rsp) throws IOException { checkPermission(Jenkins.ADMINISTER); description = req.getParameter("description"); save(); rsp.sendRedirect("."); // go to the top page }
@RequirePOST public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) { if (channel!=null) { //does nothing in case computer is already disconnected checkPermission(DISCONNECT); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); disconnect(new OfflineCause.UserCause(User.current(), offlineMessage)); } return new HttpRedirect("."); }
@RequirePOST public HttpResponse doChangeOfflineCause(@QueryParameter String offlineMessage) throws IOException, ServletException { checkPermission(DISCONNECT); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); setTemporarilyOffline(true, new OfflineCause.UserCause(User.current(), offlineMessage)); return HttpResponses.redirectToDot(); }
/** * Deletes this view. */ @RequirePOST public synchronized void doDoDelete(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { checkPermission(DELETE); owner.deleteView(this); rsp.sendRedirect2(req.getContextPath()+"/" + owner.getUrl()); }
@RequirePOST public void do_launchAll(StaplerRequest req, StaplerResponse rsp) throws IOException { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); for(Computer c : get_all()) { if(c.isLaunchSupported()) c.connect(true); } rsp.sendRedirect("."); }