ninja
Class Results

java.lang.Object
  extended by ninja.Results

public class Results
extends Object


Constructor Summary
Results()
           
 
Method Summary
static AsyncResult async()
           
static Result badRequest()
           
static Result contentType(String contentType)
           
static Result forbidden()
           
static Result html()
           
static Result html(int statusCode)
           
static Result html(Object renderable)
          Deprecated. 
static Result internalServerError()
           
static Result json()
           
static Result json(int statusCode)
          Deprecated. 
static Result json(Object renderable)
           
static Result noContent()
           
static Result notFound()
           
static Result ok()
           
static Result redirect(String url)
          A redirect that uses 303 see other.
static Result redirectTemporary(String url)
          A redirect that uses 307 see other.
static Result status(int statusCode)
           
static Result TODO()
           
static Result xml()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Results

public Results()
Method Detail

status

public static Result status(int statusCode)

ok

public static Result ok()

notFound

public static Result notFound()

forbidden

public static Result forbidden()

badRequest

public static Result badRequest()

noContent

public static Result noContent()

internalServerError

public static Result internalServerError()

redirect

public static Result redirect(String url)
A redirect that uses 303 see other.

Parameters:
url - The url used as redirect target.
Returns:
A nicely configured result with status code 303 and the url set as Location header.

redirectTemporary

public static Result redirectTemporary(String url)
A redirect that uses 307 see other.

Parameters:
url - The url used as redirect target.
Returns:
A nicely configured result with status code 308 and the url set as Location header.

contentType

public static Result contentType(String contentType)

html

public static Result html()

html

public static Result html(int statusCode)

html

@Deprecated
public static Result html(Object renderable)
Deprecated. 

html should take only int status or nothing. => otherwise the html(..) methods might not work properly.. please use "render" from Result to do so. Should be as easy as html().render(myObject)

Parameters:
renderable -
Returns:

json

@Deprecated
public static Result json(int statusCode)
Deprecated. 

Only supporting one overloaded method. => you can still use json().status(200). and so on...

Parameters:
statusCode -
Returns:

json

public static Result json()

json

public static Result json(Object renderable)

xml

public static Result xml()

TODO

public static Result TODO()

async

public static AsyncResult async()


Copyright © 2012. All Rights Reserved.