Examples of TemplateType


Examples of com.google.gxp.compiler.base.TemplateType

  protected NativeType nativeType(SourcePosition pos, String type) {
    return new NativeType(pos, "NativeType", new MultiLanguageAttrValue(type));
  }

  protected TemplateType templateType(SourcePosition pos, String dottedName) {
    return new TemplateType(pos, "TemplateType", fqTemplateName(dottedName));
  }
View Full Code Here

Examples of com.google.gxp.compiler.base.TemplateType

    TemplateName name = fqTemplateName(dottedName);
    List<Parameter> params = Lists.newArrayList(parameters);
    params.add(new Parameter(new FormalParameter(pos,
                                                 Implementable.INSTANCE_PARAM_NAME,
                                                 Implementable.INSTANCE_PARAM_NAME,
                                                 new TemplateType(pos, name.toString(), name))));

    return new Interface(pos, "<gxp:interface>", fqTemplateName(dottedName),
                         schema, Collections.<JavaAnnotation>emptyList(), imports,
                         throwsDeclarations, params, formalTypeParameters);
  }
View Full Code Here

Examples of com.google.gxp.compiler.base.TemplateType

      // add a "this" parameter to the list of Parameters
      List<Parameter> parameters = Lists.newArrayList(nodeParts.getParameters());
      FormalParameter formal = new FormalParameter(node.getSourcePosition(),
                                                   Implementable.INSTANCE_PARAM_NAME,
                                                   Implementable.INSTANCE_PARAM_NAME,
                                                   new TemplateType(node.getSourcePosition(),
                                                                    name.toString(), name));
      parameters.add(new Parameter(formal));

      List<JavaAnnotation> javaAnnotations =
          getJavaAnnotations(node, JavaAnnotation.Element.INTERFACE);
View Full Code Here

Examples of com.google.gxp.compiler.base.TemplateType

      // add a "this" parameter to the list of Parameters
      List<Parameter> parameters = Lists.newArrayList(nodeParts.getParameters());
      FormalParameter formal = new FormalParameter(node.getSourcePosition(),
                                                   Implementable.INSTANCE_PARAM_NAME,
                                                   Implementable.INSTANCE_PARAM_NAME,
                                                   new TemplateType(node.getSourcePosition(),
                                                                    name.toString(), name));
      parameters.add(new Parameter(formal));

      List<JavaAnnotation> javaAnnotations =
          getJavaAnnotations(node, JavaAnnotation.Element.INTERFACE);
View Full Code Here

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

    return null  ;
  }
 
  public TemplateType queryTemplateType(UUID templateTypeId)
  {
    TemplateType templateType = TemplateTypeCache.getInstance().get(templateTypeId);

    if (templateType != null)
      return templateType;

    return null;
View Full Code Here

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

  public TemplateType[] queryTemplateTypes(UUID[] templateTypeIdArray)
  {
    List<TemplateType> list = new ArrayList<TemplateType>();
    for (UUID id : templateTypeIdArray)
    {
      TemplateType templateType = TemplateTypeCache.getInstance().get(id);
      if (templateType != null)
        list.add(templateType);
    }

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

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

      }else {
        return null;
      }
    }
    else{
      TemplateType type = new TemplateTypeAccessSessionMySQL().queryTemplateTypeById(DataAccessFactory.getInstance().createUUID(id));
      if (type != null) {
        EhcacheHandler.getInstance().set(EhcacheHandler.FOREVER_CACHE,type.getId().getValue(), type);
      }
      return type;
    }
  }
View Full Code Here

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

      conn = DbPoolConnection.getInstance().getReadConnection();
      String sql = "select * from template_type where id = ?";
      pstm = conn.prepareStatement(sql);
      pstm.setInt(1, Integer.parseInt(templateTypeId.getValue()));
      rs = pstm.executeQuery();
      TemplateType templateType = null;
      if(rs.next())
      {
        templateType = new TemplateTypeImpl();
        templateType.setId(DataAccessFactory.getInstance().createUUID(Integer.toString(rs.getInt("id"))));
        templateType.setName(rs.getString("name"));
        templateType.setDisplayIndex(rs.getInt("displayIndex"));
      }
      return templateType;
    }catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

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

      String sql = "select * from template_type";
      pstm = conn.prepareStatement(sql);
      rs = pstm.executeQuery();
      while(rs.next())
      {
        TemplateType templateType = new TemplateTypeImpl();
        templateType.setId(DataAccessFactory.getInstance().createUUID(Integer.toString(rs.getInt("id"))));
        templateType.setName(rs.getString("name"));
        templateType.setDisplayIndex(rs.getInt("displayIndex"));
        templateTypeList.add(templateType);
      }
    }catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

Examples of org.apache.tuscany.generate.TemplateType

           
            List templateList = generateType.getTemplate();

            // For each velocity template in the template list pass in the XSD file list
            for ( Object item: templateList){
              TemplateType template = (TemplateType)item;
                context.put("template", template);
              String tmp = template.getTemplateName();
              String filename = projectBuildDir + "/" + template.getTemplateTargetDir() + "/" + tmp.substring(0,tmp.length() - 3);
              File f = new File(filename);
              // Create folders since the package doesn't exist before the code-gen for the 1st time
              f.getParentFile().mkdirs();
                FileWriter fw = new FileWriter(f);
              System.out.println(">> Processing " + template.getTemplateName() + " to " + filename);
                Velocity.mergeTemplate(template.getTemplateName(), context, fw );
                fw.flush();
                fw.close();
            }

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.