java.lang.Object
ch.ralscha.extdirectspring.controller.ApiController
Spring managed controller that handles /api.jsp, /api-debug.js, /api-debug-doc.js and
/api-{fingerprinted}.js requests.
-
Constructor Summary
ConstructorsConstructorDescriptionApiController(ConfigurationService configurationService, MethodInfoCache methodInfoCache, ApiCache apiCache) -
Method Summary
Modifier and TypeMethodDescriptionvoidapi(String apiNs, String actionNs, String remotingApiVar, String pollingUrlsVar, String group, Boolean fullRouterUrl, String baseRouterUrl, jakarta.servlet.http.HttpServletRequest request, boolean cache, jakarta.servlet.http.HttpServletResponse response) Method that handles fingerprinted api.js calls (i.e.voidapi(String apiNs, String actionNs, String remotingApiVar, String pollingUrlsVar, String group, Boolean fullRouterUrl, String format, String baseRouterUrl, jakarta.servlet.http.HttpServletRequest request, boolean cache, jakarta.servlet.http.HttpServletResponse response) Method that handles api.js and api-debug.js calls.
-
Constructor Details
-
ApiController
@Autowired public ApiController(ConfigurationService configurationService, MethodInfoCache methodInfoCache, ApiCache apiCache)
-
-
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.appactionNs- name of the namespace the action will live in.remotingApiVar- name of the remoting api variable. Defaults to REMOTING_APIpollingUrlsVar- name of the polling urls object. Defaults to POLLING_URLSgroup- name of the api group. Multiple groups delimited with commafullRouterUrl- 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 portformat- 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.getRequestURIrequest- the HTTP servlet requestresponse- 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.appactionNs- name of the namespace the action will live in.remotingApiVar- name of the remoting api variable. Defaults to REMOTING_APIpollingUrlsVar- name of the polling urls object. Defaults to POLLING_URLSgroup- name of the api group. Multiple groups delimited with commafullRouterUrl- 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 pathbaseRouterUrl- Sets the path to the router and poll controllers. If set overrides default behavior that uses request.getRequestURIrequest- the HTTP servlet requestresponse- the HTTP servlet response- Throws:
IOException
-