controllers
Class Abstract

java.lang.Object
  extended by play.mvc.Results
      extended by play.mvc.Controller
          extended by controllers.Abstract
All Implemented Interfaces:
play.mvc.Http.HeaderNames, play.mvc.Http.Status
Direct Known Subclasses:
Application, Auth, Demo, Features, GeoCoding, JReports, Layers, Mobile, Options, Services, Sockets, Test

public abstract class Abstract
extends play.mvc.Controller

Class contains a number of useful functions that are frequently used in the controllers. All controllers inherits from this class


Nested Class Summary
static class Abstract.ScalaResult
           
 
Nested classes/interfaces inherited from class play.mvc.Results
play.mvc.Results.AsyncResult, play.mvc.Results.ByteChunks, play.mvc.Results.Chunks<A>, play.mvc.Results.Redirect, play.mvc.Results.Status, play.mvc.Results.StringChunks, play.mvc.Results.Todo
 
Field Summary
 
Fields inherited from class play.mvc.Results
TODO
 
Fields inherited from interface play.mvc.Http.Status
ACCEPTED, BAD_GATEWAY, BAD_REQUEST, CONFLICT, CONTINUE, CREATED, EXPECTATION_FAILED, FORBIDDEN, FOUND, GATEWAY_TIMEOUT, GONE, HTTP_VERSION_NOT_SUPPORTED, INTERNAL_SERVER_ERROR, LENGTH_REQUIRED, METHOD_NOT_ALLOWED, MOVED_PERMANENTLY, MULTIPLE_CHOICES, NO_CONTENT, NON_AUTHORITATIVE_INFORMATION, NOT_ACCEPTABLE, NOT_FOUND, NOT_IMPLEMENTED, NOT_MODIFIED, OK, PARTIAL_CONTENT, PAYMENT_REQUIRED, PRECONDITION_FAILED, PROXY_AUTHENTICATION_REQUIRED, REQUEST_ENTITY_TOO_LARGE, REQUEST_TIMEOUT, REQUEST_URI_TOO_LONG, REQUESTED_RANGE_NOT_SATISFIABLE, RESET_CONTENT, SEE_OTHER, SERVICE_UNAVAILABLE, SWITCHING_PROTOCOLS, TEMPORARY_REDIRECT, UNAUTHORIZED, UNSUPPORTED_MEDIA_TYPE, USE_PROXY
 
Fields inherited from interface play.mvc.Http.HeaderNames
ACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ACCEPT_RANGES, ACCESS_CONTROL_ALLOW_CREDENTIALS, ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_EXPOSE_HEADERS, ACCESS_CONTROL_MAX_AGE, ACCESS_CONTROL_REQUEST_HEADERS, ACCESS_CONTROL_REQUEST_METHOD, AGE, ALLOW, AUTHORIZATION, CACHE_CONTROL, CONNECTION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_RANGE, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, COOKIE, DATE, ETAG, EXPECT, EXPIRES, FROM, HOST, IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_RANGE, IF_UNMODIFIED_SINCE, LAST_MODIFIED, LOCATION, MAX_FORWARDS, ORIGIN, PRAGMA, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, RANGE, REFERER, RETRY_AFTER, SERVER, SET_COOKIE, SET_COOKIE2, TE, TRAILER, TRANSFER_ENCODING, UPGRADE, USER_AGENT, VARY, VIA, WARNING, WWW_AUTHENTICATE
 
Constructor Summary
Abstract()
           
 
Method Summary
static org.codehaus.jackson.JsonNode asJson(java.lang.Object object, java.lang.String type)
          serialize to json
static play.mvc.Result async(java.util.concurrent.Callable<play.mvc.Result> callable)
          Executes block of code asynchronously in the application Akka Actor system.
static play.mvc.Result crossdomain(play.mvc.Result result)
          Add headers to object
static java.lang.Integer getTotalPages(java.lang.Integer itemsCount)
           
static play.mvc.Result jsonResult(java.lang.Object object)
           
static play.mvc.Result jsonResult(java.lang.Object object, java.lang.String type)
           
static akka.actor.ActorSystem system()
          Retrieve the application Akka Actor system.
 
Methods inherited from class play.mvc.Controller
changeLang, ctx, flash, flash, flash, lang, request, response, session, session, session
 
Methods inherited from class play.mvc.Results
async, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, created, created, created, created, created, created, created, created, created, created, created, created, created, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, found, found, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, movedPermanently, movedPermanently, noContent, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, redirect, redirect, seeOther, seeOther, status, status, status, status, status, status, status, status, status, status, status, status, status, temporaryRedirect, temporaryRedirect, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Abstract

public Abstract()
Method Detail

crossdomain

public static play.mvc.Result crossdomain(play.mvc.Result result)
Add headers to object

Parameters:
result - object
Returns:
object with headers.

jsonResult

public static play.mvc.Result jsonResult(java.lang.Object object)
Parameters:
object - object
Returns:
json object
See Also:
JsonViews.List

jsonResult

public static play.mvc.Result jsonResult(java.lang.Object object,
                                         java.lang.String type)
Parameters:
object - object
type - type of serialization
Returns:
converted object
See Also:
serialize object to json and preparation for returns to the front-end, JsonViews

asJson

public static org.codehaus.jackson.JsonNode asJson(java.lang.Object object,
                                                   java.lang.String type)
serialize to json

Parameters:
object - object
type - type of serialization
Returns:
object to json format
See Also:
JsonNode

system

public static akka.actor.ActorSystem system()
Retrieve the application Akka Actor system.


async

public static play.mvc.Result async(java.util.concurrent.Callable<play.mvc.Result> callable)
Executes block of code asynchronously in the application Akka Actor system.


getTotalPages

public static java.lang.Integer getTotalPages(java.lang.Integer itemsCount)