C# Класс NVelocity.Runtime.Resource.ResourceManagerImpl

Class to manage the text resource for the Velocity Runtime.
Наследование: IResourceManager
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
globalCache ResourceCache
resourceLoaders System.Collections.ArrayList
runtimeServices IRuntimeServices

Открытые методы

Метод Описание
GetLoaderNameForResource ( String resourceName ) : String

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.

GetResource ( String resourceName, ResourceType resourceType ) : Resource

Gets the named resource. Returned class type corresponds to specified type (i.e. Template to Template). *

GetResource ( string resourceName, ResourceType resourceType, string encoding ) : Resource

Gets the named resource. Returned class type corresponds to specified type (i.e. Template to Template). *

Initialize ( IRuntimeServices rs ) : void

Initialize the ResourceManager.

ResourceManagerImpl ( ) : System

Защищенные методы

Метод Описание
LoadResource ( String resourceName, ResourceType resourceType, String encoding ) : Resource

Loads a resource from the current set of resource loaders

RefreshResource ( Resource resource, String encoding ) : void

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. *

Приватные методы

Метод Описание
AssembleResourceLoaderInitializers ( ) : void

This will produce a List of Hashtables, each hashtable contains the initialization info for a particular resource loader. This Hashtable will be passed in when initializing the the template loader.

Описание методов

GetLoaderNameForResource() публичный Метод

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.
public GetLoaderNameForResource ( String resourceName ) : String
resourceName String Name of template or content resource ///
Результат String

GetResource() публичный Метод

Gets the named resource. Returned class type corresponds to specified type (i.e. Template to Template). *
public GetResource ( String resourceName, ResourceType resourceType ) : Resource
resourceName String The name of the resource to retrieve. ///
resourceType ResourceType The type of resource (Template, /// Content, etc.). ///
Результат Resource

GetResource() публичный Метод

Gets the named resource. Returned class type corresponds to specified type (i.e. Template to Template). *
public GetResource ( string resourceName, ResourceType resourceType, string encoding ) : Resource
resourceName string The name of the resource to retrieve. ///
resourceType ResourceType The type of resource (Template, /// Content, etc.). ///
encoding string The character encoding to use. ///
Результат Resource

Initialize() публичный Метод

Initialize the ResourceManager.
public Initialize ( IRuntimeServices rs ) : void
rs IRuntimeServices
Результат void

LoadResource() защищенный Метод

Loads a resource from the current set of resource loaders
protected LoadResource ( String resourceName, ResourceType resourceType, String encoding ) : Resource
resourceName String The name of the resource to retrieve.
resourceType ResourceType The type of resource (Template, /// Content, etc.). ///
encoding String The character encoding to use.
Результат Resource

RefreshResource() защищенный Метод

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. *
protected RefreshResource ( Resource resource, String encoding ) : void
resource 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 /// ///
encoding String
Результат void

ResourceManagerImpl() публичный Метод

public ResourceManagerImpl ( ) : System
Результат System

Описание свойств

globalCache защищенное свойство

Object implementing ResourceCache to be our resource manager's Resource cache.
protected ResourceCache globalCache
Результат ResourceCache

resourceLoaders защищенное свойство

The List of templateLoaders that the Runtime will use to locate the InputStream source of a template.
protected ArrayList,System.Collections resourceLoaders
Результат System.Collections.ArrayList

runtimeServices защищенное свойство

protected IRuntimeServices runtimeServices
Результат IRuntimeServices