Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

VelocityEngineFactoryObject Members

VelocityEngineFactoryObject overview

Public Instance Constructors

VelocityEngineFactoryObject Constructor Initializes a new instance of the VelocityEngineFactoryObject class.

Public Instance Properties

ConfigLocation (inherited from VelocityEngineFactory) Set the location of the Velocity config file. Alternatively, you can specify all properties locally.
IsSingleton Singleton
ObjectType Get the type of the velocity engine
OverrideLogging (inherited from VelocityEngineFactory) Set whether Velocity should log via Commons Logging, i.e. whether Velocity's log system should be set to CommonsLoggingLogSystem. Default value is true
PreferFileSystemAccess (inherited from VelocityEngineFactory) Set whether to prefer file system access for template loading. File system access enables hot detection of template changes.
If this is enabled, VelocityEngineFactory will try to resolve the specified "resourceLoaderPath" as file system resource.
Default is "true". Turn this off to always load via SpringResourceLoader (i.e. as stream, without hot detection of template changes), which might be necessary if some of your templates reside in a directory while others reside in assembly files.
ResourceLoader (inherited from VelocityEngineFactory) Set the Spring ResourceLoader to use for loading Velocity template files. The default is DefaultResourceLoader. Will get overridden by the ApplicationContext if running in a context.
ResourceLoaderPath (inherited from VelocityEngineFactory) Single ResourceLoaderPath
ResourceLoaderPaths (inherited from VelocityEngineFactory) Set the Velocity resource loader path via a Spring resource location. Accepts multiple locations in Velocity's comma-separated path style.
When populated via a String, standard URLs like "file:" and "assembly:" pseudo URLs are supported, as understood by IResourceLoader. Allows for relative paths when running in an ApplicationContext.
Will define a path for the default Velocity resource loader with the name "file". If the specified resource cannot be resolved to a File, a generic SpringResourceLoader will be used under the name "spring", without modification detection.
Take notice that resource caching will be enabled in any case. With the file resource loader, the last-modified timestamp will be checked on access to detect changes. With SpringResourceLoader, the resource will be throughout the life time of the application context (for example for class path resources).
To specify a modification check interval for files, use Velocity's standard "file.resource.loader.modificationCheckInterval" property. By default, the file timestamp is checked on every access (which is surprisingly fast). Of course, this just applies when loading resources from the file system.
To enforce the use of SpringResourceLoader, i.e. to not resolve a path as file system resource in any case, turn off the "preferFileSystemAccess" flag. See the latter's documentation for details.
VelocityProperties (inherited from VelocityEngineFactory) Set local NVelocity properties.

Public Instance Methods

AfterPropertiesSet Facilitate the creation of the velocity engine object
CreateVelocityEngine (inherited from VelocityEngineFactory) Create and initialize the VelocityEngine instance and return it
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetObject Get the velocity engine underlying object
GetType (inherited from Object)Gets the Type of the current instance.
ToString (inherited from Object)Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
InitSpringResourceLoader (inherited from VelocityEngineFactory) Initialize a SpringResourceLoader for the given VelocityEngine.
Called by
. Important: the NVeloctity ResourceLoaderFactory.getLoader method replaces ';' with ',' when attempting to construct our resource loader. The name on the SPRING_RESOURCE_LOADER_CLASS property has to be in the form of "ClassFullName; AssemblyName" in replacement of the tranditional "ClassFullName, AssemblyName" to work.
InitVelocityResourceLoader (inherited from VelocityEngineFactory) Initialize a Velocity resource loader for the given VelocityEngine: either a standard Velocity FileResourceLoader or a SpringResourceLoader.
Called by
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.
PostProcessVelocityEngine (inherited from VelocityEngineFactory) To be implemented by subclasses that want to to perform custom post-processing of the VelocityEngine after this FactoryObject performed its default configuration (but before VelocityEngine.init)
Called by CreateVelocityEngine

See Also

VelocityEngineFactoryObject Class | Spring.Template.Velocity Namespace