[keycloak-dev] AuthProvider refactor details
Bill Burke
bburke at redhat.com
Mon Jul 21 09:46:35 EDT 2014
for getUsers/search, I can do a union of local storage and external
storage. For getUserCount I can't do this as I would have to iterate
over every UserModel, which defeats the purpose of optimized, 1-query,
getUserCount.
On 7/21/2014 4:34 AM, Marek Posolda wrote:
> I am not sure I understand why "getUserCount" is an issue and for
> example "getUsers" or "searchForUser" is not? Am I understand correctly
> that implementor of FederationProvider can choose which method to
> override, so for example if he won't override "getUsers" or
> "getUserCount" then FederationManager just delegates those to "local"
> UserProvider?
>
> If getUserCount() is an issue, I can remove it and refactor export to
> not using it and instead use approach like
It is not an issue as only export uses it. Export will only be
exporting local storage.
> : "checkout users until
> current page is not full", which would mean that there are no more users
> to export (Like for example if I have 50 users and usersPerPage is 20,
> then page1 has 20 users, page2 has 20 users and page3 has just 10 users,
> so export process can recognize that it is last page).
>
> But still getUserCount() may be useful if we later want to add
> pagination support to admin console (in this case, we may need "count"
> methods also for searchFor** -
> https://issues.jboss.org/browse/KEYCLOAK-564 )
>
Don't need a count, just if size() < maxRequested, you know you're at
the end.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
More information about the keycloak-dev
mailing list