org.apache.cocoon.selection
Class AbstractSwitchSelector
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.selection.AbstractSwitchSelector
- All Implemented Interfaces:
- LogEnabled, Selector, SwitchSelector, ThreadSafe
- Direct Known Subclasses:
- AbstractRegexpSelector, AjaxRequestSelector, DateSelector, ExceptionSelector, RequestParameterSelector, SimpleSelector
- public abstract class AbstractSwitchSelector
- extends AbstractLogEnabled
- implements SwitchSelector
Abstract SwitchSelector class.
- Version:
- CVS $Id: AbstractSwitchSelector.java 30941 2004-07-29 19:56:58Z vgritsenko $
- Author:
- Marcus Crafter, Sylvain Wallez
Method Summary |
abstract Object |
getSelectorContext(Map objectModel,
Parameters parameters)
Method to create a selector context. |
boolean |
select(String expr,
Map objectModel,
Parameters params)
Selectors test pattern against some objects in a Map
model and signals success with the returned boolean value |
abstract boolean |
select(String expression,
Object selectorContext)
Selectors test pattern against some objects in a Map
model and signals success with the returned boolean value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSwitchSelector
public AbstractSwitchSelector()
getSelectorContext
public abstract Object getSelectorContext(Map objectModel,
Parameters parameters)
- Method to create a selector context.
- Specified by:
getSelectorContext
in interface SwitchSelector
- Parameters:
objectModel
- The Map
containing object of the
calling environment which may be used
to select values to test the expression.parameters
- The sitemap parameters, as specified by
<parameter/> tags.
- Returns:
- selector context
select
public abstract boolean select(String expression,
Object selectorContext)
- Selectors test pattern against some objects in a
Map
model and signals success with the returned boolean value
- Specified by:
select
in interface SwitchSelector
- Parameters:
expression
- The expression to test.selectorContext
- The context this test should be performed in.
- Returns:
- boolean Signals successful test.
select
public boolean select(String expr,
Map objectModel,
Parameters params)
- Selectors test pattern against some objects in a
Map
model and signals success with the returned boolean value
- Specified by:
select
in interface Selector
- Parameters:
expr
- The expression to test.objectModel
- The Map
containing object of the
calling environment which may be used
to select values to test the expression.params
- The sitemap parameters, as specified by <parameter/> tags.
- Returns:
- Signals successful test.
Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.