Examples of CmsSite


Examples of com.jeecms.cms.entity.main.CmsSite

  public static final String TPL_NAME = "channel_page";

  @SuppressWarnings("unchecked")
  public void execute(Environment env, Map params, TemplateModel[] loopVars,
      TemplateDirectiveBody body) throws TemplateException, IOException {
    CmsSite site = FrontUtils.getSite(env);
    Integer parentId = DirectiveUtils.getInt(PARAM_PARENT_ID, params);
    Integer siteId = DirectiveUtils.getInt(PARAM_SITE_ID, params);
    boolean hasContentOnly = getHasContentOnly(params);

    Pagination page;
    if (parentId != null) {
      page = channelMng.getChildPageForTag(parentId, hasContentOnly,
          FrontUtils.getPageNo(env), FrontUtils.getCount(params));
    } else {
      if (siteId == null) {
        siteId = site.getId();
      }
      page = channelMng.getTopPageForTag(siteId, hasContentOnly,
          FrontUtils.getPageNo(env), FrontUtils.getCount(params));
    }
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsSite

  public static final String PARAM_SITE_ID = "siteId";

  @SuppressWarnings("unchecked")
  public void execute(Environment env, Map params, TemplateModel[] loopVars,
      TemplateDirectiveBody body) throws TemplateException, IOException {
    CmsSite site = FrontUtils.getSite(env);

    List<CmsGuestbookCtg> list = cmsGuestbookCtgMng
        .getList(getSiteId(params));
   
    Map<String, TemplateModel> paramWrap = new HashMap<String, TemplateModel>(
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsSite

  public static final String PARAM_SITE_ID = "siteId";

  @SuppressWarnings("unchecked")
  public void execute(Environment env, Map params, TemplateModel[] loopVars,
      TemplateDirectiveBody body) throws TemplateException, IOException {
    CmsSite site = FrontUtils.getSite(env);
    CmsVoteTopic vote;
    Integer id = getId(params);
    if (id != null) {
      vote = cmsVoteTopicMng.findById(id);
    } else {
      Integer siteId = getSiteId(params);
      if (siteId == null) {
        siteId = site.getId();
      }
      vote = cmsVoteTopicMng.getDefTopic(siteId);
    }

    Map<String, TemplateModel> paramWrap = new HashMap<String, TemplateModel>(
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsSite

  public static final String TPL_NAME = "content_page";

  @SuppressWarnings("unchecked")
  public void execute(Environment env, Map params, TemplateModel[] loopVars,
      TemplateDirectiveBody body) throws TemplateException, IOException {
    CmsSite site = FrontUtils.getSite(env);
    Pagination page = (Pagination) super.getData(params, env);

    Map<String, TemplateModel> paramWrap = new HashMap<String, TemplateModel>(
        params);
    paramWrap.put(OUT_PAGINATION, DEFAULT_WRAPPER.wrap(page));
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsSite

  public static final String TPL_NAME = "guestbook_page";

  @SuppressWarnings("unchecked")
  public void execute(Environment env, Map params, TemplateModel[] loopVars,
      TemplateDirectiveBody body) throws TemplateException, IOException {
    CmsSite site = FrontUtils.getSite(env);
    int pageNo = FrontUtils.getPageNo(env);
    int count = FrontUtils.getCount(params);
    Pagination page = cmsGuestbookMng.getPage(getSiteId(params),
        getCtgId(params),null, getRecommend(params), getChecked(params),
        getDesc(params), true, pageNo, count);
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsSite

  public static final String TPL_NAME = "channel_list";

  @SuppressWarnings("unchecked")
  public void execute(Environment env, Map params, TemplateModel[] loopVars,
      TemplateDirectiveBody body) throws TemplateException, IOException {
    CmsSite site = FrontUtils.getSite(env);
    Integer parentId = DirectiveUtils.getInt(PARAM_PARENT_ID, params);
    Integer siteId = DirectiveUtils.getInt(PARAM_SITE_ID, params);
    boolean hasContentOnly = getHasContentOnly(params);

    List<Channel> list;
    if (parentId != null) {
      list = channelMng.getChildListForTag(parentId, hasContentOnly);
    } else {
      if (siteId == null) {
        siteId = site.getId();
      }
      list = channelMng.getTopListForTag(siteId, hasContentOnly);
    }

    Map<String, TemplateModel> paramWrap = new HashMap<String, TemplateModel>(
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsSite

    Boolean next = DirectiveUtils.getBool(PRAMA_NEXT, params);
    Content content;
    if (next == null) {
      content = contentMng.findById(id);
    } else {
      CmsSite site = FrontUtils.getSite(env);
      Integer channelId = DirectiveUtils.getInt(PARAM_CHANNEL_ID, params);
      content = contentMng.getSide(id, site.getId(), channelId, next);
    }

    Map<String, TemplateModel> paramWrap = new HashMap<String, TemplateModel>(
        params);
    paramWrap.put(OUT_BEAN, DEFAULT_WRAPPER.wrap(content));
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsSite

  public static final String PARAM_SITE_ID = "siteId";

  @SuppressWarnings("unchecked")
  public void execute(Environment env, Map params, TemplateModel[] loopVars,
      TemplateDirectiveBody body) throws TemplateException, IOException {
    CmsSite site = FrontUtils.getSite(env);
    Integer id = DirectiveUtils.getInt(PARAM_ID, params);
    Channel channel;
    if (id != null) {
      channel = channelMng.findById(id);
    } else {
      String path = DirectiveUtils.getString(PARAM_PATH, params);
      if (StringUtils.isBlank(path)) {
        // 如果path不存在,那么id必须存在。
        throw new ParamsRequiredException(PARAM_ID);
      }
      Integer siteId = DirectiveUtils.getInt(PARAM_SITE_ID, params);
      if (siteId == null) {
        siteId = site.getId();
      }
      channel = channelMng.findByPathForTag(path, siteId);
    }

    Map<String, TemplateModel> paramWrap = new HashMap<String, TemplateModel>(
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsSite

   * @return
   */
  @RequestMapping(value = "/guestbook*.jspx", method = RequestMethod.GET)
  public String index(Integer ctgId, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    FrontUtils.frontData(request, model, site);
    FrontUtils.frontPageData(request, model);
    CmsGuestbookCtg ctg = null;
    if (ctgId != null) {
      ctg = cmsGuestbookCtgMng.findById(ctgId);
    }
    if (ctg == null) {
      // 留言板首页
      return FrontUtils.getTplPath(request, site.getSolutionPath(),
          TPLDIR_SPECIAL, GUESTBOOK_INDEX);
    } else {
      // 留言板类别页
      model.addAttribute("ctg", ctg);
      return FrontUtils.getTplPath(request, site.getSolutionPath(),
          TPLDIR_SPECIAL, GUESTBOOK_CTG);
    }
  }
View Full Code Here

Examples of com.jeecms.cms.entity.main.CmsSite

  }

  @RequestMapping(value = "/guestbook/{id}.jspx", method = RequestMethod.GET)
  public String detail(@PathVariable Integer id, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    CmsSite site = CmsUtils.getSite(request);
    CmsGuestbook guestbook = null;
    if (id != null) {
      guestbook = cmsGuestbookMng.findById(id);
    }
    model.addAttribute("guestbook", guestbook);
    FrontUtils.frontData(request, model, site);
    return FrontUtils.getTplPath(request, site.getSolutionPath(),
        TPLDIR_SPECIAL, GUESTBOOK_DETAIL);

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.