powered by Jive Software

JDBCGroupProvider load group properties

Hello,
We are trying to use JDBCGroupProvider to connect Openfire (v4.5.1) with our existing database. It’s working well but we have a problem with group properties.
We want to use the “group sharing”, but from what we have found in the code, the group properties are managed in the AbstractGroupProvider class that doesn’t rely on any jdbcProvider.

We are thinking to override the methods in the abstract class into the JDBCGroupProvider but are not sure if it’s the way to go because there are multiple SQL queries in the abstract class (GROUPLIST_CONTAINERS, PUBLIC_GROUPS, GROUPS_FOR_PROP, LOAD_SHARED_GROUPS, LOAD_PROPERTIES).
Should we implement all of them in the JDBCGroupProvider ? Or should we go with some refactoring first to copy what is done for the UserPropertyProvider ? (because there is a JDBCUserPropertyProvider implementing the UserPropertyProvider but there is no equivalent for Groups)

Or is there any other solution ?

We would like to know what are you thought on this @guus, @gdt ?
If the change is generic enough we will provide a PR for this.

Thank you for your help.

Here is a first WIP on this subject:

Any review is welcome :slight_smile: