org.ceryle.wiki.plugin.assertion.filter
Class AssertionFilter

java.lang.Object
  extended by org.ceryle.wiki.plugin.assertion.filter.AssertionFilter

public class AssertionFilter
extends Object

Filters the provided Assertion, returning true if it matches the query/filter parameters.

Note that his is not a QueryFilter implementation as it deals with Assertions, not Associations.

Version:
$Id: AssertionFilter.java,v 1.3 2007-06-15 12:10:15 altheim Exp $
Author:
Murray Altheim

Constructor Summary
AssertionFilter()
           
 
Method Summary
 boolean accept(Assertion assertion, String pagename, String subject, String predicate, String object, int templateMode, int logicMode)
          Returns true if the Assertion meets the filter requirements based on the provided parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertionFilter

public AssertionFilter()
Method Detail

accept

public boolean accept(Assertion assertion,
                      String pagename,
                      String subject,
                      String predicate,
                      String object,
                      int templateMode,
                      int logicMode)
               throws FilterException
Returns true if the Assertion meets the filter requirements based on the provided parameters. The special case of all null String parameters returns true (regardless of logic mode) to match the needs of the AssertionHandler API.

Parameters:
assertion - the Assertion to filter
pagename - the optional wiki page name
subject - the optional Subject
predicate - the optional Predicate
object - the optional Object
templateMode - whether the Assertion must, may or may not be a template, as AssertionQuery.TEMPLATES_ONLY, AssertionQuery.TEMPLATES_INCLUDE, or AssertionQuery.TEMPLATES_EXCLUDE (resp.)
logicMode - the query is done as AssertionQuery.LOGICAL_AND or AssertionQuery.LOGICAL_OR. A AssertionQuery.LOGICAL_ALL throws a FilterException.
Returns:
true if the Assertion fulfills the filter requirements
Throws:
FilterException - if any of the parameters are invalid


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.