I am in the process of submitting an app for Data Center approval and it is required to remove deprecated APIs usage.
I am making use of the “old” manager classes, such as
SpaceManager etc, and as those are deprecated, I found that I have to use the “new” service classes, such as
SpaceService and alike.
To give an example, this
getSpace” method is deprecated: SpaceManager (Atlassian Confluence 7.13.1 API).
I followed the deprecation notes, and re-implemented parts of my code with
find” method: SpaceService (Atlassian Confluence 7.13.1 API)…-.
Everything worked out until I started using the
SpaceService in one of my Atlassian scheduler implementation, that is in class that implements the
com.atlassian.scheduler.JobRunner interface, if I would do something like:
final Space space = this.spaceService.find ().withKeys ("ds").fetchOrNull ();
space is always
null. However I do have a “ds” space, and from REST apis or other contexts it actually works just fine.
I am initializing the
SpaceService wired in the constructor, as I was doing for the
Does anyone have an idea why is this the case? And perhaps show a portion of code where such services are used in a scheduler contexts?