org.norther.tammi.spray.template
Interface LayoutFilter

All Superinterfaces:
AccessController, CacheClient, Container, ContainerFilter, ContainerKeyFilter, Filter, KeyFilter, PageFilter, Refreshable, SecureContainerFilter, SecureContainerKeyFilter, SecureFilter, TemplateExecutor
All Known Implementing Classes:
DefaultLayoutFilter

public interface LayoutFilter
extends PageFilter

LayoutFilter extends PageFilter by adding support for layouts, which are templates placing the content of the page template inside some standardized layout content.

Based on TemplateService in the Apache Jakarta Turbine project.

Author:
John D. McNally, Jason van Zyl, Daniel Rall, Ilkka Priha

Field Summary
 
Fields inherited from interface org.norther.tammi.spray.template.PageFilter
ANY_EXTENSION
 
Fields inherited from interface org.norther.tammi.spray.engine.TemplateExecutor
PROPERTY_ENCODING, PROPERTY_EXTENSION
 
Method Summary
 String getLayoutEncoding(ServletRequest request, ServletResponse response)
          Gets the current layout encoding of the specified request.
 String getLayoutTemplate()
          Gets the default layout template.
 String getLayoutTemplate(ServletRequest request, ServletResponse response, FilterChain chain)
          Gets the current layout template of the specified request.
 void setLayoutTemplate(String template)
          Sets the default layout template.
 void setLayoutTemplate(String template, ServletRequest request, ServletResponse response, FilterChain chain)
          Sets the current layout template of the specified request.
 void setLayoutTemplate(String template, String encoding, ServletRequest request, ServletResponse response, FilterChain chain)
          Sets the current layout template of the specified request with encoding.
 
Methods inherited from interface org.norther.tammi.spray.template.PageFilter
evaluate, evaluate, evaluate, evaluate, evaluate, execute, execute, execute, execute, execute, getDefaultBuilder, getPageEncoding, getPageTemplate, getPageTemplate, getTaskLoaderName, resolve, resolve, resolveTemplatePath, setDefaultBuilder, setPageTemplate, setPageTemplate, setPageTemplate, setTaskLoaderName, templateExists
 
Methods inherited from interface org.norther.tammi.spray.engine.TemplateExecutor
evaluate, evaluate, evaluate, execute, execute, execute, getErrorTemplate, getTemplateEngine, isLocalContext, isLocalizedTemplates, resolve, resolve, resolveTemplatePath, setErrorTemplate, setLocalContext, setLocalizedTemplates, templateExists
 
Methods inherited from interface org.norther.tammi.core.base.Container
clear, containsKey, get, getContainerKey, getContainerKey, getContainerKey, getMBean, getMBeanInterface, getMBeanInterface, getObjectName, getObjectNames, getQueryPattern, registryKeySet, registryKeySet, registryKeySet, registryKeySet, registryMap, registrySize, remove, setMBeanInterface, setQueryPattern, setQueryPattern
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 
Methods inherited from interface org.norther.tammi.spray.filter.SecureFilter
checkPermission, checkPermission, checkPermission
 
Methods inherited from interface org.norther.tammi.core.security.AccessController
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, checkPermission, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, getPermissibleRoles, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 
Methods inherited from interface org.norther.tammi.core.base.Container
clear, containsKey, get, getContainerKey, getContainerKey, getContainerKey, getMBean, getMBeanInterface, getMBeanInterface, getObjectName, getObjectNames, getQueryPattern, registryKeySet, registryKeySet, registryKeySet, registryKeySet, registryMap, registrySize, remove, setMBeanInterface, setQueryPattern, setQueryPattern
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 
Methods inherited from interface org.norther.tammi.spray.filter.KeyFilter
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 
Methods inherited from interface org.norther.tammi.core.cache.CacheClient
clearCached, expireCached, expireFraction, getCache, isCachingDisabled, removeCache, setCachingDisabled
 
Methods inherited from interface org.norther.tammi.core.base.Refreshable
getRefreshed, refresh
 

Method Detail

getLayoutTemplate

String getLayoutTemplate()
Gets the default layout template.

Returns:
the name of the default layout template.

setLayoutTemplate

void setLayoutTemplate(String template)
Sets the default layout template. The layout template is processed after the target template. The content of the target template is available to the layout template through the content tool.

Parameters:
template - the name of the layout template.

getLayoutTemplate

String getLayoutTemplate(ServletRequest request,
                         ServletResponse response,
                         FilterChain chain)
Gets the current layout template of the specified request.

Parameters:
request - the request.
response - the response.
chain - the filter chain.
Returns:
the template or null.

setLayoutTemplate

void setLayoutTemplate(String template,
                       ServletRequest request,
                       ServletResponse response,
                       FilterChain chain)
Sets the current layout template of the specified request.

Parameters:
template - the template.
request - the request.
response - the response.
chain - the filter chain.

setLayoutTemplate

void setLayoutTemplate(String template,
                       String encoding,
                       ServletRequest request,
                       ServletResponse response,
                       FilterChain chain)
Sets the current layout template of the specified request with encoding.

Parameters:
template - the template.
encoding - the encoding.
request - the request.
response - the response.
chain - the filter chain.

getLayoutEncoding

String getLayoutEncoding(ServletRequest request,
                         ServletResponse response)
Gets the current layout encoding of the specified request.

Parameters:
request - the request.
response - the response.
Returns:
the encoding.


Copyright © 2004 The Norther Organization. All rights reserved.