org.displaytag.decorator
Class DefaultDecoratorFactory

java.lang.Object
  extended by org.displaytag.decorator.DefaultDecoratorFactory
All Implemented Interfaces:
DecoratorFactory

public class DefaultDecoratorFactory
extends java.lang.Object
implements DecoratorFactory

Factory for TableDecorator or ColumnDecorator object.

Version:
$Id$
Author:
Fabrizio Giustina

Constructor Summary
DefaultDecoratorFactory()
           
 
Method Summary
 DisplaytagColumnDecorator loadColumnDecorator(javax.servlet.jsp.PageContext pageContext, java.lang.String decoratorName)
           If the user has specified a column decorator, then this method takes care of creating the decorator (and checking to make sure it is a subclass of the DisplaytagColumnDecorator object).
 TableDecorator loadTableDecorator(javax.servlet.jsp.PageContext pageContext, java.lang.String decoratorName)
           If the user has specified a decorator, then this method takes care of creating the decorator (and checking to make sure it is a subclass of the TableDecorator object).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDecoratorFactory

public DefaultDecoratorFactory()
Method Detail

loadTableDecorator

public TableDecorator loadTableDecorator(javax.servlet.jsp.PageContext pageContext,
                                         java.lang.String decoratorName)
                                  throws DecoratorInstantiationException

If the user has specified a decorator, then this method takes care of creating the decorator (and checking to make sure it is a subclass of the TableDecorator object). If there are any problems loading the decorator then this will throw a DecoratorInstantiationException which will get propagated up to the page.

Two different methods for loading a decorator are handled by this factory:

Specified by:
loadTableDecorator in interface DecoratorFactory
Parameters:
decoratorName - String full decorator class name
Returns:
instance of TableDecorator
Throws:
DecoratorInstantiationException - if unable to load specified TableDecorator

loadColumnDecorator

public DisplaytagColumnDecorator loadColumnDecorator(javax.servlet.jsp.PageContext pageContext,
                                                     java.lang.String decoratorName)
                                              throws DecoratorInstantiationException

If the user has specified a column decorator, then this method takes care of creating the decorator (and checking to make sure it is a subclass of the DisplaytagColumnDecorator object). If there are any problems loading the decorator then this will throw a DecoratorInstantiationException which will get propagated up to the page.

Two different methods for loading a decorator are handled by this factory:

Specified by:
loadColumnDecorator in interface DecoratorFactory
Parameters:
decoratorName - String full decorator class name
Returns:
instance of DisplaytagColumnDecorator
Throws:
DecoratorInstantiationException - if unable to load ColumnDecorator


Copyright © 2002-2007 the Displaytag team. All Rights Reserved.