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

simon simon at 333.ch
Fri Dec 11 15:00:40 CET 2009


Michael Wechner schrieb:
> 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
IIUC same functionality means same as ResourceManager, right?
>
> (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?
maybe i don't understand. as far as i understand guillaume's mail and 
the attached patch he wants to replace the ResourceManager and add an 
interface for it. which i think make sense in order to clean up. but i 
don't see how this helps to allow parameter (or what ever) matching. i 
don't want to replace the current matching mechanism i want to extend 
it. actually i mainly want to extend the ResourceConfigurationMap 
(chain-of-responsibility) part of it.

maybe you can help me to understand better.

thanks
simon
>
> 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