org.norther.tammi.spray.engine
Interface TemplateExceptionFilter

All Superinterfaces:
ExceptionFilter, Filter, TerminationFilter
All Known Implementing Classes:
AuthorizationExceptionFilter, DefaultTemplateExceptionFilter, RedirectionExceptionFilter

public interface TemplateExceptionFilter
extends ExceptionFilter

TemplateExceptionFilter is an interface to exception filters providing an error message template. By default, the error message is produced by a static exception class specific template for all applications. If the template is not defined, an HTTP error will be produced.

Implementations may provide more advanced template handling.

Note that the template must be specified relative to some of the template engine specific root locations.

Version:
$Id: TemplateExceptionFilter.java,v 1.8 2009/09/28 15:08:27 cvsimp Exp $
Author:
Ilkka Priha

Method Summary
 String getDefaultTemplate()
          Gets the default template for this exception class.
 String getDefaultTemplate(String className)
          Gets the default template for the named exception class.
 String getErrorTemplate()
          Gets the error template.
 void setDefaultTemplate(String className, String template)
          Sets the default template for the names exception class.
 void setErrorTemplate(String template)
          Sets the error template.
 
Methods inherited from interface org.norther.tammi.spray.filter.ExceptionFilter
getLocalizedMessage, getMessage, getStatusCode
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 

Method Detail

getErrorTemplate

String getErrorTemplate()
Gets the error template.

Returns:
the error template or null.

setErrorTemplate

void setErrorTemplate(String template)
Sets the error template.

Parameters:
template - the error template.

getDefaultTemplate

String getDefaultTemplate()
Gets the default template for this exception class.

Returns:
the default template or null.

getDefaultTemplate

String getDefaultTemplate(String className)
Gets the default template for the named exception class.

Parameters:
className - the exception class name.
Returns:
the default template or null.

setDefaultTemplate

void setDefaultTemplate(String className,
                        String template)
Sets the default template for the names exception class.

Parameters:
className - the exception class name.
template - the default template.


Copyright © 2004 The Norther Organization. All rights reserved.