Package com.jeecms.cms.entity.main

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


    }
    return beans;
  }

  public Content deleteById(Integer id) {
    Content bean = findById(id);
    // 执行监听器
    preDelete(bean);
    // 移除tag
    contentTagMng.removeTags(bean.getTags());
    // 删除评论
    cmsCommentMng.deleteByContentId(id);
    bean.clear();
    bean = dao.deleteById(id);
    // 执行监听器
    afterDelete(bean);
    return bean;
  }
View Full Code Here


      throws TemplateNotFoundException, TemplateParseException,
      GeneratedZeroStaticPageException, StaticPageNotOpenException, ContentNotCheckedException {
    int count = 0;
    List<Content> list = new ArrayList<Content>();
    for (int i = 0, len = ids.length; i < len; i++) {
      Content content = findById(ids[i]);
      try {
        if (!content.getChannel().getStaticContent()) {
          throw new StaticPageNotOpenException(
              "content.staticNotOpen", count, content.getTitle());
        }
        if(!content.isChecked()){
          throw new ContentNotCheckedException("content.notChecked", count, content.getTitle());
        }
        if (staticPageSvc.content(content)) {
          list.add(content);
          count++;
        }
      } catch (IOException e) {
        throw new TemplateNotFoundException(
            "content.tplContentNotFound", count, content.getTitle());
      } catch (TemplateException e) {
        throw new TemplateParseException("content.tplContentException",
            count, content.getTitle());
      }
    }
    if (count == 0) {
      throw new GeneratedZeroStaticPageException(
          "content.staticGenerated");
View Full Code Here

TOP

Related Classes of com.jeecms.cms.entity.main.Content

Copyright © 2018 www.massapicom. 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.