@Controller public class ApiController extends Object
| Constructor and Description |
|---|
ApiController(ConfigurationService configurationService,
MethodInfoCache methodInfoCache,
ApiCache apiCache) |
| Modifier and Type | Method and Description |
|---|---|
void |
api(String apiNs,
String actionNs,
String remotingApiVar,
String pollingUrlsVar,
String group,
Boolean fullRouterUrl,
String baseRouterUrl,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Method that handles fingerprinted api.js calls (i.e.
|
void |
api(String apiNs,
String actionNs,
String remotingApiVar,
String pollingUrlsVar,
String group,
Boolean fullRouterUrl,
String format,
String baseRouterUrl,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Method that handles api.js and api-debug.js calls.
|
@Autowired public ApiController(ConfigurationService configurationService, MethodInfoCache methodInfoCache, ApiCache apiCache)
@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,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
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 responseIOException@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,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
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 responseIOExceptionCopyright © 2010–2017. All rights reserved.