Package org.keycloak.storage.adapter
Class UpdateOnlyChangeUserModelDelegate
java.lang.Object
org.keycloak.models.utils.UserModelDelegate
org.keycloak.storage.adapter.UpdateOnlyChangeUserModelDelegate
- All Implemented Interfaces:
RoleMapperModel
,UserModel
This will perform update operation for particular attribute/property just if the existing value is not already same.
In other words, just "real updates" will be passed to the delegate.
- Author:
- Marek Posolda
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.UserModel
UserModel.RequiredAction, UserModel.UserRemovedEvent
-
Field Summary
Fields inherited from class org.keycloak.models.utils.UserModelDelegate
delegate
Fields inherited from interface org.keycloak.models.UserModel
COMPARE_BY_USERNAME, DISABLED_REASON, EMAIL, EMAIL_VERIFIED, ENABLED, EXACT, FIRST_NAME, GROUPS, IDP_ALIAS, IDP_USER_ID, INCLUDE_SERVICE_ACCOUNT, LAST_NAME, LOCALE, SEARCH, USERNAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRequiredAction
(String action) void
void
deleteRoleMapping
(RoleModel role) void
void
joinGroup
(GroupModel group) void
leaveGroup
(GroupModel group) void
removeAttribute
(String name) void
removeRequiredAction
(String action) void
void
setAttribute
(String name, List<String> values) void
setCreatedTimestamp
(Long timestamp) void
void
setEmailVerified
(boolean verified) void
setEnabled
(boolean enabled) void
setFederationLink
(String link) void
setFirstName
(String firstName) void
setLastName
(String lastName) void
setServiceAccountClientLink
(String clientInternalId) void
setSingleAttribute
(String name, String value) void
setUsername
(String username) Methods inherited from class org.keycloak.models.utils.UserModelDelegate
credentialManager, equals, getAttributes, getAttributeStream, getClientRoleMappingsStream, getCreatedTimestamp, getDelegate, getEmail, getFederationLink, getFirstAttribute, getFirstName, getGroupsStream, getId, getLastName, getRealmRoleMappingsStream, getRequiredActionsStream, getRoleMappingsStream, getServiceAccountClientLink, getUsername, hashCode, hasRole, isEmailVerified, isEnabled, isMemberOf
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.models.RoleMapperModel
hasDirectRole
Methods inherited from interface org.keycloak.models.UserModel
getGroupsCount, getGroupsCountByNameContaining, getGroupsStream
-
Constructor Details
-
UpdateOnlyChangeUserModelDelegate
-
-
Method Details
-
setUsername
- Specified by:
setUsername
in interfaceUserModel
- Overrides:
setUsername
in classUserModelDelegate
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabled
in interfaceUserModel
- Overrides:
setEnabled
in classUserModelDelegate
-
setSingleAttribute
- Specified by:
setSingleAttribute
in interfaceUserModel
- Overrides:
setSingleAttribute
in classUserModelDelegate
-
setAttribute
- Specified by:
setAttribute
in interfaceUserModel
- Overrides:
setAttribute
in classUserModelDelegate
-
removeAttribute
- Specified by:
removeAttribute
in interfaceUserModel
- Overrides:
removeAttribute
in classUserModelDelegate
-
addRequiredAction
- Specified by:
addRequiredAction
in interfaceUserModel
- Overrides:
addRequiredAction
in classUserModelDelegate
-
removeRequiredAction
- Specified by:
removeRequiredAction
in interfaceUserModel
- Overrides:
removeRequiredAction
in classUserModelDelegate
-
addRequiredAction
- Specified by:
addRequiredAction
in interfaceUserModel
- Overrides:
addRequiredAction
in classUserModelDelegate
-
removeRequiredAction
- Specified by:
removeRequiredAction
in interfaceUserModel
- Overrides:
removeRequiredAction
in classUserModelDelegate
-
setFirstName
- Specified by:
setFirstName
in interfaceUserModel
- Overrides:
setFirstName
in classUserModelDelegate
-
setLastName
- Specified by:
setLastName
in interfaceUserModel
- Overrides:
setLastName
in classUserModelDelegate
-
setEmail
- Specified by:
setEmail
in interfaceUserModel
- Overrides:
setEmail
in classUserModelDelegate
-
setEmailVerified
public void setEmailVerified(boolean verified) - Specified by:
setEmailVerified
in interfaceUserModel
- Overrides:
setEmailVerified
in classUserModelDelegate
-
grantRole
- Specified by:
grantRole
in interfaceRoleMapperModel
- Overrides:
grantRole
in classUserModelDelegate
-
deleteRoleMapping
- Specified by:
deleteRoleMapping
in interfaceRoleMapperModel
- Overrides:
deleteRoleMapping
in classUserModelDelegate
-
setFederationLink
- Specified by:
setFederationLink
in interfaceUserModel
- Overrides:
setFederationLink
in classUserModelDelegate
-
setServiceAccountClientLink
- Specified by:
setServiceAccountClientLink
in interfaceUserModel
- Overrides:
setServiceAccountClientLink
in classUserModelDelegate
-
setCreatedTimestamp
- Specified by:
setCreatedTimestamp
in interfaceUserModel
- Overrides:
setCreatedTimestamp
in classUserModelDelegate
-
joinGroup
- Specified by:
joinGroup
in interfaceUserModel
- Overrides:
joinGroup
in classUserModelDelegate
-
leaveGroup
- Specified by:
leaveGroup
in interfaceUserModel
- Overrides:
leaveGroup
in classUserModelDelegate
-