[Yanel-dev] [HEADS UP] ResourceManager
and ResourceConfigurationMap class may die soon;
resource-types' URL matching (e.g. on request parameters)
Guillaume Déflache
guillaume.deflache at wyona.com
Wed Jun 24 11:20:23 CEST 2009
Michael Wechner schrieb:
>> Then as 1st step we would have to reimplement
>> org.wyona.yanel.core.ResourceManager using the new interface and still
>> use it as the default for backward-compatibility.
>> Then we would have to allow configuration of the concrete matching
>> class. ATM this is done in the Yanel class, but Michi would like it to
>> be configurable per realm, and thanks to the way it's currently
>> encapsulated there this is also possible only with some more
>> deprecations (namely Yanel.getResourceManager).
>
> I think it gives us more freedom re upgradeability, etc.
Agreed. I still wonder though what the backward-compatible behaviour
should be when using the deprecated Yanel.getResourceManager(): get the
1st RT matcher found among all realms (whatever the iteration order)
probably?
>> I'd also suggest we hide functionality actually in
>> ResourceConfigurationMap in the concrete matcher implementations: the
>> class only has static methods and needlessly expose mechanics.
>
> can you make a concrete suggestion for this?
Well instead of:
public class ResourceConfigurationMap {
[skipped some more private static stuff]
public static String getRCPath(Realm realm, String path) { [...] }
private static InputStream getRCMap(Realm realm) { [...] }
}
...we would have:
public class ResourceTypeLegacyMatcher extends ResourceTypeMatcherV1 {
[other matching code]
private String getRCPath(Realm realm, String path) { [...] }
private InputStream getRCMap(Realm realm) { [...] }
}
with exactly the same code so that the RT-matching logic is all
self-contained at the same place and its guts well-hidden!
>> WDYT?
>
> since we discusssed this offline already, I am happy to agree to this
> summary and that we proceed like you described above ;-)
Sure, just wanted to show at least Simon what we were up to! ;)
Cheers,
Guillaume
More information about the Yanel-development
mailing list