org.mentawai.filter
Class CollectionFilter

java.lang.Object
  extended by org.mentawai.filter.CollectionFilter
All Implemented Interfaces:
Filter

public class CollectionFilter
extends java.lang.Object
implements Filter


Constructor Summary
CollectionFilter(java.lang.String attrName)
           
CollectionFilter(java.lang.String attrName, int maxAllowed)
           
 
Method Summary
protected  java.util.Collection<java.lang.Object> buildCollection(java.lang.Object[] list, int max)
           
 void destroy()
          Gives a chance to the filter to deallocalte any resources before it is destroyed.
 java.lang.String filter(InvocationChain chain)
          Executes the filter.
protected  int parseNumberFromKey(java.lang.String attrName, java.lang.String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionFilter

public CollectionFilter(java.lang.String attrName)

CollectionFilter

public CollectionFilter(java.lang.String attrName,
                        int maxAllowed)
Method Detail

filter

public java.lang.String filter(InvocationChain chain)
                        throws java.lang.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:
java.lang.Exception

buildCollection

protected java.util.Collection<java.lang.Object> buildCollection(java.lang.Object[] list,
                                                                 int max)

parseNumberFromKey

protected int parseNumberFromKey(java.lang.String attrName,
                                 java.lang.String key)
                          throws java.lang.NumberFormatException
Throws:
java.lang.NumberFormatException

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


Copyright © 2005 Mentawai Team. All Rights Reserved.