Package com.sogou.qadev.service.cynthia.bean

Examples of com.sogou.qadev.service.cynthia.bean.Flow


    }
    Template template = queryTemplate(data.getTemplateId());
    if (template == null) {
      return false;
    }
    Flow flow = queryFlow(template.getFlowId());
    if (flow == null) {
      return false;
    }
    return checkUserPrivilege(data, action, template, flow);
  }
View Full Code Here


   
    Template template = queryTemplate(data.getTemplateId());
    if(template == null)
      return new Pair<ErrorCode, String>(ErrorCode.noSuchTemplateFail, null);
   
    Flow flow = queryFlow(template.getFlowId());
    if(flow == null)
      return new Pair<ErrorCode, String>(ErrorCode.noSuchTemplateFail, null);
   
    if ((newUUIDTable.containsKey(id) && !newUUIDTable.get(id))||(!this.isDataExist(id)))
      action = DataAccessAction.insert;
View Full Code Here

  }

  public synchronized Flow createFlow(String userName)
  {
    UUID flowId = DataAccessFactory.getInstance().newUUID("FLOW");
    Flow flow  = new FlowImpl(flowId);
    flow.setCreateUser(userName);
    return flow;
  }
View Full Code Here

    return FlowCache.getInstance().get(flowId);
  }
 
  public Stat queryStat(UUID statId , UUID flowId)
  {
    Flow flow = FlowCache.getInstance().get(flowId);
    return flow.getStat(statId);
  }
View Full Code Here

    return flow.getStat(statId);
  }
 
  public Action queryAction(UUID actionId ,UUID flowId)
  {
    Flow flow = FlowCache.getInstance().get(flowId);
    return flow.getAction(actionId);
  }
View Full Code Here

    return flow.getAction(actionId);
  }
 
  public Role queryRole(UUID roleId,UUID flowId)
  {
    Flow flow = FlowCache.getInstance().get(flowId);
    return flow.getRole(roleId);
  }
View Full Code Here

    Template template = das.queryTemplate(templateId);
    if (template == null) {
      return resultMap;
    }
   
    Flow flow = das.queryFlow(template.getFlowId());
    if (flow == null) {
      return resultMap;
    }
   
    Map<String, String> userMap = new LinkedHashMap<String, String>();
   
    //用于链接数据
    Map<String, String> userIdMap = new HashMap<String, String>();
   
    UUID roleId = DataAccessFactory.getInstance().createUUID(roleIdStr);
   
    Set<Right> allRights = flow.queryRightsByRole(roleId);
    Set<String> userSet = new HashSet<String>();
    for (Right right : allRights) {
      if (right != null) {
        userSet.add(right.getUsername());
      }
View Full Code Here

  public Flow[] queryFlows(UUID[] flowIdArray)
  {
    List<Flow> list = new ArrayList<Flow>();
    for (UUID id : flowIdArray)
    {
      Flow flow = FlowCache.getInstance().get(id);
      if (flow != null)
        list.add(flow);
    }

    return list.toArray(new Flow[list.size()]);
View Full Code Here

  {
    Template template = das.queryTemplate(data.getTemplateId());
    if(template == null)
      return null;
   
    Flow flow = das.queryFlow(template.getFlowId());
    if(flow == null)
      return null;
   
    Action action = null;
    if(data.getObject("logActionId") != null)
    {
      action = flow.getAction((UUID)data.getObject("logActionId"));
      if(action == null)
        return null;
    }
   
    StringBuffer sqlStrb = new StringBuffer();
    sqlStrb.append("SELECT * FROM script_new WHERE 1=1");
   
    sqlStrb.append(" AND (template_type_ids IS NULL");
    sqlStrb.append(" OR template_type_ids LIKE '%").append(template.getTemplateTypeId()).append("%')");
   
    sqlStrb.append(" AND (template_ids IS NULL");
    sqlStrb.append(" OR template_ids LIKE '%").append(template.getId()).append("%')");
   
    sqlStrb.append(" AND (flow_ids IS NULL");
    sqlStrb.append(" OR flow_ids LIKE '%").append(flow.getId()).append("%')");
   
    sqlStrb.append(" AND (end_stat_ids IS NULL");
    sqlStrb.append(" OR end_stat_ids LIKE '%").append(data.getStatusId()).append("%')");
   
    if(action == null)
View Full Code Here

    for(Template template : allTemplates){
      if(template == null || !template.getTemplateTypeId().equals(templateTypeId)){
        continue;
      }
     
      Flow flow = FlowCache.getInstance().get(template.getFlowId());
      if(flow == null){
        continue;
      }
     
      for(Stat stat : flow.getStats()){
        statSet.add(stat.getName());
      }
    }
    return statSet.toArray(new String[statSet.size()]);
  }
View Full Code Here

TOP

Related Classes of com.sogou.qadev.service.cynthia.bean.Flow

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.