org.mentawai.filter
Class PaginationFilter

java.lang.Object
  extended by org.mentawai.filter.PaginationFilter
All Implemented Interfaces:
Filter
Direct Known Subclasses:
PaginationDisplayTagFilter

public class PaginationFilter
extends Object
implements Filter


Field Summary
static String KEY_PAGINATION
           
static int LIMIT_PAGINATION
           
static String PARAM_IS_DESC
           
static String PARAM_NUMBER_PAGE
           
static String PARAM_SORT_ATTRIBUTE
           
 
Constructor Summary
PaginationFilter(String defaultOrder)
           
PaginationFilter(String defaultOrder, int limitRecord)
           
PaginationFilter(String defaultOrder, int limitRecord, String key)
           
 
Method Summary
 void destroy()
          Gives a chance to the filter to deallocalte any resources before it is destroyed.
 String filter(InvocationChain chain)
          Executes the filter.
 String getKey()
           
protected  int getNumberPage(Input input)
           
protected  String getSortAttribute(Input input)
           
protected  boolean isDesc(Input input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIMIT_PAGINATION

public static final int LIMIT_PAGINATION
See Also:
Constant Field Values

KEY_PAGINATION

public static final String KEY_PAGINATION
See Also:
Constant Field Values

PARAM_NUMBER_PAGE

public static final String PARAM_NUMBER_PAGE
See Also:
Constant Field Values

PARAM_SORT_ATTRIBUTE

public static final String PARAM_SORT_ATTRIBUTE
See Also:
Constant Field Values

PARAM_IS_DESC

public static final String PARAM_IS_DESC
See Also:
Constant Field Values
Constructor Detail

PaginationFilter

public PaginationFilter(String defaultOrder)

PaginationFilter

public PaginationFilter(String defaultOrder,
                        int limitRecord)

PaginationFilter

public PaginationFilter(String defaultOrder,
                        int limitRecord,
                        String key)
Method Detail

filter

public String filter(InvocationChain chain)
              throws Exception
Description copied from interface: Filter
Executes the filter.

Specified by:
filter in interface Filter
Parameters:
chain - The InvocationChain for the action this filter is being applied to.
Returns:
The result of the filter or the action the filter is being applied to.
Throws:
Exception

getNumberPage

protected int getNumberPage(Input input)

getSortAttribute

protected String getSortAttribute(Input input)

isDesc

protected boolean isDesc(Input input)

destroy

public void destroy()
Description copied from interface: Filter
Gives a chance to the filter to deallocalte any resources before it is destroyed. This is called when the web application is stopped, in other words, this has nothing to do with garbage collection.

Specified by:
destroy in interface Filter

getKey

public String getKey()


Copyright © 2013. All Rights Reserved.