Class CmsTemplateLoaderFacade
- java.lang.Object
-
- 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
-
-
Constructor Summary
Constructors Constructor Description CmsTemplateLoaderFacade(I_CmsResourceLoader loader, CmsResource resource, CmsResource template)
Creates a new template loader facade.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description I_CmsResourceLoader
getLoader()
Returns the loader.CmsResource
getLoaderStartResource()
Returns the loaders start resource.CmsResource
getResource()
Returns the resource.CmsResource
getTemplate()
Returns the template.CmsTemplateContext
getTemplateContext()
Gets the template context.java.lang.String
getTemplateName()
Gets the template name.void
setTemplateContext(CmsTemplateContext context)
Sets the template context.void
setTemplateName(java.lang.String templateName)
Sets the template name.
-
-
-
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 useresource
- the file to usetemplate
- 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
-
getTemplateContext
public CmsTemplateContext getTemplateContext()
Gets the template context.- Returns:
- the template context
-
getTemplateName
public java.lang.String getTemplateName()
Gets the template name.- Returns:
- the template name
-
setTemplateContext
public void setTemplateContext(CmsTemplateContext context)
Sets the template context.- Parameters:
context
- the template context
-
setTemplateName
public void setTemplateName(java.lang.String templateName)
Sets the template name.- Parameters:
templateName
- the new template name
-
-