C# Class NVelocity.Runtime.Resource.Resource

This class represent a general text resource that may have been retrieved from any number of possible sources.
显示文件 Open project: rasmus-toftdahl-olesen/NVelocity Class Usage Examples

Protected Properties

Property Type Description
data Object
encoding String
lastModified long
modificationCheckInterval long
name String
nextCheck long
resourceLoader ResourceLoader
runtimeServices IRuntimeServices

Public Methods

Method Description
IsSourceModified ( ) : bool
Process ( ) : bool

Perform any subsequent processing that might need to be done by a resource. In the case of a template the actual parsing of the input stream needs to be performed.

RequiresChecking ( ) : bool

Set the modification check interval.

Is it time to check to see if the resource source has been updated?

Touch ( ) : void

'Touch' this template and thereby resetting the nextCheck field.

Method Details

IsSourceModified() public method

public IsSourceModified ( ) : bool
return bool

Process() public abstract method

Perform any subsequent processing that might need to be done by a resource. In the case of a template the actual parsing of the input stream needs to be performed.
public abstract Process ( ) : bool
return bool

RequiresChecking() public method

Set the modification check interval. Is it time to check to see if the resource source has been updated?
public RequiresChecking ( ) : bool
return bool

Touch() public method

'Touch' this template and thereby resetting the nextCheck field.
public Touch ( ) : void
return void

Property Details

data protected_oe property

Resource might require ancillary storage of some kind
protected Object data
return Object

encoding protected_oe property

Character encoding of this resource
protected String encoding
return String

lastModified protected_oe property

The file modification time (in milliseconds) for the cached template.
protected long lastModified
return long

modificationCheckInterval protected_oe property

How often the file modification time is checked (in milliseconds).
protected long modificationCheckInterval
return long

name protected_oe property

Name of the resource
protected String name
return String

nextCheck protected_oe property

The next time the file modification time will be checked (in milliseconds).
protected long nextCheck
return long

resourceLoader protected_oe property

The template loader that initially loaded the input stream for this template, and knows how to check the source of the input stream for modification.
protected ResourceLoader resourceLoader
return ResourceLoader

runtimeServices protected_oe property

protected IRuntimeServices runtimeServices
return IRuntimeServices