C# 클래스 NVelocity.Runtime.Resource.ResourceManagerImpl

Class to manage the text resource for the Velocity Runtime.
상속: IResourceManager
파일 보기 프로젝트 열기: rasmus-toftdahl-olesen/NVelocity

보호된 프로퍼티들

프로퍼티 타입 설명
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