/** * @deprecated now a no-op */ @Deprecated public HttpResponse doYank() { return HttpResponses.redirectViaContextPath("/"); }
@RequirePOST public HttpResponse doAct(@QueryParameter String dismiss) throws IOException { if(dismiss!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectViaContextPath("configureSecurity"); } } }
/** * Depending on whether the user said "yes" or "no", send him to the right place. */ @RequirePOST public HttpResponse doAct(@QueryParameter String no) throws IOException { if(no!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectToDot(); } }
/** * 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/"); } }
/** * Depending on whether the user said "yes" or "no", send him to the right place. */ @RequirePOST public HttpResponse doAct(@QueryParameter String no) throws IOException { if(no!=null) { // dismiss disable(true); // of course the irony is that this redirect won't work return HttpResponses.redirectViaContextPath("/manage"); } else { return new HttpRedirect("https://jenkins.io/redirect/troubleshooting/broken-reverse-proxy"); } }
@RequirePOST public HttpResponse doAct(@QueryParameter String no) throws IOException { if (no == null) { CLI.get().setEnabled(false); } else { disable(true); } return HttpResponses.redirectViaContextPath("manage"); }
/** * Runs {@link #prevalidateConfig} on posted XML and redirects to the {@link UpdateCenter}. * @since 1.483 */ @RequirePOST public HttpResponse doInstallNecessaryPlugins(StaplerRequest req) throws IOException { prevalidateConfig(req.getInputStream()); return HttpResponses.redirectViaContextPath("updateCenter"); }
@RequirePOST public HttpResponse doDoUninstall() throws IOException { Jenkins jenkins = Jenkins.getActiveInstance(); jenkins.checkPermission(Jenkins.ADMINISTER); archive.delete(); // Redo who depends on who. jenkins.getPluginManager().resolveDependantPlugins(); return HttpResponses.redirectViaContextPath("/pluginManager/installed"); // send back to plugin manager }
/** * Depending on whether the user said "yes" or "no", send him to the right place. */ @RequirePOST public HttpResponse doAct(StaplerRequest req, StaplerResponse rsp) throws IOException { if (req.hasParameter("no")) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return new HttpRedirect("manage"); } }
/** * Called from the management screen. */ @RequirePOST public HttpResponse doAct(StaplerRequest req) throws ServletException, IOException { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); if(req.hasParameter("n")) { // we'll shut up disable(true); return HttpResponses.redirectViaContextPath("/manage"); } return new HttpRedirect("confirm"); }
/** * Reloads the configuration. */ @RequirePOST public synchronized HttpResponse doReload() throws IOException { checkPermission(ADMINISTER); LOGGER.log(Level.WARNING, "Reloading Jenkins as requested by {0}", getAuthentication().getName()); // engage "loading ..." UI and then run the actual task in a separate thread WebApp.get(servletContext).setApp(new HudsonIsLoading()); new Thread("Jenkins config reload thread") { @Override public void run() { try { ACL.impersonate(ACL.SYSTEM); reload(); } catch (Exception e) { LOGGER.log(SEVERE,"Failed to reload Jenkins config",e); new JenkinsReloadFailed(e).publish(servletContext,root); } } }.start(); return HttpResponses.redirectViaContextPath("/"); }
/** * @deprecated now a no-op */ @Deprecated public HttpResponse doYank() { return HttpResponses.redirectViaContextPath("/"); }
@RequirePOST public HttpResponse doAct(@QueryParameter String dismiss) throws IOException { if(dismiss!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectViaContextPath("configureSecurity"); } } }
/** * Depending on whether the user said "yes" or "no", send him to the right * place. */ public HttpResponse doAct(@QueryParameter String no) throws IOException { if (no != null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectToDot(); } }
/** * Depending on whether the user said "yes" or "no", send him to the right place. */ public HttpResponse doAct(@QueryParameter String no) throws IOException { if(no!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectToDot(); } }
/** * 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/"); } }
/** * Depending on whether the user said "yes" or "no", send him to the right place. */ public HttpResponse doAct(StaplerRequest req, StaplerResponse rsp) throws IOException { if (req.hasParameter("no")) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return new HttpRedirect("manage"); } }
/** * Runs {@link #prevalidateConfig} on posted XML and redirects to the {@link UpdateCenter}. * @since 1.483 */ @RequirePOST public HttpResponse doInstallNecessaryPlugins(StaplerRequest req) throws IOException { prevalidateConfig(req.getInputStream()); return HttpResponses.redirectViaContextPath("updateCenter"); }
/** * Called from the management screen. */ @RequirePOST public HttpResponse doAct(StaplerRequest req) throws ServletException, IOException { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); if(req.hasParameter("n")) { // we'll shut up disable(true); return HttpResponses.redirectViaContextPath("/manage"); } return new HttpRedirect("confirm"); }
/** * Called from the management screen. */ public HttpResponse doAct(StaplerRequest req) throws ServletException, IOException { requirePOST(); Hudson.getInstance().checkPermission(Hudson.ADMINISTER); if(req.hasParameter("n")) { // we'll shut up disable(true); return HttpResponses.redirectViaContextPath("/manage"); } return new HttpRedirect("confirm"); }