use of com.publiccms.common.handler.PageHandler in project PublicCMS-preview by sanluan.
the class CmsContentFileListDirective method execute.
@Override
public void execute(RenderHandler handler) throws IOException, Exception {
PageHandler page = service.getPage(handler.getLong("contentId"), handler.getLong("userId"), handler.getBoolean("image"), handler.getString("orderField"), handler.getString("orderType"), handler.getInteger("pageIndex", 1), handler.getInteger("count", 30));
handler.put("page", page).render();
}
use of com.publiccms.common.handler.PageHandler in project PublicCMS-preview by sanluan.
the class CmsContentListDirective method execute.
@Override
public void execute(RenderHandler handler) throws IOException, Exception {
CmsContentQuery queryEntity = new CmsContentQuery();
queryEntity.setSiteId(getSite(handler).getId());
queryEntity.setEndPublishDate(handler.getDate("endPublishDate"));
if (handler.getBoolean("advanced", false)) {
queryEntity.setStatus(handler.getIntegerArray("status"));
queryEntity.setDisabled(handler.getBoolean("disabled", false));
queryEntity.setEmptyParent(handler.getBoolean("emptyParent"));
queryEntity.setTitle(handler.getString("title"));
} else {
queryEntity.setStatus(new Integer[] { CmsContentService.STATUS_NORMAL });
queryEntity.setDisabled(false);
queryEntity.setEmptyParent(true);
Date now = CommonUtils.getMinuteDate();
if (null == queryEntity.getEndPublishDate() || queryEntity.getEndPublishDate().after(now)) {
queryEntity.setEndPublishDate(now);
}
}
queryEntity.setCategoryId(handler.getInteger("categoryId"));
queryEntity.setCategoryIds(handler.getIntegerArray("categoryIds"));
queryEntity.setModelIds(handler.getStringArray("modelId"));
queryEntity.setParentId(handler.getLong("parentId"));
queryEntity.setOnlyUrl(handler.getBoolean("onlyUrl"));
queryEntity.setHasImages(handler.getBoolean("hasImages"));
queryEntity.setHasFiles(handler.getBoolean("hasFiles"));
queryEntity.setUserId(handler.getLong("userId"));
queryEntity.setStartPublishDate(handler.getDate("startPublishDate"));
PageHandler page = service.getPage(queryEntity, handler.getBoolean("containChild"), handler.getString("orderField"), handler.getString("orderType"), handler.getInteger("pageIndex", 1), handler.getInteger("count", 30));
handler.put("page", page).render();
}
use of com.publiccms.common.handler.PageHandler in project PublicCMS-preview by sanluan.
the class CmsContentRelatedListDirective method execute.
@Override
public void execute(RenderHandler handler) throws IOException, Exception {
PageHandler page = service.getPage(handler.getLong("contentId"), handler.getLong("relatedContentId"), handler.getLong("userId"), handler.getString("orderField"), handler.getString("orderType"), handler.getInteger("pageIndex", 1), handler.getInteger("count", 10));
handler.put("page", page).render();
}
use of com.publiccms.common.handler.PageHandler in project PublicCMS-preview by sanluan.
the class HomeArticleListDirective method execute.
@Override
public void execute(RenderHandler handler) throws IOException, Exception {
PageHandler page = service.getPage(getSite(handler).getId(), handler.getLong("directoryId"), handler.getLong("userId"), handler.getBoolean("disabled"), handler.getString("orderField"), handler.getString("orderType"), handler.getInteger("pageIndex", 1), handler.getInteger("count", 30));
handler.put("page", page).render();
}
use of com.publiccms.common.handler.PageHandler in project PublicCMS-preview by sanluan.
the class HomeCommentListDirective method execute.
@Override
public void execute(RenderHandler handler) throws IOException, Exception {
PageHandler page = service.getPage(getSite(handler).getId(), handler.getLong("userId"), handler.getString("itemType"), handler.getLong("itemId"), handler.getBoolean("disabled"), handler.getString("orderType"), handler.getInteger("pageIndex", 1), handler.getInteger("count", 30));
handler.put("page", page).render();
}
Aggregations