Search in sources :

Example 31 with PageHandler

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();
}
Also used : PageHandler(com.publiccms.common.handler.PageHandler)

Example 32 with PageHandler

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();
}
Also used : PageHandler(com.publiccms.common.handler.PageHandler) CmsContentQuery(com.publiccms.views.pojo.query.CmsContentQuery) Date(java.util.Date)

Example 33 with PageHandler

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();
}
Also used : PageHandler(com.publiccms.common.handler.PageHandler)

Example 34 with PageHandler

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();
}
Also used : PageHandler(com.publiccms.common.handler.PageHandler)

Example 35 with PageHandler

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();
}
Also used : PageHandler(com.publiccms.common.handler.PageHandler)

Aggregations

PageHandler (com.publiccms.common.handler.PageHandler)65 FacetPageHandler (com.publiccms.common.handler.FacetPageHandler)3 SysSite (com.publiccms.entities.sys.SysSite)3 IOException (java.io.IOException)3 Date (java.util.Date)3 HashMap (java.util.HashMap)3 CmsContentQuery (com.publiccms.views.pojo.query.CmsContentQuery)2 CmsContentAttribute (com.publiccms.entities.cms.CmsContentAttribute)1 CmsLottery (com.publiccms.entities.cms.CmsLottery)1 LogUpload (com.publiccms.entities.log.LogUpload)1 SysCluster (com.publiccms.entities.sys.SysCluster)1 CmsCategoryQuery (com.publiccms.views.pojo.query.CmsCategoryQuery)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Map (java.util.Map)1 Scheduled (org.springframework.scheduling.annotation.Scheduled)1 ModelMap (org.springframework.ui.ModelMap)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1