Class LdapRoleMapKeycloakTransaction
- java.lang.Object
-
- org.keycloak.models.map.storage.ldap.LdapMapKeycloakTransaction<LdapMapRoleEntityFieldDelegate,MapRoleEntity,RoleModel>
-
- org.keycloak.models.map.storage.ldap.role.LdapRoleMapKeycloakTransaction
-
- All Implemented Interfaces:
KeycloakTransaction
,MapKeycloakTransaction<MapRoleEntity,RoleModel>
,Provider
public class LdapRoleMapKeycloakTransaction extends LdapMapKeycloakTransaction<LdapMapRoleEntityFieldDelegate,MapRoleEntity,RoleModel> implements Provider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LdapRoleMapKeycloakTransaction.LdapRoleMapKeycloakTransactionFunction<A,B,R>
-
Nested classes/interfaces inherited from class org.keycloak.models.map.storage.ldap.LdapMapKeycloakTransaction
LdapMapKeycloakTransaction.DeleteOperation, LdapMapKeycloakTransaction.MapTaskWithValue
-
-
Field Summary
-
Fields inherited from class org.keycloak.models.map.storage.ldap.LdapMapKeycloakTransaction
entities, tasksOnCommit, tasksOnRollback
-
-
Constructor Summary
Constructors Constructor Description LdapRoleMapKeycloakTransaction(KeycloakSession session, Config.Scope config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
commit()
LdapMapRoleEntityFieldDelegate
create(MapRoleEntity value)
Instructs this transaction to add a new value into the underlying store on commit.protected LdapRoleModelCriteriaBuilder
createLdapModelCriteriaBuilder()
boolean
delete(String key)
Instructs this transaction to delete a value associated with the identifierkey
from the underlying store on commit.LdapMapRoleEntityFieldDelegate
read(String key)
Provides possibility to lookup for values by akey
in the underlying store with respect to changes done in current transaction.Stream<MapRoleEntity>
read(QueryParameters<RoleModel> queryParameters)
Returns a stream of values from underlying storage that are updated based on the current transaction changes; i.e.String
readIdByDn(String dn)
LdapRoleEntity
readLdap(String key)
void
rollback()
-
Methods inherited from class org.keycloak.models.map.storage.ldap.LdapMapKeycloakTransaction
begin, delete, getCount, getRollbackOnly, isActive, setRollbackOnly
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.map.storage.MapKeycloakTransaction
exists, exists
-
-
-
-
Constructor Detail
-
LdapRoleMapKeycloakTransaction
public LdapRoleMapKeycloakTransaction(KeycloakSession session, Config.Scope config)
-
-
Method Detail
-
create
public LdapMapRoleEntityFieldDelegate create(MapRoleEntity value)
Description copied from interface:MapKeycloakTransaction
Instructs this transaction to add a new value into the underlying store on commit.Updates to the returned instances of
V
would be visible in the current transaction and will propagate into the underlying store upon commit. The ID of the entity passed in the parameter might change to a different value in the returned value if the underlying storage decided this was necessary. If the ID of the entity was null before, it will be set on the returned value.- Specified by:
create
in interfaceMapKeycloakTransaction<MapRoleEntity,RoleModel>
- Parameters:
value
- the value- Returns:
- Entity representing the
value
in the store. It may or may not be the same instance asvalue
.
-
delete
public boolean delete(String key)
Description copied from interface:MapKeycloakTransaction
Instructs this transaction to delete a value associated with the identifierkey
from the underlying store on commit.- Specified by:
delete
in interfaceMapKeycloakTransaction<MapRoleEntity,RoleModel>
- Parameters:
key
- identifier of a value- Returns:
- Returns
true
if the object has been deleted or result cannot be determined,false
otherwise.
-
readLdap
public LdapRoleEntity readLdap(String key)
-
read
public LdapMapRoleEntityFieldDelegate read(String key)
Description copied from interface:MapKeycloakTransaction
Provides possibility to lookup for values by akey
in the underlying store with respect to changes done in current transaction. Updates to the returned instance would be visible in the current transaction and will propagate into the underlying store upon commit. IfV
implementsExpirableEntity
this method should not return entities that are expired. SeeExpirableEntity
JavaDoc for more details.- Specified by:
read
in interfaceMapKeycloakTransaction<MapRoleEntity,RoleModel>
- Parameters:
key
- identifier of a value- Returns:
- a value associated with the given
key
-
read
public Stream<MapRoleEntity> read(QueryParameters<RoleModel> queryParameters)
Description copied from interface:MapKeycloakTransaction
Returns a stream of values from underlying storage that are updated based on the current transaction changes; i.e. the result contains updates and excludes of records that have been created, updated or deleted in this transaction by methodsMapKeycloakTransaction.create(V)
,MapKeycloakTransaction.create(V)
,MapKeycloakTransaction.delete(java.lang.String)
, etc.Updates to the returned instances of
V
would be visible in the current transaction and will propagate into the underlying store upon commit. IfV
implementsExpirableEntity
this method should not return entities that are expired. SeeExpirableEntity
JavaDoc for more details.- Specified by:
read
in interfaceMapKeycloakTransaction<MapRoleEntity,RoleModel>
- Parameters:
queryParameters
- parameters for the query like firstResult, maxResult, requested ordering, etc.- Returns:
- values that fulfill the given criteria, that are updated based on changes in the current transaction
-
commit
public void commit()
- Specified by:
commit
in interfaceKeycloakTransaction
- Overrides:
commit
in classLdapMapKeycloakTransaction<LdapMapRoleEntityFieldDelegate,MapRoleEntity,RoleModel>
-
rollback
public void rollback()
- Specified by:
rollback
in interfaceKeycloakTransaction
- Overrides:
rollback
in classLdapMapKeycloakTransaction<LdapMapRoleEntityFieldDelegate,MapRoleEntity,RoleModel>
-
createLdapModelCriteriaBuilder
protected LdapRoleModelCriteriaBuilder createLdapModelCriteriaBuilder()
-
-