Package org.jboss.seam.render.template

Examples of org.jboss.seam.render.template.CompiledTemplateResource.render()


         map.put("idType", idType);
         map.put("setIdStatement", idSetterName);
         map.put("contentType", contentType);
         map.put("entityTable", getEntityTable(entity));

         JavaClass endpoint = JavaParser.parse(JavaClass.class, template.render(map));
         endpoint.addImport(entity.getQualifiedName());
         endpoint.setPackage(java.getBasePackage() + ".rest");
         endpoint.getAnnotation(Path.class).setStringValue("/" + getEntityTable(entity).toLowerCase());

         /*
 
View Full Code Here


         map.put("contentType", contentType);
         String entityTable = getEntityTable(entity);
         map.put("entityTable", entityTable);
         map.put("resourcePath", entityTable.toLowerCase() + "s");

         JavaClass resource = JavaParser.parse(JavaClass.class, template.render(map));
         resource.addImport(entity.getQualifiedName());
         resource.setPackage(java.getBasePackage() + ".rest");

         /*
          * Save the sources
View Full Code Here

         map.put("contentType", contentType);
         String entityTable = getEntityTable(entity);
         map.put("entityTable", entityTable);
         map.put("resourcePath", entityTable.toLowerCase() + "s");

         JavaClass resource = JavaParser.parse(JavaClass.class, template.render(map));
         resource.addImport(entity.getQualifiedName());
         resource.setPackage(java.getBasePackage() + ".rest");

         /*
          * Save the sources
View Full Code Here

      CompiledTemplateResource testSource = compiler.compileResource(getClass().getResourceAsStream(
               "/org/jboss/forge/dev/PluginTemplateTest.jv"));

      JavaResource pluginResource = java.saveJavaSource(JavaParser.parse(JavaClass.class, pluginSource.render(context))
               .setPackage(packg));
      java.saveTestJavaSource(JavaParser.parse(JavaClass.class, testSource.render(context)).setPackage(packg));

      pickup.fire(new PickupResource(pluginResource));
   }

   public String canonicalize(final String name)
View Full Code Here

         map.put("idType", idType);
         map.put("setIdStatement", idSetterName);
         map.put("contentType", contentType);
         map.put("entityTable", getEntityTable(entity));

         JavaClass endpoint = JavaParser.parse(JavaClass.class, template.render(map));
         endpoint.addImport(entity.getQualifiedName());
         endpoint.setPackage(java.getBasePackage() + ".rest");
         endpoint.getAnnotation(Path.class).setStringValue("/" + getEntityTable(entity).toLowerCase());

         /*
 
View Full Code Here

   {
      CompiledTemplateResource viewTemplate = compiler.get().compile(VIEW_TEMPLATE);
      if (!target.exists())
      {
         ((FileResource<?>) target).createNewFile();
         ((FileResource<?>) target).setContents(viewTemplate.render());
      }
      else if (prompt.promptBoolean("File exists. Overwrite with blank view?"))
      {
         ((FileResource<?>) target).setContents(viewTemplate.render());
      }
View Full Code Here

         ((FileResource<?>) target).createNewFile();
         ((FileResource<?>) target).setContents(viewTemplate.render());
      }
      else if (prompt.promptBoolean("File exists. Overwrite with blank view?"))
      {
         ((FileResource<?>) target).setContents(viewTemplate.render());
      }
      else
      {
         throw new RuntimeException("Aborted. File exists [" + target.getFullyQualifiedName() + "].");
      }
View Full Code Here

   {
      CompiledTemplateResource viewTemplate = compiler.get().compile(VIEW_TEMPLATE);
      if (!target.exists())
      {
         ((FileResource<?>) target).createNewFile();
         ((FileResource<?>) target).setContents(viewTemplate.render());
      }
      else if (prompt.promptBoolean("File exists. Overwrite with blank view?"))
      {
         ((FileResource<?>) target).setContents(viewTemplate.render());
      }
View Full Code Here

         ((FileResource<?>) target).createNewFile();
         ((FileResource<?>) target).setContents(viewTemplate.render());
      }
      else if (prompt.promptBoolean("File exists. Overwrite with blank view?"))
      {
         ((FileResource<?>) target).setContents(viewTemplate.render());
      }
      else
      {
         throw new RuntimeException("Aborted. File exists [" + target.getFullyQualifiedName() + "].");
      }
View Full Code Here

         map.put("idType", idType);
         map.put("setIdStatement", idSetterName);
         map.put("contentType", contentType);
         map.put("entityTable", getEntityTable(entity));

         JavaClass endpoint = JavaParser.parse(JavaClass.class, template.render(map));
         endpoint.addImport(entity.getQualifiedName());
         endpoint.setPackage(java.getBasePackage() + ".rest");
         endpoint.getAnnotation(Path.class).setStringValue("/" + getEntityTable(entity).toLowerCase());

         /*
 
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.