public abstract class FilePathTemplateLocator extends PathTemplateLocator<File>
VIRTUAL_PATH_SEPARATOR_KEY
configuration
DEFAULT_PRIORITY
Constructor and Description |
---|
FilePathTemplateLocator(int priority,
String rootPath) |
FilePathTemplateLocator(int priority,
String rootPath,
String suffix) |
Modifier and Type | Method and Description |
---|---|
protected String |
constructVirtualPath(File source) |
Set<String> |
getAllIdentifiers()
This method should return an empty set if it's not possible to collect the names/identifiers.
|
protected abstract File |
getRootDir() |
protected void |
checkRootDir() |
Reader |
locate(String filePath)
The reader is always closed by the engine right after the template source is read.
|
protected abstract Reader |
locateRealPath(String realPath) |
addSuffix, getConfigurationKeys, getDefaultFileEncoding, getRealPathSeparator, getRootPath, getSuffix, getVirtualPathSeparator, init, stripSuffix, toRealPath, toString
getPriority
checkNotInitialized, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
init
public FilePathTemplateLocator(int priority, String rootPath)
priority
- rootPath
- public Reader locate(String filePath)
TemplateLocator
filePath
- The template identifiernull
if no available template with the given name
existsMustache.getName()
public Set<String> getAllIdentifiers()
TemplateLocator
EngineConfigurationKey.PRECOMPILE_ALL_TEMPLATES
protected String constructVirtualPath(File source)
constructVirtualPath
in class PathTemplateLocator<File>
protected abstract File getRootDir()
PathTemplateLocator.getRootPath()
protected abstract Reader locateRealPath(String realPath)
realPath
- protected void checkRootDir()
Copyright © 2017. All rights reserved.