Dropping Hybrid API sounds like pretty much undoing all the work I've done the last
couple weeks :(
IMO what we should do is to drop the Model API/SPI. Instead make it into a single
implementation that delegates to the various providers (RealmProvider, UserProvider,
SessionProvider and probably also CacheProvider). We can then merge this with
RealmManager, ApplicationManager, etc. and instead have a single ModelManager.
I don't think it's a good idea to make the UserProvider create RoleModels. The
UserProvider should be as simple as possible IMO, and shouldn't deal with Realms,
Apps, Roles, etc, other than through simple id's.
----- Original Message -----
From: "Bill Burke" <bburke(a)redhat.com>
To: "Stian Thorgersen" <stian(a)redhat.com>
Cc: keycloak-dev(a)lists.jboss.org
Sent: Tuesday, 8 July, 2014 3:52:10 PM
Subject: Re: [keycloak-dev] triple abstraction?
On 7/8/2014 10:35 AM, Stian Thorgersen wrote:
> I've removed the model methods from KeycloakSession, so that's one level of
> indirection gone.
>
> Are you talking about dropping Model API?
>
Dropping Model API or Hybrid API. Would probably be easier to drop
Hybrid and replace some Model API methods (i.e. addUser()) with
ModelProvider equivalent.
Maybe you can't because of cross-provider joins for things like roles?
Then again, maybe you should let the UserProvider decide how to convert
a role mapping to a referenced RoleModel and vice versa.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com