Class JsonParserController

java.lang.Object
com.chillycheesy.modulo.controllers.JsonParserController
All Implemented Interfaces:
Controller

public class JsonParserController extends Object implements Controller
A controller that parses the result of the next controller into JSON.
  • Constructor Details

    • JsonParserController

      public JsonParserController()
  • Method Details

    • apply

      public Object apply(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Configuration configuration) throws Exception
      Parses the result of the next controller into Json
      Specified by:
      apply in interface Controller
      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

      public void setNextStep(Controller controller)
      Sets the next controller.
      Specified by:
      setNextStep in interface Controller
      Parameters:
      controller - the next controller.