[Yanel-dev] back2realm, back2context
simon litwan
simon.litwan at wyona.com
Mon Feb 12 15:35:49 CET 2007
simon litwan schrieb:
> Josias Thöny schrieb:
>> simon litwan wrote:
>>> Josias Thöny schrieb:
>>>> simon litwan wrote:
>>>>> hi all
>>>>>
>>>>> at the moment every resource implements back2realm and back2context
>>>>> for it self.
>>>>> i think it would be cool if this would be centralized.
>>>>>
>>>>> couldn't we add this methodes to the PathUtil?
>>>>
>>>> +1
>>>> This makes a lot of sense, thanks for bringing this up.
>>>
>>>
>>> would this make sense?
>>> i'm not sure about importing rhe realm and overgive a realm to the
>>> methode backToContext.
>>> can you give me a feedback?
>>
>> The code looks good.
>> Perhaps we could add an additional method:
>>
>> public static String backToContext(Realm realm, String path) {
>> return backToContext(realm) + backToRealm(path);
>> }
>>
>> because in most cases we probably need to do both at the same time. WDYT?
> good idea +1
>
>>
>> BTW, if you have time you could write a junit test (PathUtilTest.java)
>> to test those methods (with tests for special cases, e.g. empty path
>> etc).
added a patch to
http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=5185 which
centralizes the backToRoot and backToContext methodes in PathUtil.
also added some tests.
josias can you have a look at the test if it is what you expected or
give me a feedback what testcases you would like.
simon
--
Simon Litwan simon.litwan at wyona.com
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
More information about the Yanel-development
mailing list