Quoting Carsten Ziegeler <[EMAIL PROTECTED]>:
> Hmm, is it the responsibility of the InputModule to filter?
> Or is it rather the calling component which gets information
> from an InputModule that should filter?
> And how would you apply this filter, let's say in the sitemap?
> Or is it a configuration thing?
hm... you are right. instead of providing the filter itself we
could provide the filter name and have filter components.
Object getAttribute( String name, Map objectModel, String[] filters) throws
ProcessingException;
...just rethinking: we don't need filter chaining but applying
multiple filters. this way it's easy to do...
interface Filter extends Component {
Object filter( Object input ) throws FilterException;
}
WildcardFilter implements Filter, ThreadSafe, Configurable {
...
Object filter( Object input ) throws FilterException {
...
}
}
<filters>
<component-instance class="...WildcardFilter" name="id">
<pattern>I**</pattern>
</component-instance>
<component-instance class="...RegExprFilter" name="id2">
<pattern>[0-9]+</pattern>
</component-instance>
...
</filters>
Object value = module.getAttribute( String name, Map objectModel, null)
or with a filter
Object value = module.getAttribute( String name, Map objectModel,
new Filter[] { "id" }
)
This should also be incorparated into the the request logicsheet, too
What do you guys think?
--
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]