Package org.jboss.forge.addon.templates

Examples of org.jboss.forge.addon.templates.TemplateProcessor.process()


      map.put("orderClause", orderClause);
      map.put("resourcePath", resourcePath);

      Resource<URL> templateResource = resourceFactory.create(getClass().getResource("Endpoint.jv"));
      TemplateProcessor processor = processorFactory.fromTemplate(new FreemarkerTemplate(templateResource));
      String output = processor.process(map);
      JavaClass resource = JavaParser.parse(JavaClass.class, output);
      resource.addImport(entity.getQualifiedName());
      resource.setPackage(context.getTargetPackageName());
      return Arrays.asList(resource);
   }
View Full Code Here


      map.put("orderClause", orderClause);
      map.put("resourcePath", resourcePath);

      Resource<URL> templateResource = resourceFactory.create(getClass().getResource("EndpointWithDTO.jv"));
      TemplateProcessor processor = processorFactory.fromTemplate(templateResource);
      String output = processor.process(map);
      JavaClass resource = JavaParser.parse(JavaClass.class, output);
      resource.addImport(rootDto.getQualifiedName());
      resource.addImport(entity.getQualifiedName());
      resource.setPackage(context.getTargetPackageName());
      result.add(resource);
View Full Code Here

      map.put("orderClause", orderClause);
      map.put("resourcePath", resourcePath);

      Resource<URL> templateResource = resourceFactory.create(getClass().getResource("Endpoint.jv"));
      TemplateProcessor processor = processorFactory.fromTemplate(templateResource);
      String output = processor.process(map);
      JavaClass resource = JavaParser.parse(JavaClass.class, output);
      resource.addImport(entity.getQualifiedName());
      resource.setPackage(context.getTargetPackageName());
      return Arrays.asList(resource);
   }
View Full Code Here

      map.put("orderClause", orderClause);
      map.put("resourcePath", resourcePath);

      Resource<URL> templateResource = resourceFactory.create(getClass().getResource("EndpointWithDTO.jv"));
      TemplateProcessor processor = processorFactory.fromTemplate(templateResource);
      String output = processor.process(map);
      JavaClass resource = JavaParser.parse(JavaClass.class, output);
      resource.addImport(rootDto.getQualifiedName());
      resource.addImport(entity.getQualifiedName());
      resource.setPackage(context.getTargetPackageName());
      result.add(resource);
View Full Code Here

      map.put("orderClause", orderClause);
      map.put("resourcePath", resourcePath);

      Resource<URL> templateResource = resourceFactory.create(getClass().getResource("Endpoint.jv"));
      TemplateProcessor processor = processorFactory.fromTemplate(templateResource);
      String output = processor.process(map);
      JavaClass resource = JavaParser.parse(JavaClass.class, output);
      resource.addImport(entity.getQualifiedName());
      resource.setPackage(context.getTargetPackageName());
      return Arrays.asList(resource);
   }
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.