NVelocity.Runtime.Resource.Loader
Class ResourceLoader

This is abstract class the all text resource loaders should extend.

Field Summary
string className
         Class name for this loader, for logging/debuggin purposes.
bool isCachingOn_Renamed_Field
         Does this loader want templates produced with it cached in the Runtime.
long modificationCheckInterval
         This property will be passed on to the templates that are created with this loader.
NVelocity.Runtime.RuntimeServices rsvc

Constructor Summary
ResourceLoader()
        Initializes a new instance of the ResourceLoader class.

Property Summary
bool CachingOn
string ClassName
long ModificationCheckInterval

Method Summary
void commonInit(NVelocity.Runtime.RuntimeServices rs, Commons.Collections.ExtendedProperties configuration)
         This initialization is used by all resource loaders and must be called to set up common properties shared by all resource loaders
long getLastModified(NVelocity.Runtime.Resource.Resource resource)
         Get the last modified time of the InputStream source that was used to create the template. We need the template here because we have to extract the name of the template in order to locate the InputStream source.
System.IO.Stream getResourceStream(string source)
         Get the InputStream that the Runtime will parse to create a template.
void init(Commons.Collections.ExtendedProperties configuration)
         Initialize the template loader with a a resources class.
bool isCachingOn()
         The Runtime uses this to find out whether this template loader wants the Runtime to cache templates created with InputStreams provided by this loader.
bool isSourceModified(NVelocity.Runtime.Resource.Resource resource)
         Given a template, check to see if the source of InputStream has been modified.

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

className

protected internal string className

Class name for this loader, for logging/debuggin purposes.


isCachingOn_Renamed_Field

protected internal bool isCachingOn_Renamed_Field

Does this loader want templates produced with it cached in the Runtime.


modificationCheckInterval

protected internal long modificationCheckInterval

This property will be passed on to the templates that are created with this loader.


rsvc

protected internal NVelocity.Runtime.RuntimeServices rsvc

Constructor Detail

ResourceLoader

protected ResourceLoader()

Initializes a new instance of the ResourceLoader class.

Property Detail

CachingOn

public bool CachingOn


ClassName

public string ClassName


ModificationCheckInterval

public long ModificationCheckInterval

Method Detail

commonInit

public void commonInit(NVelocity.Runtime.RuntimeServices rs,
                       Commons.Collections.ExtendedProperties configuration)

This initialization is used by all resource loaders and must be called to set up common properties shared by all resource loaders


getLastModified

public long getLastModified(NVelocity.Runtime.Resource.Resource resource)

Get the last modified time of the InputStream source that was used to create the template. We need the template here because we have to extract the name of the template in order to locate the InputStream source.


getResourceStream

public System.IO.Stream getResourceStream(string source)

Get the InputStream that the Runtime will parse to create a template.


init

public void init(Commons.Collections.ExtendedProperties configuration)

Initialize the template loader with a a resources class.


isCachingOn

public bool isCachingOn()

The Runtime uses this to find out whether this template loader wants the Runtime to cache templates created with InputStreams provided by this loader.


isSourceModified

public bool isSourceModified(NVelocity.Runtime.Resource.Resource resource)

Given a template, check to see if the source of InputStream has been modified.