| org.apache.cocoon.selection.AbstractSwitchSelector org.apache.cocoon.selection.ExceptionSelector org.apache.cocoon.selection.XPathExceptionSelector
XPathExceptionSelector | public class XPathExceptionSelector extends ExceptionSelector (Code) | | Additional to the inherited functionality from its superclass ExceptionSelector,
this selector allows to define xpath expressions to evaluate supplemental information
given in the thrown exception.
The configuration of this selector allows to map not only exceptions but also
xpath expressions to symbolic names that are used in the <map:when> alternatives.
Example configuration :
<map:selector type="error" src="....XPathExceptionSelector">
<exception name="denied" class="my.comp.auth.AuthenticationFailure">
<xpath name="PasswordWrong" test="authCode=10"/>
<xpath name="PasswordExpired" test="errorCode=11"/>
<xpath name="AccessForbidden" test="errorCode>11"/>
</exception>
</map:selector>
This example shows several features :
the test is the xpath expression that will be evaluated against the exception ,
an xpath expression can be given a name, which is used in the <map:when> tests,
author: Jürgen Seitz author: Björn Lütkemeier since: 2.1 version: CVS $Id: XPathExceptionSelector.java 433543 2006-08-22 06:22:54Z crossley $ |
Method Summary | |
public void | configure(Configuration conf) | public Object | getSelectorContext(Map objectModel, Parameters parameters) Compute the exception type, given the configuration and the exception stored in the object model. |
configure | public void configure(Configuration conf) throws ConfigurationException(Code) | | |
getSelectorContext | public Object getSelectorContext(Map objectModel, Parameters parameters)(Code) | | Compute the exception type, given the configuration and the exception stored in the object model.
|
Methods inherited from org.apache.cocoon.selection.AbstractSwitchSelector | public boolean select(String expr, Map objectModel, Parameters params)(Code)(Java Doc)
|
|
|