C# Class NVelocity.Runtime.Resource.Loader.ResourceLoader

This is abstract class the all text resource loaders should extend.
Datei anzeigen Open project: rasmus-toftdahl-olesen/NVelocity

Protected Properties

Property Type Description
className String
isCachingOn bool
modificationCheckInterval long
runtimeServices IRuntimeServices

Public Methods

Method Description
CommonInit ( IRuntimeServices rs, ExtendedProperties configuration ) : void

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

GetLastModified ( Resource resource ) : long

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 ( String source ) : Stream

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

Init ( ExtendedProperties configuration ) : void

Initialize the template loader with a a resources class.

IsSourceModified ( Resource resource ) : bool

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

Method Details

CommonInit() public method

This initialization is used by all resource loaders and must be called to set up common properties shared by all resource loaders
public CommonInit ( IRuntimeServices rs, ExtendedProperties configuration ) : void
rs IRuntimeServices
configuration Commons.Collections.ExtendedProperties
return void

GetLastModified() public abstract method

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.
public abstract GetLastModified ( Resource resource ) : long
resource Resource
return long

GetResourceStream() public abstract method

Get the InputStream that the Runtime will parse to create a template.
public abstract GetResourceStream ( String source ) : Stream
source String
return Stream

Init() public abstract method

Initialize the template loader with a a resources class.
public abstract Init ( ExtendedProperties configuration ) : void
configuration Commons.Collections.ExtendedProperties
return void

IsSourceModified() public abstract method

Given a template, check to see if the source of InputStream has been modified.
public abstract IsSourceModified ( Resource resource ) : bool
resource Resource
return bool

Property Details

className protected_oe property

Class name for this loader, for logging/debugging purposes.
protected String className
return String

isCachingOn protected_oe property

Does this loader want templates produced with it cached in the Runtime.
protected bool isCachingOn
return bool

modificationCheckInterval protected_oe property

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

runtimeServices protected_oe property

protected IRuntimeServices runtimeServices
return IRuntimeServices