RoleMVCResourceCommand.java 文件源码

java
阅读 17 收藏 0 点赞 0 评论 0

项目:liferay-dummy-factory 作者:
@Override
protected void doServeResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws Exception {
    String cmd = ParamUtil.getString(resourceRequest, Constants.CMD);
    String serializedJson = "";

    if (cmd.equals(CMD_ROLELIST)) {
        serializedJson = getRoleLists(resourceRequest, resourceResponse);
    } else {
        _log.error("Unknown command is passed <" + cmd + ">");
    }

    HttpServletResponse response = _portal.getHttpServletResponse(resourceResponse);

    response.setContentType(ContentTypes.APPLICATION_JSON);

    ServletResponseUtil.write(response, serializedJson);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号