KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > displaytag > decorator > DecoratorFactory


1 /**
2  * Licensed under the Artistic License; you may not use this file
3  * except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://displaytag.sourceforge.net/license.html
7  *
8  * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
9  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11  */

12 package org.displaytag.decorator;
13
14 import javax.servlet.jsp.PageContext JavaDoc;
15
16 import org.displaytag.exception.DecoratorInstantiationException;
17
18
19 /**
20  * Factory for TableDecorator or ColumnDecorator object.
21  * @author Fabrizio Giustina
22  * @version $Id: DecoratorFactory.java 964 2005-12-29 20:56:22Z fgiust $
23  */

24 public interface DecoratorFactory
25 {
26
27     /**
28      * <p>
29      * Given a table decorator name, returns a <code>org.displaytag.decorator.TableDecorator</code> instance. The
30      * method used to lookup decorator (direct instantiation, load from a pre-istantiated list or from the page context)
31      * may vary between different implementations.
32      * </p>
33      * @param decoratorName String full decorator class name
34      * @return instance of TableDecorator
35      * @throws DecoratorInstantiationException if unable to load specified TableDecorator
36      */

37     TableDecorator loadTableDecorator(PageContext JavaDoc pageContext, String JavaDoc decoratorName)
38         throws DecoratorInstantiationException;
39
40     /**
41      * <p>
42      * Given a column decorator name, returns a <code>org.displaytag.decorator.DisplaytagColumnDecorator</code>
43      * instance. The method used to lookup decorator (direct instantiation, load from a pre-istantiated list or from the
44      * page context) may vary between different implementations.
45      * </p>
46      * @param decoratorName String full decorator class name
47      * @return instance of DisplaytagColumnDecorator
48      * @throws DecoratorInstantiationException if unable to load ColumnDecorator
49      */

50     DisplaytagColumnDecorator loadColumnDecorator(PageContext JavaDoc pageContext, String JavaDoc decoratorName)
51         throws DecoratorInstantiationException;
52
53 }
Popular Tags