Package org.apache.velocity.runtime.resource.util

Examples of org.apache.velocity.runtime.resource.util.StringResourceRepositoryImpl


    String renderedTemplate = null;
    long s1 = System.currentTimeMillis();

    StringResourceRepository rep = StringResourceLoader.getRepository();
    if (rep == null) {
      rep = new StringResourceRepositoryImpl();
      StringResourceLoader.setRepository(StringResourceLoader.REPOSITORY_NAME_DEFAULT, rep);
    }
    rep.setEncoding(this.encoding);
    try {
View Full Code Here


            //create the velocity engine with an externalized resource template
            final VelocityEngine ve = new VelocityEngine(velocityProperties);
            //set our custom log adapter
            ve.setProperty("runtime.log.logsystem", new LogAdapter());
            //manage the repository and put our template in with a name
            StringResourceRepository repository = new StringResourceRepositoryImpl();
            repository.putStringResource(VIRTUAL_TEMPLATE_NAME, getTemplate(genCtx.getProject()));
            ve.setApplicationAttribute("JUnitGenerator", repository);

            //init the engine
            ve.init();
View Full Code Here

TOP

Related Classes of org.apache.velocity.runtime.resource.util.StringResourceRepositoryImpl

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.