Package com.taobao.zeus.web.platform.client.util

Examples of com.taobao.zeus.web.platform.client.util.GwtException


      try {
        totalNum = tableManager.getTotalNumber(name);
        tl = convertList(tableManager.getPagingTables(name, offset,
            limit));
      } catch (ZeusException e) {
        throw new GwtException("获取分页表失败!", e);
      }
      return new PagingLoadResultBean<TableModel>(tl, totalNum,
          loadConfig.getOffset());
    } else {
      return new PagingLoadResultBean<TableModel>(
View Full Code Here


        pm.setCompressed(sd.isCompressed());
        pml.add(pm);
      }
    } catch (ZeusException e) {
      log.error("获取分区列表出错", e);
      throw new GwtException("获取分区列表出错", e);
    }
    return pml;
  }
View Full Code Here

      result.setHeaders(headers);
      result.setData(datas);
      return result;
    } catch (Exception e) {
      log.error("data preview error", e);
      throw new GwtException(e.getMessage(), e);
    }

  }
View Full Code Here

    try {
      JobDescriptor jd=permissionGroupManager.createJob(LoginUser.getUser().getUid(), jobName, parentGroupId,type);
      return getUpstreamJob(jd.getId());
    } catch (ZeusException e) {
      log.error(e);
      throw new GwtException(e.getMessage());
    }
  }
View Full Code Here

    try {
      permissionGroupManager.updateJob(LoginUser.getUser().getUid(), jd);
      return getUpstreamJob(jd.getId());
    } catch (ZeusException e) {
      log.error(e);
      throw new GwtException(e.getMessage());
    }
  }
View Full Code Here

      jd.setAuto(auto);
      try {
        permissionGroupManager.updateJob(LoginUser.getUser().getUid(), jd);
      } catch (ZeusException e) {
        log.error(e);
        throw new GwtException(e.getMessage());
      }
    }
  }
View Full Code Here

      triggerType=TriggerType.MANUAL;
    }else if(type==2){
      triggerType=TriggerType.MANUAL_RECOVER;
    }
    if(!permissionManager.hasJobPermission(LoginUser.getUser().getUid(), jobId)){
      GwtException e=new GwtException("你没有权限执行该操作");
      log.error(e);
      throw e;
    }
    JobHistory history=new JobHistory();
    history.setJobId(jobId);
    history.setTriggerType(triggerType);
    history.setOperator(LoginUser.getUser().getUid());
    history.setIllustrate("触发人:"+LoginUser.getUser().getUid());
    history.setStatus(Status.RUNNING);
    jobHistoryManager.addJobHistory(history);
    ExecuteKind kind=null;
    if(triggerType==TriggerType.MANUAL){
      kind=ExecuteKind.ManualKind;
    }else if(triggerType==TriggerType.MANUAL_RECOVER){
      kind=ExecuteKind.ScheduleKind;
    }
    try {
      worker.executeJobFromWeb(kind, history.getId());
    } catch (Exception e) {
      log.error("error",e);
      throw new GwtException(e.getMessage());
    }
  }
View Full Code Here

  }
  @Override
  public void cancel(String historyId) throws GwtException {
    JobHistory history=jobHistoryManager.findJobHistory(historyId);
    if(!permissionManager.hasJobPermission(LoginUser.getUser().getUid(), history.getJobId())){
      throw new GwtException("你没有权限执行该操作");
    }
    ExecuteKind kind=null;
    if(history.getTriggerType()==TriggerType.MANUAL){
      kind=ExecuteKind.ManualKind;
    }else{
      kind=ExecuteKind.ScheduleKind;
    }
    try {
      worker.cancelJobFromWeb(kind, historyId,LoginUser.getUser().getUid());
    } catch (Exception e) {
      log.error("error",e);
      throw new GwtException(e.getMessage());
    }
  }
View Full Code Here

  public void deleteJob(String jobId) throws GwtException {
    try {
      permissionGroupManager.deleteJob(LoginUser.getUser().getUid(), jobId);
    } catch (ZeusException e) {
      log.error("删除Job失败",e);
      throw new GwtException(e.getMessage());
    }
  }
View Full Code Here

  @Override
  public void addJobAdmin(String jobId, String uid) throws GwtException {
    try {
      permissionGroupManager.addJobAdmin(LoginUser.getUser().getUid(),uid, jobId);
    } catch (ZeusException e) {
      throw new GwtException(e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of com.taobao.zeus.web.platform.client.util.GwtException

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.