Examples of VersionGenerator


Examples of br.com.caelum.tubaina.util.VersionGenerator

  public StringBuffer generateTOC(final Book b, final Configuration cfg, final List<String> dirTree) {
    Map<String, Object> map = new HashMap<String, Object>();
    map.put("name", b.getName());
    map.put("chapters", b.getChapters());
    map.put("dirTree", dirTree);
    map.put("textbookVersion", new VersionGenerator().generate());
    map.put("sanitizer", new HtmlSanitizer());

    return new FreemarkerProcessor(cfg).process(map, "html/toc.ftl");
  }
View Full Code Here

Examples of br.com.caelum.tubaina.util.VersionGenerator

  public StringBuffer generateLatex(final Book book, final Configuration cfg) {
    Map<String, Object> map = new HashMap<String, Object>();
    map.put("book", book);
    map.put("parser", parser);
    map.put("textbookVersion", new VersionGenerator().generate());

    FreemarkerProcessor processor = new FreemarkerProcessor(cfg);
    return processor.process(map, "latex/book.ftl");
  }
View Full Code Here

Examples of br.com.caelum.tubaina.util.VersionGenerator

    for (String string : ifdefs) {
            map.put(string, true);
        }
    map.put("book", book);
    map.put("parser", parser);
    map.put("textbookVersion", new VersionGenerator().generate());

    FreemarkerProcessor processor = new FreemarkerProcessor(cfg);
    return processor.process(map, "latex/book.ftl");
  }
View Full Code Here

Examples of br.com.caelum.tubaina.util.VersionGenerator

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("parser", parser);
    map.put("book", b);
    map.put("chapters", b.getChapters());
    map.put("dirTree", dirTree);
    map.put("textbookVersion", new VersionGenerator().generate());
    map.put("sanitizer", new HtmlSanitizer());

    return new FreemarkerProcessor(cfg).process(map, "toc.ftl");
  }
View Full Code Here

Examples of org.infinispan.container.versioning.VersionGenerator

        return metadata.build();
    }

    protected EntryVersion generateVersion(Cache<?, ?> cache) {
        ComponentRegistry registry = cache.getAdvancedCache().getComponentRegistry();
        VersionGenerator versionGenerator = registry.getComponent(VersionGenerator.class);
        if (versionGenerator == null) {
           VersionGenerator newVersionGenerator = new NumericVersionGenerator().clustered(registry.getComponent(RpcManager.class) != null);
           registry.registerComponent(newVersionGenerator, VersionGenerator.class);
           return newVersionGenerator.generateNew();
        } else {
           return versionGenerator.generateNew();
        }
     }
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.