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

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


    }
   
    List<UUID> newFlowIds = new ArrayList<UUID>();
    for(UUID tempId : newTemplateIds)
    {
      Template template = das.queryTemplate(tempId);
      if(template!=null)
        newFlowIds.add(template.getFlowId());
    }
    Template removedTemplate = das.queryTemplate(DataAccessFactory.getInstance().createUUID(templateId));
    if(!newFlowIds.contains(removedTemplate.getFlowId()))
    {
      Flow removedFlow = das.queryFlow(removedTemplate.getFlowId());
      Stat[] removedFlowStats = removedFlow.getStats();
      for(Stat stat : removedFlowStats)
      {
        if(oldStatIdsList.contains(stat.getId()))
          oldStatIdsList.remove(stat.getId());
View Full Code Here


   
    UUID templateId = DataAccessFactory.getInstance().createUUID(templateIdStr);
   
    Script[] templateScripts = das.queryTemplateScripts(templateId);
    Script[] allowedScripts  = das.queryAllowedTemplateScripts(templateId);
    Template template            = das.queryTemplate(templateId);
    Flow flow                  = das.queryFlow(template.getFlowId());
    Stat[] stats                 = flow.getStats();
    Action [] actions            = flow.getActions();
   
    StringBuffer xml = new StringBuffer(this.baseXml);
    xml.append("<root>");
    xml.append("<template>");
    xml.append("<id>").append(template.getId()).append("</id>");
    xml.append("<name>").append(XMLUtil.toSafeXMLString(template.getName())).append("</name>");
    xml.append("<stats>");
    for(Stat stat : stats)
    {
      xml.append("<stat>");
      xml.append("<id>").append(stat.getId()).append("</id>");
View Full Code Here

       bugData = das.queryData(id)
       if(bugData!=null){
        if (allTemplateMap.get(bugData.getTemplateId()) == null) {
          allTemplateMap.put(bugData.getTemplateId(), das.queryTemplate(bugData.getTemplateId()));
        }
        Template template = allTemplateMap.get(bugData.getTemplateId());
        if(template!=null)
          bugTemplateMap.put(template.getId().toString(), template);
       }
      }
    }
    JSONArray jsonArray = JSONArray.fromObject(bugTemplateMap);
    return jsonArray.toString();
View Full Code Here

   * @throws Exception
   */
  @ResponseBody
  @RequestMapping("/getTemplateFields.do")
  public String getTemplateFields(@RequestParam("templateId") String templateId) throws Exception {
    Template template = das.queryTemplate(DataAccessFactory.getInstance().createUUID(templateId));
    Set<Field> fields = template.getFields();
    JSONArray json = JSONArray.fromObject(fields)
    return json.toString();
  }
View Full Code Here

   * @throws Exception
   */
  @ResponseBody
  @RequestMapping("/getTemplateStats.do")
  public String getTemplateStats(@RequestParam("templateId") String templateId) throws Exception {
    Template template = das.queryTemplate(DataAccessFactory.getInstance().createUUID(templateId));
    Flow flow = das.queryFlow(template.getFlowId());
    Stat[] stats = flow.getStats();
    JSONArray json = JSONArray.fromObject(stats);
    return json.toString();
  }
View Full Code Here

          if (!showFieldId.contains(fieldId)) {
            backList.add(new FilterField(fieldId, baseFieldNameMap.get(fieldId)));
          }
        }
       
        Template template = das.queryTemplate(templateId);
       
        Set<Field> templateFields = template.getFields();
       
        for(Field field : templateFields)
        {
          if (!showFieldId.contains(field.getId().getValue())) {
            backList.add(new FilterField("FIEL-" + field.getId().getValue(), field.getName()));
View Full Code Here

    Map<String,String> mountTemplatesMap = new HashMap<String,String>();
    if(templateIds!=null)
    { 
      for(UUID templateId : templateIds)
      {
        Template template = das.queryTemplate(templateId);
        if(template!=null)
          mountTemplatesMap.put(templateId.toString(), template.getName());
      }
    }
    Map<String,String> allTemplateMap = new HashMap<String,String>();
    Template[] allTemplates = das.queryAllTemplates();
    if(allTemplates!=null)
    {
      for(Template template: allTemplates)
      {
        allTemplateMap.put(template.getId().toString(), template.getName());
      }
    }
    scriptVO.setAllTemplates(allTemplateMap);
    scriptVO.setMountTemplates(mountTemplatesMap);
   
View Full Code Here

  @RequestMapping("/initTemplateActionAndStat.do")
  @ResponseBody
  public String initTemplateActionAndStat(@RequestParam("templateId") String templateId, @RequestParam("scriptId") String scriptId) throws Exception {
    StringBuffer result = new StringBuffer(this.baseXml);
   
    Template template = das.queryTemplate(DataAccessFactory.getInstance().createUUID(templateId));
    Flow flow       = das.queryFlow(template.getFlowId());
    Script script     = null;
    UUID[] actionIds  = null;
    UUID[] endStatIds = null;
    if(scriptId!=null&&!"".equals(scriptId))
    {
View Full Code Here

  @RequestMapping("/initTemplateRightUser.do")
  public String initTemplateRightUser(@RequestParam("templateId") String templateId, HttpSession httpSession) throws Exception {
    if (templateId == null || templateId.length() == 0) {
      return "";
    }else {
      Template template = das.queryTemplate(DataAccessFactory.getInstance().createUUID(templateId));
      if (template == null) {
        return "";
      }
      Flow flow = das.queryFlow(template.getFlowId());
      List<UserInfo> allUserInfoList = new ArrayList<UserInfo>();
     
      UserInfo ui = new UserInfo();
      ui.setUserName("*");
      ui.setNickName("所有人");
 
View Full Code Here

    String userMail = key.getUsername();
   
    Map<String, String> temMap = das.queryUserTemplateRights(userMail);
    Set<String> flowSet = new HashSet<String>();
    for (String templateId : temMap.keySet()) {
      Template template = das.queryTemplate(DataAccessFactory.getInstance().createUUID(templateId));
      if (template != null) {
        flowSet.add(template.getFlowId().getValue());
      }
    }
   
    //自己创建的表单具有编辑权限
    for (Flow flow : das.queryAllFlows()) {
View Full Code Here

TOP

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

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.