Deprecate api.XWiki#renamePage(Document, String) and api.Document#rename(String)

I propose that we deprecate api.XWiki#renamePage(Document, String) (https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java#L2609)

The rationale behind it is that it uses internally already deprecated (or soon to be) APIs, and that AFAIK we should push toward using DocumentReference instead of String for such renames.

Moreover there is already existing API for renames in Document.java: so the deprecation would advice to use Document#rename(DocumentReference) instead (https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java#L2966)

I also propose we deprecate api.Document#rename(String) (https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java#L2952) for same reasons.

This vote is open for one week: it will be closed friday, January 10th.

+1

+1

Thanks,
Marius

+1 and I would go even further by moving them to legacy modules as we need to make sure we don’t use them anymore as otherwise they’re going to fail our functional tests with deprecation warnings :wink:

This vote is now closed, with 4 +1. I’m going to apply the changes and move to legacy what I can.