java.lang.Object
ch.ralscha.extdirectspring.controller.ApiController

@Controller public class ApiController extends Object
Spring managed controller that handles /api.jsp, /api-debug.js, /api-debug-doc.js and /api-{fingerprinted}.js requests.
  • Constructor Details

  • Method Details

    • api

      @RequestMapping(value={"/api.js","/api-debug.js","/api-debug-doc.js"}, method=GET) public void api(@RequestParam(value="apiNs",required=false) String apiNs, @RequestParam(value="actionNs",required=false) String actionNs, @RequestParam(value="remotingApiVar",required=false) String remotingApiVar, @RequestParam(value="pollingUrlsVar",required=false) String pollingUrlsVar, @RequestParam(value="group",required=false) String group, @RequestParam(value="fullRouterUrl",required=false) Boolean fullRouterUrl, @RequestParam(value="format",required=false) String format, @RequestParam(value="baseRouterUrl",required=false) String baseRouterUrl, jakarta.servlet.http.HttpServletRequest request, @RequestParam(value="cache",required=false,defaultValue="true") boolean cache, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Method that handles api.js and api-debug.js calls. Generates a javascript with the necessary code for Ext Direct.
      Parameters:
      apiNs - name of the namespace the variable remotingApiVar will live in. Defaults to Ext.app
      actionNs - name of the namespace the action will live in.
      remotingApiVar - name of the remoting api variable. Defaults to REMOTING_API
      pollingUrlsVar - name of the polling urls object. Defaults to POLLING_URLS
      group - name of the api group. Multiple groups delimited with comma
      fullRouterUrl - if true the router property contains the full request URL with method, server and port. Defaults to false returns only the URL without method, server and port
      format - only valid value is "json2. Ext Designer sends this parameter and the response is a JSON. Defaults to null and response is Javascript.
      baseRouterUrl - Sets the path to the router and poll controllers. If set overrides default behavior that uses request.getRequestURI
      request - the HTTP servlet request
      response - the HTTP servlet response
      Throws:
      IOException
    • api

      @RequestMapping(value="/api-{fingerprint}.js", method=GET) public void api(@RequestParam(value="apiNs",required=false) String apiNs, @RequestParam(value="actionNs",required=false) String actionNs, @RequestParam(value="remotingApiVar",required=false) String remotingApiVar, @RequestParam(value="pollingUrlsVar",required=false) String pollingUrlsVar, @RequestParam(value="group",required=false) String group, @RequestParam(value="fullRouterUrl",required=false) Boolean fullRouterUrl, @RequestParam(value="baseRouterUrl",required=false) String baseRouterUrl, jakarta.servlet.http.HttpServletRequest request, @RequestParam(value="cache",required=false,defaultValue="true") boolean cache, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Method that handles fingerprinted api.js calls (i.e. http://server/.../api-1.0.1.js). Generates a javascript with the necessary code for Ext Direct.
      Parameters:
      apiNs - name of the namespace the variable remotingApiVar will live in. Defaults to Ext.app
      actionNs - name of the namespace the action will live in.
      remotingApiVar - name of the remoting api variable. Defaults to REMOTING_API
      pollingUrlsVar - name of the polling urls object. Defaults to POLLING_URLS
      group - name of the api group. Multiple groups delimited with comma
      fullRouterUrl - if true the router property contains the full URL with protocol, server name, port number, and server path. Defaults to false returns only the URL with server path
      baseRouterUrl - Sets the path to the router and poll controllers. If set overrides default behavior that uses request.getRequestURI
      request - the HTTP servlet request
      response - the HTTP servlet response
      Throws:
      IOException