|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Class to manage the text resource for the Velocity Runtime. *
Field Summary | |
---|---|
NVelocity.Runtime.Resource.ResourceCache |
globalCache
Object implementing ResourceCache to be our resource manager's Resource cache. |
int |
RESOURCE_CONTENT
A static content resource. |
int |
RESOURCE_TEMPLATE
A template resources. |
System.Collections.ArrayList |
resourceLoaders
The List of templateLoaders that the Runtime will use to locate the InputStream source of a template. |
NVelocity.Runtime.RuntimeServices | rsvc |
Constructor Summary | |
---|---|
ResourceManagerImpl() Initializes a new instance of the ResourceManagerImpl class. |
Method Summary | |
---|---|
string |
getLoaderNameForResource(string resourceName) 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. * |
NVelocity.Runtime.Resource.Resource |
getResource(string resourceName, int resourceType, string encoding) Gets the named resource. Returned class type corresponds to specified type (i.e. Templateto RESOURCE_TEMPLATE). * |
NVelocity.Runtime.Resource.Resource |
getResource(string resourceName, int resourceType) Gets the named resource. Returned class type corresponds to specified type (i.e. Templateto RESOURCE_TEMPLATE). * |
void |
initialize(NVelocity.Runtime.RuntimeServices rs) Initialize the ResourceManager. It is assumed that assembleSourceInitializers() has been called before this is run. |
NVelocity.Runtime.Resource.Resource |
loadResource(string resourceName, int resourceType, string encoding) Loads a resource from the current set of resource loaders |
void |
refreshResource(NVelocity.Runtime.Resource.Resource resource, string encoding) Takes an existing resource, and 'refreshes' it. This generally means that the source of the resource is checked for changes according to some cache/check algorithm and if the resource changed, then the resource data is reloaded and re-parsed. * |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Field Detail |
---|
protected internal NVelocity.Runtime.Resource.ResourceCache globalCache
Object implementing ResourceCache to be our resource manager's Resource cache.
public int RESOURCE_CONTENT
A static content resource.
public int RESOURCE_TEMPLATE
A template resources.
protected internal System.Collections.ArrayList resourceLoaders
The List of templateLoaders that the Runtime will use to locate the InputStream source of a template.
protected internal NVelocity.Runtime.RuntimeServices rsvc
Constructor Detail |
---|
public ResourceManagerImpl()
Initializes a new instance of the ResourceManagerImpl class.
Method Detail |
---|
public string getLoaderNameForResource(string resourceName)
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
public NVelocity.Runtime.Resource.Resource getResource(string resourceName, int resourceType, string encoding)
Gets the named resource. Returned class type corresponds to specified type (i.e.
Templateto
RESOURCE_TEMPLATE). *
Parameters:
resourceName
- The name of the resource to retrieve.
resourceType
- The type of resource (RESOURCE_TEMPLATE,
RESOURCE_CONTENT, etc.).
encoding
- The character encoding to use.
public NVelocity.Runtime.Resource.Resource getResource(string resourceName, int resourceType)
Gets the named resource. Returned class type corresponds to specified type (i.e.
Templateto
RESOURCE_TEMPLATE). *
Parameters:
resourceName
- The name of the resource to retrieve.
resourceType
- The type of resource (RESOURCE_TEMPLATE,
RESOURCE_CONTENT, etc.).
public void initialize(NVelocity.Runtime.RuntimeServices rs)
Initialize the ResourceManager. It is assumed that assembleSourceInitializers() has been called before this is run.
protected internal NVelocity.Runtime.Resource.Resource loadResource(string resourceName, int resourceType, string encoding)
Loads a resource from the current set of resource loaders
Parameters:
resourceName
- The name of the resource to retrieve.resourceType
- The type of resource (RESOURCE_TEMPLATE,
RESOURCE_CONTENT, etc.).
encoding
- The character encoding to use.protected internal void refreshResource(NVelocity.Runtime.Resource.Resource resource, string encoding)
Takes an existing resource, and 'refreshes' it. This generally means that the source of the resource is checked for changes according to some cache/check algorithm and if the resource changed, then the resource data is reloaded and re-parsed. *
Parameters:
resource
- resource to refresh
*
@throws ResourceNotFoundException if template not found
from current source for this Resource
@throws ParseErrorException if template cannot be parsed due
to syntax (or other) error.
@throws Exception if a problem in parse
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |