@Controller public class ApiController extends Object
| Constructor and Description |
|---|
ApiController(org.springframework.context.ApplicationContext context,
JsonHandler jsonHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
api(String apiNs,
String actionNs,
String remotingApiVar,
String pollingUrlsVar,
String group,
boolean fullRouterUrl,
String format,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Method that handles api.js calls.
|
void |
setConfiguration(Configuration configuration) |
@Autowired
public ApiController(org.springframework.context.ApplicationContext context,
JsonHandler jsonHandler)
public void setConfiguration(Configuration configuration)
@RequestMapping(value={"/api.js","/api-debug.js"},
method=GET)
public void api(@RequestParam(value="apiNs",required=false,defaultValue="Ext.app")
String apiNs,
@RequestParam(value="actionNs",required=false)
String actionNs,
@RequestParam(value="remotingApiVar",required=false,defaultValue="REMOTING_API")
String remotingApiVar,
@RequestParam(value="pollingUrlsVar",required=false,defaultValue="POLLING_URLS")
String pollingUrlsVar,
@RequestParam(value="group",required=false)
String group,
@RequestParam(value="fullRouterUrl",required=false,defaultValue="false")
boolean fullRouterUrl,
@RequestParam(value="format",required=false)
String format,
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 valid JSON.
Defaults to null and response is standard Javascript.request - response - IOExceptionCopyright © 2010-2012. All Rights Reserved.