Package freemarker.template

Examples of freemarker.template.DefaultObjectWrapper


    {
      parser.parse(new InputSource (new FileReader (getSchemaFile())));
      Configuration cfg = new Configuration ();
      cfg.setDirectoryForTemplateLoading(new File (getTemplateDirectory ()));
      cfg.setStrictSyntaxMode(true);
      cfg.setObjectWrapper(new DefaultObjectWrapper ());

      Map<String, String> workset = new HashMap<String, String> ();
      workset.put ("valueObject.ftl", "valueObject");
      workset.put ("interface.ftl", "interface");
      workset.put ("interfaceAsync.ftl", "interface");
View Full Code Here


         }
      }
      loaders.add(new ClassTemplateLoader(loaderConfig.getLoaderClass(), loaderConfig.getBasePath()));
      config = new Configuration();
      config.setTemplateLoader(new MultiTemplateLoader(loaders.toArray(new TemplateLoader[0])));
      config.setObjectWrapper(new DefaultObjectWrapper());
   }
View Full Code Here

                log("\t" + key + " - " + data.get(key));
            }
        }
        try {
            Configuration cfg = new Configuration();
            cfg.setObjectWrapper( new DefaultObjectWrapper() );
            cfg.setTemplateUpdateDelay( 0 );
           
            Template temp = new Template( name,
                    new InputStreamReader( GuvnorJRClusterConfigAntTask.class.getResourceAsStream( "/jrcluster/templates/repository/" + name ) ),
                    cfg );
View Full Code Here

     */
    public String processTemplate(String name,
                                  Map<String, Object> data) {
        try {
            Configuration configuration = new Configuration();
            configuration.setObjectWrapper( new DefaultObjectWrapper() );
            configuration.setTemplateUpdateDelay( 0 );

            Template template = new Template( name,
                                              new InputStreamReader( ServiceImplementation.class.getResourceAsStream( "/repoconfig/" + name + ".xml" ) ),
                                              configuration );
View Full Code Here

     */
    public String processTemplate(String name,
                                  Map<String, Object> data) {
        try {
            Configuration configuration = new Configuration();
            configuration.setObjectWrapper( new DefaultObjectWrapper() );
            configuration.setTemplateUpdateDelay( 0 );

            Template template = new Template( name,
                                              new InputStreamReader( ServiceImplementation.class.getResourceAsStream( "/repoconfig/" + name + ".xml" ) ),
                                              configuration );
View Full Code Here

     */
    public String processTemplate(String name,
                                  Map<String, Object> data) {
        try {
            Configuration cfg = new Configuration();
            cfg.setObjectWrapper( new DefaultObjectWrapper() );
            cfg.setTemplateUpdateDelay( 0 );

            Template temp = new Template( name,
                                          new InputStreamReader( ServiceImplementation.class.getResourceAsStream( "/repoconfig/" + name + ".xml" ) ),
                                          cfg );
View Full Code Here

     * Load and process the repository configuration templates.
     */
    public String processTemplate(String name, Map<String, Object> data) {
        try {
            Configuration cfg = new Configuration();
            cfg.setObjectWrapper( new DefaultObjectWrapper() );
            cfg.setTemplateUpdateDelay( 0 );

            Template temp = new Template( name, new InputStreamReader( ServiceImplementation.class.getResourceAsStream( "/repoconfig/" + name + ".xml" ) ), cfg );
            StringWriter strw = new StringWriter();
            temp.process( data, strw );
View Full Code Here

     */
    private TemplateFactory()
    {
        this.cfg = new Configuration();
        this.cfg.setClassForTemplateLoading(Main.class, "templates");
        this.cfg.setObjectWrapper(new DefaultObjectWrapper());
        this.cfg.setDefaultEncoding("UTF-8");
        this.cfg.setSharedVariable("message", new MessageDirective());
        this.cfg.setTagSyntax(Configuration.SQUARE_BRACKET_TAG_SYNTAX);
    }
View Full Code Here

  public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
    final TypeElement element = processingEnv.getElementUtils().getTypeElement(Entity.class.getName());
    if (annotations.contains(element)) {
      try {
        Configuration cfg = new Configuration();
        cfg.setObjectWrapper(new DefaultObjectWrapper());
        cfg.setTemplateLoader(new ClassTemplateLoader(getClass(), "/templates"));
        Template template = cfg.getTemplate("criteria.ftl");
        for (TypeElement typeElement : ElementFilter.typesIn(roundEnv.getElementsAnnotatedWith(Entity.class))) {
          generate(template, typeElement);
        }
View Full Code Here

   @Command("new-view")
   public void newView(final PipeOut out, @Option(name = "target") final Resource<?> target)
   {
      Configuration freemarkerConfig = new Configuration();
      freemarkerConfig.setClassForTemplateLoading(getClass(), "/");
      freemarkerConfig.setObjectWrapper(new DefaultObjectWrapper());
      Map<Object, Object> map = new HashMap<Object, Object>();

      Writer output = new StringWriter();
      try
      {
View Full Code Here

TOP

Related Classes of freemarker.template.DefaultObjectWrapper

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.