[Yanel-dev] rc matching (e.g. on request parameters)

Michael Wechner michael.wechner at wyona.com
Fri Dec 11 09:29:28 CET 2009


Hi

IIRC we wanted to introduce a class called ResourceTypeMatcherV1 (and an 
interface) which has at least the same functionality as now and make it 
the default Matcher

(see Guillaume's recent email

http://lists.wyona.org/pipermail/yanel-development/2009-December/004194.html)

which can be configurable per realm.

After that we/you can introduce a new version, e.g. 
ResourceTypeMatcherV2 covering your functionality below, whereas
I need to study it more closely, but having said the above it doesn't 
really matter, because you could also create your own custom matcher 
version.

Makes sense?

Cheers

Michi


http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=7205

simon wrote:
> hi all
>
> i would like to volunteer on this matching request parameters issue. 
> but i don't understand all of your ideas yet.
>
> to become more concrete i would like to naively propose something.
>
> first a new map which is backwards compatible with the old one. for 
> proceeding the map still the ResourceConfigurationMap class would be 
> responsible. but the implementation of how the <matcher> entries in 
> the map would match something would be moved to some matcher classes.
>
> <rc-map>
>  <matcher-classes>
>    <matcher-class type="parameter" 
> class="org.wyona.yanel.impl.matcher.PaternMatcher">
>    <matcher-class type="crazy-matcher" 
> class="org.custom.yanel.impl.matcher.CrazyMatcher">
>  </matcher-classes>
>  <matcher pattern="/es/**.html" rcpath="/spanish-yanel-rc.xml"/>
>  <matcher type="parameter" parameter-name="editor" 
> paramter-value="tinymce" rcpath="/tinymce-yanel-rc.xml"/>
>  <matcher type="crazy-matcher" value="hugo" 
> rcpath="/tinymce-yanel-rc.xml"/>
> </rc-map>
>
> whereas the matcher-classes would have to implement something like 
> ResourceTypeMatcherV1. but ResourceTypeMatcherV1 would have to allow 
> over give of arbitrary parameters e.g. pattern for the 
> wildcard-path-matcher or parameter-name and paramter-value for the 
> parameter-matcher. maybe the whole line as a string e.g. '<matcher 
> type="parameter" parameter-name="editor" paramter-value="tinymce" 
> rcpath="/tinymce-yanel-rc.xml">' and the matcher knows what to get 
> from it.
>
> any opinion is very appreciated.
>
> cheers
> simon



More information about the Yanel-development mailing list