fr.paris.lutece.plugins.comarquage.util.cache.genericimpl
Class AbstractFilter

java.lang.Object
  extended by fr.paris.lutece.plugins.comarquage.util.cache.genericimpl.AbstractChainNode
      extended by fr.paris.lutece.plugins.comarquage.util.cache.genericimpl.AbstractFilter
All Implemented Interfaces:
IChainNode
Direct Known Subclasses:
AjoutLocalFilter, EmptyFilter, XmlHeaderCheckFilter, XmlValidatorFilter, XslFilter

public abstract class AbstractFilter
extends AbstractChainNode

Common abstract filter
No properties read here.


Constructor Summary
AbstractFilter(java.lang.String strImplementationName, java.lang.String strImplementationDescription)
          Public constructor
 
Method Summary
 java.lang.Object doFilter(IContextChainManager filterManager, java.lang.Object element)
          Do the filter job: by default, nothing happen (the entered element is returned)
 java.lang.Object getObject(IContextChainManager filterManager, java.io.Serializable key, java.lang.Object element)
          Research an object in the cache section
If cache/filter find the object from a "source", he must call @link #doFilter(IContextChainManager, Serializable, Object) before returning the object.
 void init(java.lang.String strBase)
          Init the instance with params based on prefix strBase
 
Methods inherited from class fr.paris.lutece.plugins.comarquage.util.cache.genericimpl.AbstractChainNode
getImplementationDescription, getImplementationName, readInitKeyAdapter, readInitObjectTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFilter

public AbstractFilter(java.lang.String strImplementationName,
                      java.lang.String strImplementationDescription)
Public constructor

Parameters:
strImplementationName - the name of the implementation class
strImplementationDescription - the description of the implementation
Method Detail

init

public void init(java.lang.String strBase)
Description copied from interface: IChainNode
Init the instance with params based on prefix strBase

Specified by:
init in interface IChainNode
Overrides:
init in class AbstractChainNode
Parameters:
strBase - The prefix of params to search
See Also:
IChainNode.init(String)

getObject

public final java.lang.Object getObject(IContextChainManager filterManager,
                                        java.io.Serializable key,
                                        java.lang.Object element)
Description copied from interface: IChainNode
Research an object in the cache section
If cache/filter find the object from a "source", he must call @link #doFilter(IContextChainManager, Serializable, Object) before returning the object.

Parameters:
filterManager - Context calling manager (needed to call some service or next element in filter's chain)
key - The unique key of object
element - The element to work (null if no element given)
Returns:
The resolved object or null if no object found
See Also:
IChainNode.getObject(IContextChainManager, Serializable, Object)

doFilter

public java.lang.Object doFilter(IContextChainManager filterManager,
                                 java.lang.Object element)
Do the filter job: by default, nothing happen (the entered element is returned)

Parameters:
filterManager - The context filter manager, used to call other filter or params
element - the element to filter
Returns:
The filtered element


Copyright © 2012 Mairie de Paris. All Rights Reserved.