Package org.kohsuke.stapler

Examples of org.kohsuke.stapler.HttpRedirect


            // Parse the request
            FileItem fileItem = (FileItem) upload.parseRequest(req).get(0);
            String fileName = Util.getFileName(fileItem.getName());
            if("".equals(fileName))
                return new HttpRedirect("advanced");
            if(!fileName.endsWith(".hpi"))
                throw new Failure(hudson.model.Messages.Hudson_NotAPlugin(fileName));
            fileItem.write(new File(rootDir, fileName));
            fileItem.delete();

            pluginUploaded = true;

            return new HttpRedirect(".");
        } catch (IOException e) {
            throw e;
        } catch (Exception e) {// grrr. fileItem.write throws this
            throw new ServletException(e);
        }
View Full Code Here


            disconnect(OfflineCause.create(Messages._SlaveComputer_DisconnectedBy(
                    Hudson.getAuthentication().getName(),
                    offlineMessage!=null ? " : " + offlineMessage : "")
            ));
        }
        return new HttpRedirect(".");
    }
View Full Code Here

                    && (timeout <= 0 || System.currentTimeMillis() < timeout)
                    && !RestartListener.isAllReady()) {
                Thread.sleep(1000);
            }
        }
        return new HttpRedirect(".");
    }
View Full Code Here

    @CLIMethod(name = "cancel-quiet-down")
    public synchronized HttpRedirect doCancelQuietDown() {
        checkPermission(ADMINISTER);
        isQuietingDown = false;
        getQueue().scheduleMaintenance();
        return new HttpRedirect(".");
    }
View Full Code Here

            // we'll shut up
            disable(true);
            return HttpResponses.redirectViaContextPath("/manage");
        }

        return new HttpRedirect("confirm");
    }
View Full Code Here

     */
    @CLIMethod(name="delete-node")
    public HttpResponse doDoDelete() throws IOException {
        checkPermission(DELETE);
        Hudson.getInstance().removeNode(getNode());
        return new HttpRedirect("..");
    }
View Full Code Here

                    executor.interrupt();
                }
            }
        }
        Hudson.getInstance().removeNode(getNode());
        return new HttpRedirect("..");
    }
View Full Code Here

        return views.get(0);
    }

    public HttpResponse doIndex() {
        return new HttpRedirect("view/" + getPrimaryView().getViewName() + "/");
    }
View Full Code Here

        Hudson.checkGoodName(name);
       
        logRecorders.put(name,new LogRecorder(name));

        // redirect to the config screen
        return new HttpRedirect(name+"/configure");
    }
View Full Code Here

TOP

Related Classes of org.kohsuke.stapler.HttpRedirect

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.