| org.apache.velocity.runtime.resource.ResourceManager
All known Subclasses: org.apache.velocity.runtime.resource.ResourceManagerImpl,
ResourceManager | public interface ResourceManager (Code) | | Class to manage the text resource for the Velocity
Runtime.
author: Jason van Zyl author: Paulo Gaspar author: Geir Magnusson Jr. version: $Id: ResourceManager.java 463298 2006-10-12 16:10:32Z henning $ |
RESOURCE_CONTENT | final public static int RESOURCE_CONTENT(Code) | | A static content resource.
|
RESOURCE_TEMPLATE | final public static int RESOURCE_TEMPLATE(Code) | | A template resources.
|
getLoaderNameForResource | public String getLoaderNameForResource(String resourceName)(Code) | | Determines is a template exists, and returns name of the loader that
provides it. This is a slightly less hokey way to support
the Velocity.templateExists() utility method, which was broken
when per-template encoding was introduced. We can revisit this.
Parameters: resourceName - Name of template or content resource class name of loader than can provide it |
getResource | public Resource getResource(String resourceName, int resourceType, String encoding) throws ResourceNotFoundException, ParseErrorException, Exception(Code) | | Gets the named resource. Returned class type corresponds to specified type
(i.e. Template to RESOURCE_TEMPLATE ).
Parameters: resourceName - The name of the resource to retrieve. Parameters: resourceType - The type of resource (RESOURCE_TEMPLATE ,RESOURCE_CONTENT , etc.). Parameters: encoding - The character encoding to use. Resource with the template parsed and ready. throws: ResourceNotFoundException - if template not foundfrom any available source. throws: ParseErrorException - if template cannot be parsed dueto syntax (or other) error. throws: Exception - if a problem in parse |
|
|