Class LdapRoleMapStorage

All Implemented Interfaces:
KeycloakTransaction, MapStorage<MapRoleEntity,RoleModel>, Provider

public class LdapRoleMapStorage extends LdapMapStorage<LdapMapRoleEntityFieldDelegate,MapRoleEntity,RoleModel> implements Provider
  • Constructor Details

  • Method Details

    • readIdByDn

      public String readIdByDn(String dn)
    • create

      Description copied from interface: MapStorage
      Instructs this storage to add a new value into the underlying store on commit in the context of the current transaction.

      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 interface MapStorage<MapRoleEntity,RoleModel>
      Parameters:
      value - the value
      Returns:
      Entity representing the value in the store. It may or may not be the same instance as value.
    • delete

      public boolean delete(String key)
      Description copied from interface: MapStorage
      Instructs this storage to delete a value associated with the identifier key from the underlying store upon commit.
      Specified by:
      delete in interface MapStorage<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

      Description copied from interface: MapStorage
      Provides possibility to lookup for values by a key 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. If V implements ExpirableEntity this method should not return entities that are expired. See ExpirableEntity JavaDoc for more details.
      Specified by:
      read in interface MapStorage<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: MapStorage
      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 respective methods of this interface.

      Updates to the returned instances of V would be visible in the current transaction and will propagate into the underlying store upon commit. If V implements ExpirableEntity this method should not return entities that are expired. See ExpirableEntity JavaDoc for more details.

      Specified by:
      read in interface MapStorage<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 interface KeycloakTransaction
      Overrides:
      commit in class LdapMapStorage<LdapMapRoleEntityFieldDelegate,MapRoleEntity,RoleModel>
    • rollback

      public void rollback()
      Specified by:
      rollback in interface KeycloakTransaction
      Overrides:
      rollback in class LdapMapStorage<LdapMapRoleEntityFieldDelegate,MapRoleEntity,RoleModel>
    • createLdapModelCriteriaBuilder

      protected LdapRoleModelCriteriaBuilder createLdapModelCriteriaBuilder()
    • close

      public void close()
      Specified by:
      close in interface Provider