Examples of AjaxFormResult


Examples of com.iisigroup.cap.response.AjaxFormResult

      } catch (JobParametersInvalidException e) {
        throw new CapMessageException("msg.job.parametersInvalid",
            getClass());
      }
    }
    return new AjaxFormResult();
  }// ;
View Full Code Here

Examples of com.iisigroup.cap.response.AjaxFormResult

    fmt.put("schType", new I18NFormatter("sch.schType."));
    return new GridResult(page.getContent(), page.getTotalRow(), fmt);
  }// ;

  public IResult schDetail(IRequest params) {
    AjaxFormResult result = new AjaxFormResult();
    BatchSchedule sch = batchSrv.findSchById(params.get("schId"));
    Map<String, Object> map = CapBeanUtil.bean2Map(sch,
        CapBeanUtil.getFieldName(BatchSchedule.class, false));
    map.put("notifyStatus", MapUtils.getString(map, "notifyStatus", "")
        .split(","));
    result.putAll(map);
    return result;
  }// ;
View Full Code Here

Examples of com.iisigroup.cap.response.AjaxFormResult

   *            request
   * @return IResult
   * @throws SchedulerException
   */
  public IResult schModify(IRequest request) throws SchedulerException {
    AjaxFormResult result = new AjaxFormResult();
    BatchSchedule oldSch = batchSrv.findSchById(request.get("schId"));
    BatchSchedule newSch = new BatchSchedule();
    boolean isnew = (oldSch == null);
    if (!isnew) {
      CapBeanUtil.copyBean(oldSch, newSch,
View Full Code Here

Examples of com.iisigroup.cap.response.AjaxFormResult

   *            request
   * @return IResult
   * @throws SchedulerException
   */
  public IResult schDelete(IRequest request) throws SchedulerException {
    AjaxFormResult result = new AjaxFormResult();
    String[] ids = request.getParamsAsStringArray("schId");
    for (String id : ids) {
      BatchSchedule sch = batchSrv.findSchById(id);
      if (sch != null) {
        batchSrv.deleteSch(id);
View Full Code Here

Examples of com.iisigroup.cap.response.AjaxFormResult

    String executionId = request.get("jobExeId");
    String instancId = request.get("jobInstId");
    Map<String, Object> map = batchSrv.findExecutionDetail(executionId);
    String jobParams = jobParametersExtractor.fromJobParameters(batchSrv
        .findJobParams(instancId));
    AjaxFormResult result = new AjaxFormResult();
    result.set("jobParams", jobParams);
    result.set("JOB_NAME", (String) map.get("JOB_NAME"));
    result.set("START_TIME",
        new ADDateTimeFormatter().reformat(map.get("START_TIME")));
    result.set("duration", new DurationFormatter("START_TIME", "END_TIME",
        "HH:mm:ss.SSS").reformat(map));
    result.set("jobStatus", (String) map.get("STATUS"));
    result.set("EXIT_CODE", (String) map.get("EXIT_CODE"));
    result.set("JOB_EXECUTION_ID",
        String.valueOf(map.get("JOB_EXECUTION_ID")));
    result.set("exitMessage", (String) map.get("EXIT_MESSAGE"));
    result.set("EXECUTOR", (String) map.get("EXECUTOR"));
    result.set("JOB_INSTANCE_ID",
        String.valueOf(map.get("JOB_INSTANCE_ID")));
    return result;
  }// ;
View Full Code Here

Examples of com.iisigroup.cap.response.AjaxFormResult

   * @param request
   *            IRequest
   * @return IResult
   */
  public IResult executionStop(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    long jobExecutionId = Long.parseLong(request.get("jobExeId"));
    try {
      JobExecution jobExecution = jobService.stop(jobExecutionId);
      new JobExecutionInfo(jobExecution, TimeZone.getDefault());
    } catch (NoSuchJobExecutionException e) {
View Full Code Here

Examples of com.iisigroup.cap.response.AjaxFormResult

   * @param request
   *            IRequest
   * @return IResult
   */
  public IResult executionRestart(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    try {
      String jobName = request.get("jobId");
      long jobInstanceId = Long.parseLong(request.get("jobInsId"));
      Collection<JobExecution> jobExecutions = jobService
          .getJobExecutionsForJobInstance(jobName, jobInstanceId);
View Full Code Here

Examples of com.iisigroup.cap.response.AjaxFormResult

 
  private static final String TIME_OUT = "TIME_OUT";


  public IResult check(IRequest request) throws CapException {
    AjaxFormResult result = new AjaxFormResult();
    HttpServletRequest sreq = (HttpServletRequest)request.getServletRequest();
//    String path = sreq.getPathInfo();
//    boolean isNewSes = sreq.getSession(false).isNew();
    long time1 = sreq.getSession(false).getLastAccessedTime();
    long time2 = CapDate.getCurrentTimestamp().getTime();
    //session設定時間
        long time3 = sreq.getSession(false).getMaxInactiveInterval();
        //讀取後台db設定(單位為分鐘)
        sysProp.remove(TIME_OUT);
        String stout = sysProp.get(TIME_OUT);
        if(!CapString.isEmpty(stout)){
          time3 = Long.parseLong(stout);
          time3 = time3*60;
        }
        String isContinues = request.get("isContinues");
        // Calculate difference in milliseconds
        long diff = time2 - time1;
        // Difference in seconds
        long diffSec = diff / 1000;
        //session timeout 導向 error page
        String refPath = sreq.getHeader("referer");
        refPath = StringEscapeUtils.unescapeHtml(refPath);
        if((diffSec>time3 && refPath.lastIndexOf("error")<0 && refPath.lastIndexOf("timeout")<0) || "false".equals(isContinues)){
//          if(!isNewSes){
            result.set("errorPage", "/cap-web/page/timeout");
            sreq.getSession(false).invalidate();
//          }
        }
        result.set("msg", "cccheked");
    return result;
  }
View Full Code Here

Examples of com.iisigroup.cap.response.AjaxFormResult

   *            PageParameters
   * @return IResult
   * @throws CapException
   */
  public IResult fileSuccess(IRequest params) {
    return new AjaxFormResult();
  }
View Full Code Here

Examples of com.iisigroup.cap.response.AjaxFormResult

  @HandlerType(HandlerTypeEnum.FORM)
  public IResult queryJsI18N(IRequest request) {
    String result = MessageBundleScriptCreator.generateJson(request
        .get("f").replaceAll("/?webroot/page", ""));
    return new AjaxFormResult(result);
  }// ;
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.