@Override
protected void doServeResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse)
throws Exception {
String cmd = ParamUtil.getString(resourceRequest, Constants.CMD);
String serializedJson = "";
if(cmd.equals(CMD_THREAD_LIST)) {
serializedJson = getThreadList(resourceRequest,resourceResponse );
} else if (cmd.equals(CMD_CATEGORY_LIST)) {
serializedJson = getCategoryList(resourceRequest,resourceResponse );
} else {
_log.error("Unknown command is passed <" + cmd + ">");
}
HttpServletResponse response = _portal.getHttpServletResponse(
resourceResponse);
response.setContentType(ContentTypes.APPLICATION_JSON);
ServletResponseUtil.write(response, serializedJson);
}
MBMVCResourceCommand.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:liferay-dummy-factory
作者:
评论列表
文章目录