KickJava   Java API By Example, From Geeks To Geeks.

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


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.DecoratorException;
17 import org.displaytag.properties.MediaTypeEnum;
18
19
20 /**
21  * <p>
22  * Interface for simple column decorators.
23  * </p>
24  * <p>
25  * A column decorator is called after the object has been retrieved and it can "transform" the object before the
26  * rendering.
27  * </p>
28  * <p>
29  * The <code>DisplaytagColumnDecorator</code> interface has been introduced in displaytag 1.1 and replaces the
30  * previous <code>ColumnDecorator</code> interface, adding the pageContext and media parameters, and changing the
31  * return type to object to allow decorator chaining.
32  * </p>
33  * @author Fabrizio Giustina
34  * @version $Id$
35  * @since 1.1
36  */

37 public interface DisplaytagColumnDecorator
38 {
39
40     /**
41      * Called after the object has been retrieved from the bean contained in the list. The decorate method is
42      * responsible for transforming the object into a string to render in the page.
43      * @param columnValue Object to decorate
44      * @param pageContext jsp page context
45      * @param media current media (html, pdf, excel...)
46      * @return Object decorated object
47      * @throws DecoratorException wrapper exception for any exception thrown during decoration
48      */

49     Object JavaDoc decorate(Object JavaDoc columnValue, PageContext JavaDoc pageContext, MediaTypeEnum media) throws DecoratorException;
50
51 }
52
Popular Tags