Hey @MatthiasClasen , please keep us posted on the progress of this if there is any. Some of us would be more than happy to contribute to the effort.
Broken Java API in Confluence 8 EAP: ContentSearch, getById(), etc
Hy @MatthiasClasen, are there any concrete plans if and when you want to publish your library open source?
Jumping on the train here, since we are also running into the problem with the ContentSearch and specifically the permission filter.
This is really poorly communicated and it is certainly not helping that the one available code sample still shows the old (removed) API without even mentioning that this does not work in 8.x upwards.
That said - we also have to create an app that works both on 7.x pre 20 and 8.x onward.
While we could use reflection to call the correct ContentSearch constructor, I can’t figure out how to create the correct permission filter dynamically, since the only way to get an instance of the SiteSearchPermissionsQueryFactory seems to be via a component import, and TBH I have no idea to do THIS dynamically (right now the code that actually executes the query isn’t even amenable to component injection, but I guess we could refactor that part).
Any ideas/solutions? We are certainly not going to recomponentize our whole app just to work around this mess; we’d rather just forego the permissions check completely (sorry guys).
Atlassian staff: If you break an API in that way, there NEEDS to be a clear migration guide and at the very least some samples that do work in both versions. This is really disappointing for a multi million dollar company.
Quick follow-up - would it be allowed to create to different versions of the same app that target 7.x and 8.x separately? Or would this mess up marketplace logic and/or not be permissible under some maintenance rules for confluence DC?