/**
* Get Page lists
*
* Depending on the passed site groupd id,
* fetch all pages in the site and return JSON object list.
*
* @param request
* @param response
* @return
*/
protected String getPageLists(ResourceRequest request, ResourceResponse response) {
ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(
WebKeys.THEME_DISPLAY);
JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
long siteGroupId = ParamUtil.getLong(request, "siteGroupId", themeDisplay.getSiteGroupId());
List<Layout> layouts = _layoutLocalService.getLayouts(
siteGroupId,
false,
LayoutConstants.DEFAULT_PARENT_LAYOUT_ID,
false,
QueryUtil.ALL_POS,
QueryUtil.ALL_POS);
for(Layout layout : layouts ) {
JSONObject curUserJSONObject = JSONFactoryUtil.createJSONObject();
if(_log.isDebugEnabled()) {
_log.debug("layout <" + layout.getName(themeDisplay.getLocale()) + ">");
_log.debug(layout.toString());
_log.debug("----------");
}
curUserJSONObject.put("name" , layout.getName(themeDisplay.getLocale()));
curUserJSONObject.put("parentLayoutId" , layout.getLayoutId());
jsonArray.put(curUserJSONObject);
}
return jsonArray.toJSONString();
}
PageMVCResourceCommand.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:liferay-dummy-factory
作者:
评论列表
文章目录