T
- the source of the template path (e.g. File, String,...)public abstract class PathTemplateLocator<T> extends AbstractTemplateLocator
Modifier and Type | Field and Description |
---|---|
static ConfigurationKey |
VIRTUAL_PATH_SEPARATOR_KEY
Virtual path separator
|
configuration
DEFAULT_PRIORITY
Constructor and Description |
---|
PathTemplateLocator(int priority,
String rootPath) |
PathTemplateLocator(int priority,
String rootPath,
String suffix) |
Modifier and Type | Method and Description |
---|---|
protected String |
addSuffix(String filename) |
protected abstract String |
constructVirtualPath(T source) |
Set<ConfigurationKey> |
getConfigurationKeys() |
protected String |
getDefaultFileEncoding() |
protected String |
getRealPathSeparator() |
String |
getRootPath() |
String |
getSuffix() |
protected String |
getVirtualPathSeparator() |
void |
init()
Can be overridden so that there's no need to call
super.init(Configuration) . |
protected String |
stripSuffix(String filename) |
protected String |
toRealPath(String virtualPath) |
String |
toString() |
getPriority
checkNotInitialized, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAllIdentifiers, locate
init
public static final ConfigurationKey VIRTUAL_PATH_SEPARATOR_KEY
public PathTemplateLocator(int priority, String rootPath)
priority
- rootPath
- public void init()
AbstractConfigurationAware
super.init(Configuration)
.init
in class AbstractConfigurationAware
public Set<ConfigurationKey> getConfigurationKeys()
public String getSuffix()
public String getRootPath()
protected String getRealPathSeparator()
protected String getVirtualPathSeparator()
protected String getDefaultFileEncoding()
protected abstract String constructVirtualPath(T source)
source
- protected String toRealPath(String virtualPath)
virtualPath
- Copyright © 2017. All rights reserved.