Package com.jeecms.cms.web

Examples of com.jeecms.cms.web.WebErrors


    }
    return errors;
  }

  private WebErrors validateUpdate(Integer id, HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    CmsSite site = CmsUtils.getSite(request);
    if (vldExist(id, site.getId(), errors)) {
      return errors;
    }
    return errors;
View Full Code Here


    }
    return errors;
  }

  private WebErrors validateDelete(Integer[] ids, HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    CmsSite site = CmsUtils.getSite(request);
    if (errors.ifEmpty(ids, "ids")) {
      return errors;
    }
    for (Integer id : ids) {
      vldExist(id, site.getId(), errors);
    }
View Full Code Here

    }
    return errors;
  }
 
  private WebErrors validateStart(Integer[] ids, HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    CmsSite site = CmsUtils.getSite(request);
    if (errors.ifEmpty(ids, "ids")) {
      return errors;
    }
    for (Integer id : ids) {
      vldExist(id, site.getId(), errors);
    }
View Full Code Here

    return false;
  }

  private WebErrors validateHistoryDelete(Integer[] ids,
      HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    CmsSite site = CmsUtils.getSite(request);
    if (errors.ifEmpty(ids, "ids")) {
      return errors;
    }
    for (Integer id : ids) {
      vldHistoryExist(id, site.getId(), errors);
    }
View Full Code Here

      filePath=fileList.get(i).getFilePath();
      if(filePath.contains(site.getContextPath())){
        names[i]=filePath.substring(filePath.indexOf(contextPath)+contextPath.length());
      }
    }
    WebErrors errors = validateDeleteFreeFile(root, names, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    if(names!=null&&names.length>0){
      int count = resourceMng.delete(names);
      log.info("delete Resource count: {}", count);
      for (String name : names) {
View Full Code Here

  }

  @RequestMapping("/file/o_delete.do")
  public String delete(String root, String[] names,
      HttpServletRequest request, ModelMap model) {
    WebErrors errors = validateDelete(root, names, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    int count = resourceMng.delete(names);
    log.info("delete Resource count: {}", count);
    for (String name : names) {
      fileMng.deleteByPath(name);
View Full Code Here



  private WebErrors validateDelete(String root, String[] names,
      HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    errors.ifEmpty(names, "names");
    for (String id : names) {
      vldExist(id, errors);
    }
    return errors;
  }
View Full Code Here

    return errors;
  }
 
  private WebErrors validateDeleteFreeFile(String root, String[] names,
      HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    if(names==null||names.length<=0){
      errors.addErrorCode("error.findnofreefile");
    }
    return errors;
  }
View Full Code Here

  }

  @RequestMapping("/friendlink_ctg/o_save.do")
  public String save(CmsFriendlinkCtg bean, HttpServletRequest request,
      ModelMap model) {
    WebErrors errors = validateSave(bean, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    bean = manager.save(bean);
    log.info("save CmsFriendlinkCtg id={}", bean.getId());
    cmsLogMng.operating(request, "cmsFriendlinkCtg.log.save", "id="
        + bean.getId() + ";name=" + bean.getName());
View Full Code Here

  }

  @RequestMapping("/friendlink_ctg/o_update.do")
  public String update(Integer[] wids, String[] name, Integer[] priority,
      HttpServletRequest request, ModelMap model) {
    WebErrors errors = validateUpdate(wids, name, priority, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    manager.updateFriendlinkCtgs(wids, name, priority);
    log.info("update CmsFriendlinkCtg.");
    cmsLogMng.operating(request, "cmsFriendlinkCtg.log.update", null);
    return "redirect:v_list.do";
View Full Code Here

TOP

Related Classes of com.jeecms.cms.web.WebErrors

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.