public class SQLTemplateResourceManager
extends org.apache.velocity.runtime.resource.loader.ResourceLoader
implements org.apache.velocity.runtime.resource.ResourceManager
Modifier and Type | Field and Description |
---|---|
protected Map<String,org.apache.velocity.Template> |
templateCache |
Constructor and Description |
---|
SQLTemplateResourceManager() |
Modifier and Type | Method and Description |
---|---|
void |
clearCache() |
long |
getLastModified(org.apache.velocity.runtime.resource.Resource resource) |
String |
getLoaderNameForResource(String resourceName) |
org.apache.velocity.runtime.resource.Resource |
getResource(String resourceName,
int resourceType,
String encoding)
Returns a Velocity Resource which is a Template for the given SQL.
|
InputStream |
getResourceStream(String source) |
void |
init(org.apache.commons.collections.ExtendedProperties configuration) |
void |
initialize(org.apache.velocity.runtime.RuntimeServices rs) |
boolean |
isSourceModified(org.apache.velocity.runtime.resource.Resource resource) |
public void initialize(org.apache.velocity.runtime.RuntimeServices rs) throws Exception
initialize
in interface org.apache.velocity.runtime.resource.ResourceManager
Exception
public void clearCache()
public org.apache.velocity.runtime.resource.Resource getResource(String resourceName, int resourceType, String encoding) throws org.apache.velocity.exception.ResourceNotFoundException, org.apache.velocity.exception.ParseErrorException, Exception
getResource
in interface org.apache.velocity.runtime.resource.ResourceManager
org.apache.velocity.exception.ResourceNotFoundException
org.apache.velocity.exception.ParseErrorException
Exception
public String getLoaderNameForResource(String resourceName)
getLoaderNameForResource
in interface org.apache.velocity.runtime.resource.ResourceManager
public long getLastModified(org.apache.velocity.runtime.resource.Resource resource)
getLastModified
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
public InputStream getResourceStream(String source) throws org.apache.velocity.exception.ResourceNotFoundException
getResourceStream
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
org.apache.velocity.exception.ResourceNotFoundException
public void init(org.apache.commons.collections.ExtendedProperties configuration)
init
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
public boolean isSourceModified(org.apache.velocity.runtime.resource.Resource resource)
isSourceModified
in class org.apache.velocity.runtime.resource.loader.ResourceLoader
Copyright © 2001–2015 Apache Cayenne. All rights reserved.