org.opencms.loader
Class CmsTemplateLoaderFacade

java.lang.Object
  extended by org.opencms.loader.CmsTemplateLoaderFacade

public class CmsTemplateLoaderFacade
extends java.lang.Object

Facade object that provides access to the template loader for a resource.

Some resource types are actually not loadable themself but require a template to be processed. This template is attached using the template property. Depending on the resource type of the template itself, a loader is then selected that processed the requested resource. The processing itself might start on the template, or on the requested resource (this will depend on the loader and the resource type implementation).

Since:
6.0.0
Version:
$Revision: 1.13 $
Author:
Alexander Kandzior

Constructor Summary
CmsTemplateLoaderFacade(I_CmsResourceLoader loader, CmsResource resource, CmsResource template)
          Creates a new template loader facade.
 
Method Summary
 I_CmsResourceLoader getLoader()
          Returns the loader.
 CmsResource getLoaderStartResource()
          Returns the loaders start resource.
 CmsResource getResource()
          Returns the resource.
 CmsResource getTemplate()
          Returns the template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsTemplateLoaderFacade

public CmsTemplateLoaderFacade(I_CmsResourceLoader loader,
                               CmsResource resource,
                               CmsResource template)
                        throws CmsLoaderException
Creates a new template loader facade.

Some resource types are actually not loadable themself but require a template to be processed. This template is attached using the template property. Depending on the resource type of the template itself, a loader is then selected that processed the requested resource. The processing itself might start on the template, or on the requested resource (this will depend on the loader and the resource type implementation).

Parameters:
loader - the loader to use
resource - the file to use
template - the template to use (ignored if null)
Throws:
CmsLoaderException - in case the template file does not use a loader that actually supports templates
Method Detail

getLoader

public I_CmsResourceLoader getLoader()
Returns the loader.

Returns:
the loader

getLoaderStartResource

public CmsResource getLoaderStartResource()
Returns the loaders start resource.

Returns:
the loaders start resource

getResource

public CmsResource getResource()
Returns the resource.

Returns:
the resource

getTemplate

public CmsResource getTemplate()
Returns the template.

Returns:
the template