Class JsonParserController
java.lang.Object
com.chillycheesy.modulo.controllers.JsonParserController
- All Implemented Interfaces:
Controller
A controller that parses the result of the next controller into JSON.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Configuration configuration)
Parses the result of the next controller into Jsonvoid
setNextStep(Controller controller)
Sets the next controller.
-
Constructor Details
-
JsonParserController
public JsonParserController()
-
-
Method Details
-
apply
public Object apply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Configuration configuration) throws ExceptionParses the result of the next controller into Json- Specified by:
apply
in interfaceController
- Parameters:
request
- the http request.response
- the http response.configuration
- the configuration.- Returns:
- the result of the next controller parsed into JSON.
- Throws:
Exception
- if an error occurs.
-
setNextStep
Sets the next controller.- Specified by:
setNextStep
in interfaceController
- Parameters:
controller
- the next controller.
-