Get all boards using Java API

Hi everyone,
I’m developing a Jira server addon and I need to get all the boards a given user can view, pretty much like this one but in Java style. The official com.atlassian.jira.board package is useless. No luck with the* classes either (exported by the Jira Software application plugin through OSGI).

Any tips? I can’t use the REST resource because it’s a server-side service and cannot be moved from there.