[Proposal] Deprecate Document#getName()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Proposal] Deprecate Document#getName()

vmassol
Administrator
Hi devs,

I’d like to propose deprecating Document#getName() in favor of Document#getDocumentReference().

The main reason is that it’s misleading since users will use nested pages by default and this method returns “WebHome” all the time in this case.

In addition, it doesn’t make sense anymore with nested pages to have access only to the last part of the reference.

WDYT?

Thanks
-Vincent

Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Deprecate Document#getName()

Thomas Mortagne
Administrator
Sure. Also XWikiDocument#getName() is deprecated since quite a while now.
On Fri, Oct 12, 2018 at 11:11 AM Vincent Massol <[hidden email]> wrote:

>
> Hi devs,
>
> I’d like to propose deprecating Document#getName() in favor of Document#getDocumentReference().
>
> The main reason is that it’s misleading since users will use nested pages by default and this method returns “WebHome” all the time in this case.
>
> In addition, it doesn’t make sense anymore with nested pages to have access only to the last part of the reference.
>
> WDYT?
>
> Thanks
> -Vincent
>


--
Thomas Mortagne