org.apache.jackrabbit.taglib.filter
Class JEXLItemFilter

java.lang.Object
  extended byorg.apache.jackrabbit.taglib.filter.JEXLItemFilter
All Implemented Interfaces:
ItemFilter, org.apache.commons.collections.Predicate

public class JEXLItemFilter
extends java.lang.Object
implements ItemFilter

It evaluates any javax.jcr.Item based on a JEXL valid expression which returns a Boolean instance. The javax.jcr.Item is added to the JEXLContext with the name of "item". A valid JEXL expression would be "item.name.equals('MyNodeName')".

Author:
Edgar Poce

Constructor Summary
JEXLItemFilter()
           
 
Method Summary
 boolean evaluate(java.lang.Object o)
          Evaluate a node.
 void setExpression(java.lang.String exp)
          Set the expression to evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JEXLItemFilter

public JEXLItemFilter()
Method Detail

setExpression

public void setExpression(java.lang.String exp)
Set the expression to evaluate

Specified by:
setExpression in interface ItemFilter
Parameters:
exp -

evaluate

public boolean evaluate(java.lang.Object o)
Evaluate a node.

Specified by:
evaluate in interface org.apache.commons.collections.Predicate


Copyright © 2005 . All Rights Reserved.