Package play.mvc
Class Controller
- java.lang.Object
-
- play.mvc.Controller
-
- All Implemented Interfaces:
PlayContextController
,PlayController
- Direct Known Subclasses:
RebelController
public class Controller extends java.lang.Object implements PlayContextController
-
-
Field Summary
Fields Modifier and Type Field Description protected ActionContext
actionContext
protected Scope.Flash
flash
protected Scope.Params
params
protected Scope.RenderArgs
renderArgs
protected Http.Request
request
protected Http.Response
response
protected Scope.Session
session
protected Validation
validation
-
Constructor Summary
Constructors Constructor Description Controller()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected BadRequest
badRequest()
protected void
checkAuthenticity()
protected static void
forbidden()
Deprecated.instead if throwing an exception we recommend to RETURN the result.protected static void
forbidden(java.lang.String reason)
Deprecated.instead if throwing an exception we recommend to RETURN the result.protected Forbidden
forbiddenResult()
void
setContext(ActionContext actionContext)
protected View
viewResult()
protected View
viewResult(java.lang.String templateName)
-
-
-
Field Detail
-
actionContext
protected ActionContext actionContext
-
request
protected Http.Request request
-
response
protected Http.Response response
-
session
protected Scope.Session session
-
flash
protected Scope.Flash flash
-
params
protected Scope.Params params
-
renderArgs
protected Scope.RenderArgs renderArgs
-
validation
protected Validation validation
-
-
Method Detail
-
setContext
public void setContext(ActionContext actionContext)
- Specified by:
setContext
in interfacePlayContextController
-
checkAuthenticity
protected void checkAuthenticity()
-
forbidden
@Deprecated protected static void forbidden()
Deprecated.instead if throwing an exception we recommend to RETURN the result. It makes your code clear and testable. Use methodforbiddenResult()
.This "Play1-style" method throwsForbidden
exception.
-
forbidden
@Deprecated protected static void forbidden(java.lang.String reason)
Deprecated.instead if throwing an exception we recommend to RETURN the result. It makes your code clear and testable. Use methodforbiddenResult()
.This "Play1-style" method throwsForbidden
exception.
-
badRequest
protected BadRequest badRequest()
-
viewResult
protected View viewResult()
-
viewResult
protected View viewResult(java.lang.String templateName)
-
forbiddenResult
protected Forbidden forbiddenResult()
-
-