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

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


      {
        fieldShowName = "action_id";
        if(task.getActionId() == null)
          fieldShowValue = "编辑";
       
        Action action = flow.getAction(task.getActionId());
        if(action != null)
          fieldShowValue = action.getName();
      }
      else if("action_user".equals( fieldName ) || "执行人".equals( fieldName )){
        fieldShowName = "action_user";
        fieldShowValue = task.getActionUser();
      }
View Full Code Here


    Flow flow = das.queryFlow(DataAccessFactory.getInstance().createUUID(flowId));
    if (flow == null) {
      return "";
    }
   
    Action action = flow.getAction(DataAccessFactory.getInstance().createUUID(actionId));
   
    Map<String, Object> roleMap = new HashMap<String, Object>();
    List<FlowField> allRoleList = new ArrayList<FlowController.FlowField>();
   
    Set<Action> allStartActions = flow.getStartActions();
View Full Code Here

      return null;
    } else if ("action_id".equals(fieldName) || "执行动作".equals(fieldName)) {
      if (task.getActionId() == null)
        return "编辑";

      Action action = das.queryAction(task.getActionId(),
          template.getFlowId());
      if (action != null)
        return action.getName();

      return null;
    } else if ("action_user".equals(fieldName) || "执行人".equals(fieldName))
      return task.getActionUser();
    else if ("action_comment".equals(fieldName) || "执行描述".equals(fieldName))
View Full Code Here

      if (task.getActionId() == null)
        return "编辑";
      Template template = TemplateCache.getInstance().get(
          task.getTemplateId());

      Action action = das.queryAction(task.getActionId(),
          template.getFlowId());
      if (action != null)
        return action.getName();

      return null;
    } else if ("action_user".equals(fieldName) || "执行人".equals(fieldName))
      return task.getActionUser();
    else if ("action_comment".equals(fieldName) || "执行描述".equals(fieldName))
View Full Code Here

   
    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)
      sqlStrb.append(" AND action_ids IS NULL");
    else
   
      sqlStrb.append(" AND (action_ids IS NULL");
      sqlStrb.append(" OR action_ids LIKE '%").append(action.getId()).append("%')");
    }
   
    if(executeTime.equals(ExecuteTime.beforeCommit))
      sqlStrb.append(" AND is_before_commit IS TRUE");
    if(executeTime.equals(ExecuteTime.afterSuccess))
View Full Code Here

   * @return
   * @see com.sogou.qadev.service.cynthia.service.ScriptAccessSession#queryScripts(com.sogou.qadev.service.cynthia.bean.Data, com.sogou.qadev.service.cynthia.bean.ExecuteTime, com.sogou.qadev.service.cynthia.service.DataAccessSession, com.sogou.qadev.service.cynthia.bean.Template, com.sogou.qadev.service.cynthia.bean.Flow)
   */
  @Override
  public Script[] queryScripts(Data data, ExecuteTime executeTime, DataAccessSession das , Template template , Flow flow) {
    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)
      sqlStrb.append(" AND action_ids IS NULL");
    else
   
      sqlStrb.append(" AND (action_ids IS NULL");
      sqlStrb.append(" OR action_ids LIKE '%").append(action.getId()).append("%')");
    }
   
    if(executeTime.equals(ExecuteTime.beforeCommit))
      sqlStrb.append(" AND is_before_commit IS TRUE");
    if(executeTime.equals(ExecuteTime.afterSuccess))
View Full Code Here

    for(ActionRole actionRole : this.actionRoleSet)
    {
      if(!actionRole.roleId.equals(Role.everyoneUUID))
        continue;

      Action action = this.actionMap.get(actionRole.actionId);
      if(action != null)
        actionSet.add(action);
    }

    return actionSet.toArray(new Action[0]);
View Full Code Here

  public Action[] queryRoleActions(UUID roleId){
    Set<Action> actionSet = new HashSet<Action>();

    for(ActionRole actionRole : this.actionRoleSet){
      if(actionRole.roleId.equals(roleId)){
        Action action = this.actionMap.get(actionRole.actionId);
        if(action != null){
          actionSet.add(action);
        }
      }
    }
View Full Code Here

TOP

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

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.