Package jetbrick.template.utils.finder

Examples of jetbrick.template.utils.finder.TemplateFileFinder


        config.load(JetConfig.COMPILE_STRATEGY, "always");
        config.load(JetConfig.COMPILE_DEBUG, "false");

        JetEngine engine = new JetEngine(config);

        TemplateFileFinder finder = new TemplateFileFinder(config.getTemplateSuffix());
        finder.lookupFileSystem(new File(sourcePath), true);
        List<String> resources = finder.getResources();

        System.out.println("Find " + resources.size() + " templates to precompile ...");
        int succ = 0;
        int fail = 0;
        long ts = System.currentTimeMillis();
View Full Code Here


            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

        TemplateFileFinder finder = new TemplateFileFinder(suffix);
        finder.lookupFileSystem(dir, true);
        return finder.getResources();
    }
View Full Code Here

        return new JarResource(name, jarFile, fileEntry, encoding);
    }

    @Override
    public List<String> loadAll() {
        TemplateFileFinder finder = new TemplateFileFinder(suffix);
        finder.lookupZipFile(jarFile, entryName, true);
        return finder.getResources();
    }
View Full Code Here

        return new FileSystemResource(name, file, encoding);
    }

    @Override
    public List<String> loadAll() {
        TemplateFileFinder finder = new TemplateFileFinder(suffix);
        finder.lookupFileSystem(new File(basepath), true);
        return finder.getResources();
    }
View Full Code Here

        String[] packageNames = null;
        if (basepath.length() > 1) {
            packageNames = new String[] { basepath.substring(1).replace('/', '.') };
        }

        TemplateFileFinder finder = new TemplateFileFinder(suffix);
        finder.lookupClasspath(packageNames, true);
        return finder.getResources();
    }
View Full Code Here

TOP

Related Classes of jetbrick.template.utils.finder.TemplateFileFinder

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.