Refactor UserStorageUtil usage. (#1607)

This commit is contained in:
Alexander Schwartz 2022-07-07 14:57:23 +02:00 committed by GitHub
parent fd206367e0
commit b1602114fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,22 +104,7 @@ The availability of the new API is a priority for the next Keycloak version.
== Changes to `RealmModel`
For the interface `RealmModel` the methods `getUserStorageProviders` and `getUserStorageProvidersStream` have been removed.
`UserStorageUtil.getUserStorageProvidersStream` needs to be used instead.
.Before migration: code will not compile due to the changed API
[source,java,subs="+quotes"]
----
realm**.getUserStorageProviders()**...;
----
.After migration: use the new API
[source,java,subs="+quotes"]
----
UserStorageUtil**.getUserStorageProvidersStream(realm)**...;
----
The methods `getClientStorageProviders`, `getClientStorageProvidersStream`, `getRoleStorageProviders` and `getRoleStorageProvidersStream` have been removed as well.
The methods getUserStorageProviders`, `getUserStorageProvidersStream`, `getClientStorageProviders`, `getClientStorageProvidersStream`, `getRoleStorageProviders` and `getRoleStorageProvidersStream` have been removed.
Code which depends on these methods and runs with the legacy storage enabled should cast the instance as follows:
.Before migration: code will not compile due to the changed API