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

simon simon at 333.ch
Fri Dec 11 00:08:13 CET 2009


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