Package com.jeecms.cms.web

Examples of com.jeecms.cms.web.WebErrors


  }

  @RequestMapping("/acquisition/o_save.do")
  public String save(CmsAcquisition bean, Integer channelId, Integer typeId,
      HttpServletRequest request, ModelMap model) {
    WebErrors errors = validateSave(bean, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    Integer siteId = CmsUtils.getSiteId(request);
    Integer userId = CmsUtils.getUserId(request);
    bean = manager.save(bean, channelId, typeId, userId, siteId);
    log.info("save CmsAcquisition id={}", bean.getId());
View Full Code Here


  }

  @RequestMapping("/acquisition/o_update.do")
  public String update(CmsAcquisition bean, Integer channelId,
      Integer typeId, HttpServletRequest request, ModelMap model) {
    WebErrors errors = validateUpdate(bean.getId(), request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    bean = manager.update(bean, channelId, typeId);
    log.info("update CmsAcquisition id={}.", bean.getId());
    cmsLogMng.operating(request, "cmsAcquisition.log.update", "id="
        + bean.getId() + ";name=" + bean.getName());
View Full Code Here

  }

  @RequestMapping("/acquisition/o_delete.do")
  public String delete(Integer[] ids, HttpServletRequest request,
      ModelMap model) {
    WebErrors errors = validateDelete(ids, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsAcquisition[] beans = manager.deleteByIds(ids);
    for (CmsAcquisition bean : beans) {
      log.info("delete CmsAcquisition id={}", bean.getId());
      cmsLogMng.operating(request, "cmsAcquisition.log.delete", "id="
View Full Code Here

  @RequestMapping("/acquisition/o_start.do")
  public String start(Integer[] ids, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    Integer siteId = CmsUtils.getSiteId(request);
    WebErrors errors = validateStart(ids, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    Integer queueNum = manager.hasStarted(siteId);
    if(queueNum==0){
      acquisitionSvc.start(ids[0]);
    }
View Full Code Here

  }

  @RequestMapping("/acquisition/o_end.do")
  public String end(Integer id, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    WebErrors errors = WebErrors.create(request);
    Integer siteId = CmsUtils.getSiteId(request);
    if (vldExist(id, siteId, errors)) {
      return errors.showErrorPage(model);
    }
    manager.end(id);
    CmsAcquisition acqu = manager.popAcquFromQueue(siteId);
    if (acqu != null) {
      Integer acquId = acqu.getId();
View Full Code Here

  }

  @RequestMapping("/acquisition/o_pause.do")
  public String pause(Integer id, HttpServletRequest request,
      HttpServletResponse response, ModelMap model) {
    WebErrors errors = WebErrors.create(request);
    Integer siteId = CmsUtils.getSiteId(request);
    if (vldExist(id, siteId, errors)) {
      return errors.showErrorPage(model);
    }
    manager.pause(id);
    log.info("pause CmsAcquisition id={}", id);
    return "redirect:v_list.do";
  }
View Full Code Here

  @RequestMapping("/acquisition/o_cancel.do")
  public String cancel(Integer id, Integer sortId, Integer pageNo,
      HttpServletRequest request, HttpServletResponse response,
      ModelMap model) {
    WebErrors errors = WebErrors.create(request);
    Integer siteId = CmsUtils.getSiteId(request);
    if (vldExist(id, siteId, errors)) {
      return errors.showErrorPage(model);
    }
    manager.cancel(siteId, id);
    log.info("cancel CmsAcquisition id={}", id);
    return "redirect:v_list.do";
  }
View Full Code Here

  @RequestMapping("/acquisition/o_delete_history.do")
  public String deleteHistory(Integer[] ids, Integer pageNo,
      HttpServletRequest request, HttpServletResponse response,
      ModelMap model) {
    WebErrors errors = validateHistoryDelete(ids, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsAcquisitionHistory[] beans = cmsAcquisitionHistoryMng
        .deleteByIds(ids);
    for (CmsAcquisitionHistory bean : beans) {
      log.info("delete CmsAcquisitionHistory id={}", bean.getId());
View Full Code Here

    return history(null, pageNo, request, response, model);
  }

  private WebErrors validateSave(CmsAcquisition bean,
      HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    CmsSite site = CmsUtils.getSite(request);
    bean.setSite(site);
    return errors;
  }
View Full Code Here

    bean.setSite(site);
    return errors;
  }

  private WebErrors validateEdit(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

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.