incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Jaquith <andrew.r.jaqu...@gmail.com>
Subject WikiPath
Date Mon, 13 Apr 2009 13:32:47 GMT
I agree with your logic. I also like "WikiPath" much better than
"WikiName" or "qualified name," for three reasons:
- It accurately indicates what it is (a "path-like structure" as Ant
people might put it)
- It's short and concise
- It's distinct enough from "name" that there won't be any ambiguity

So, strong +1 for WikiPath.

For the WikiPage interface itself, I'd prefer using the method
signature WikiPath getPath(). Don't think getWikiPath() would add
anything useful for context. Besides, the EL would work better on page
markup: e.g., ${actionBean.page.path} and in permission annotations:
e.g., ${page.path}.

Andrew

On Sat, Apr 11, 2009 at 11:21 AM, Janne Jalkanen
<janne.jalkanen@ecyrd.com> wrote:
>
> They can be changed, but one must be very careful not to change the source
> text (only the assert statements). Otherwise we might be accidentally
> changing our WikiMarkup and make upgrades difficult.
>
> I chose getQualifiedName() instead of getWikiName() because the word
> WikiName already refers to the name of the page. In fact, I was thinking of
> changing WikiName class name to something different.
>
> Currently getName() is defined to return the "wiki name" of the page; and
> getQualifiedName() to return the "WikiName of the page". So I would rather
> rename WikiName class to something more descriptive.  WikiPath?
>
> /Janne
>
> On 11 Apr 2009, at 14:44, Andrew Jaquith wrote:
>
>> I'd like Janne's take on this, but changing the tests to include the
>> prepended space name sounds like a good idea to me.
>>
>> On a related note: I am considering changing the method name
>> WikiPage.getQualifiedName() to .getWikiName(). Makes more sense. Any
>> objections?
>>
>> Andrew
>>
>> On Apr 10, 2009, at 13:27, Harry Metske <harry.metske@gmail.com> wrote:
>>
>>> I started to dig into the JUnit tests that are failing, starting with
>>> WikiEngineTest.
>>> I noticed that many tests fail because the pageName returned is prepended
>>> with "Main:".
>>> For example:
>>>
>>> *assertEquals( "plural mistake", "Foobars", m_engine.getFinalPageName(
>>> WikiName.valueOf("Foobars") ) );*
>>>
>>> The test can be changed to make it succeed by changing it to :
>>>
>>> *assertEquals( "plural mistake", "Main:Foobars",
>>> m_engine.getFinalPageName(
>>> WikiName.valueOf( "Foobars" ) ).toString() );*
>>>
>>> Is that the correct fix ?
>>>
>>> Harry
>
>

Mime
View raw message