示例#1
0
 /**
  * 暂停所有
  *
  * @return
  */
 public String stopAll() {
   try {
     this.qrtzTriggersService.stopAll();
   } catch (Exception e) {
     validateInfo.setSuccess(false);
     validateInfo.setMsg(e.getLocalizedMessage());
     e.printStackTrace();
   }
   return "reload";
 }
示例#2
0
 /**
  * 暂停任务组
  *
  * @return
  */
 public String stopGroup() {
   try {
     String groupName = ServletActionContext.getRequest().getParameter("groupName");
     this.qrtzTriggersService.stopGroup(groupName);
   } catch (Exception e) {
     validateInfo.setSuccess(false);
     validateInfo.setMsg(e.getLocalizedMessage());
     e.printStackTrace();
   }
   return "reload";
 }
示例#3
0
 /**
  * 定时任务修改方法
  *
  * @return
  */
 public String save() {
   try {
     HessianResult result = this.qrtzTriggersService.save(job);
     if (!result.getCode().equals("0")) {
       throw new ServiceException(result.getMessage());
     }
   } catch (Exception e) {
     validateInfo.setSuccess(false);
     validateInfo.setMsg(e.getLocalizedMessage());
     e.printStackTrace();
   }
   return "reload";
 }
示例#4
0
 public String removeTrigger() {
   try {
     String jobName = ServletActionContext.getRequest().getParameter("jobName");
     String jobGroup = ServletActionContext.getRequest().getParameter("jobGroup");
     HessianResult result = this.qrtzTriggersService.removeTrigger(jobName, jobGroup);
     if (!result.getCode().equals("0")) {
       throw new ServiceException(result.getMessage());
     }
   } catch (Exception e) {
     validateInfo.setSuccess(false);
     validateInfo.setMsg(e.getLocalizedMessage());
     e.printStackTrace();
   }
   return "reload";
 }
示例#5
0
 /**
  * 任务查询
  *
  * @return
  */
 public String findAll() {
   Page<T> page = new Page<T>();
   page.setLimit(this.limit);
   page.setStart(this.start);
   Map<String, String> map =
       ServletUtils.getParametersStartingWith(Struts2Utils.getRequest(), "filter_");
   try {
     String sql = qrtzTriggersService.getPageSql(map);
     setPage(this.basCarService.getPageBySqlMap(page, sql, map));
     // System.out.println(getPage().getResultMap());
     //			List<Map> list  = getPage().getResultMap();
     //			for(Map mapist :list ){
     //				SerializableClob clob=(SerializableClob)mapist.get("JOBDATA");
     //				mapist.put("JOBDATA", OprFaxMainAction.clob2String(clob));
     //			}
     //			getPage().setResultMap(list);
     Struts2Utils.renderJson(getPage());
   } catch (Exception e) {
     validateInfo.setSuccess(false);
     validateInfo.setMsg(e.getLocalizedMessage());
     e.printStackTrace();
   }
   return null;
 }