org.kohsuke.stapler
Class HttpResponses

java.lang.Object
  extended by org.kohsuke.stapler.HttpResponses

public class HttpResponses
extends java.lang.Object

Factory for HttpResponse.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class HttpResponses.HttpResponseException
           
 
Constructor Summary
HttpResponses()
           
 
Method Summary
static HttpResponses.HttpResponseException forbidden()
           
static HttpResponses.HttpResponseException forwardToPreviousPage()
          Redirects the user back to where he came from.
static HttpResponses.HttpResponseException notFound()
           
static HttpResponses.HttpResponseException ok()
           
static HttpResponses.HttpResponseException redirectToContextRoot()
          Redirect to the context root
static HttpResponse redirectToDot()
          Redirect to "."
static HttpResponses.HttpResponseException redirectViaContextPath(java.lang.String relative)
           
static HttpResponses.HttpResponseException status(int code)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpResponses

public HttpResponses()
Method Detail

ok

public static HttpResponses.HttpResponseException ok()

notFound

public static HttpResponses.HttpResponseException notFound()

forbidden

public static HttpResponses.HttpResponseException forbidden()

status

public static HttpResponses.HttpResponseException status(int code)

redirectViaContextPath

public static HttpResponses.HttpResponseException redirectViaContextPath(java.lang.String relative)
Parameters:
relative - The path relative to the context path. The context path + this value is sent to the user.

redirectToDot

public static HttpResponse redirectToDot()
Redirect to "."


redirectToContextRoot

public static HttpResponses.HttpResponseException redirectToContextRoot()
Redirect to the context root


forwardToPreviousPage

public static HttpResponses.HttpResponseException forwardToPreviousPage()
Redirects the user back to where he came from.



Copyright © 2010. All Rights Reserved.