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

simon simon at 333.ch
Tue Dec 15 17:29:20 CET 2009


Michael Wechner schrieb:

thanks for your response.
>
>> 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.
>
> one can then do his/her own implementation using an enhanced 
> ResourceConfigurationMap, without having to touch the existing stuff.
which i think is good too. but i don't consider request parameter 
matching as a custom enhancement.
>
> The ResourceConfigurationMap is just one part (maybe the one which 
> *you* are most interested in), but I think it makes sense to refactor 
> "both" classes.
it's not particular *me*, it's more i would like to fix the tinyMCE 
lookup problem 
(http://lists.wyona.org/pipermail/yanel-development/2009-December/004192.html). 
to solve this i (and guillaume) think request paramter matching would 
allow to solve this.
that's why i made the proposal about extending the map stuff.

actually i just want to help but now i don't know how.

cheers
simon
>
> Cheers
>
> Michael
>>
>> 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