org.keycloak.models.cache.infinispan

## Class ClientScopeAdapter

- java.lang.Object
- - org.keycloak.models.cache.infinispan.ClientScopeAdapter

- All Implemented Interfaces:
    ClientScopeModel, OrderedModel, ProtocolMapperContainerModel, ScopeContainerModel

      public class ClientScopeAdapter
      extends Object
      implements ClientScopeModel

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.ClientScopeModel

      `ClientScopeModel.ClientScopeRemovedEvent, ClientScopeModel.SearchableFields`

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.OrderedModel

      `OrderedModel.OrderedModelComparator<OM extends OrderedModel>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected CachedClientScope` | `cached`
    `protected RealmModel` | `cachedRealm`
    `protected RealmCacheSession` | `cacheSession`
    `protected boolean` | `invalidated`
    `protected ClientScopeModel` | `updated`

    - ### Fields inherited from interface org.keycloak.models.ClientScopeModel

      `CONSENT_SCREEN_TEXT, DISPLAY_ON_CONSENT_SCREEN, GUI_ORDER, INCLUDE_IN_TOKEN_SCOPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientScopeAdapter(RealmModel cachedRealm, CachedClientScope cached, RealmCacheSession cacheSession)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ProtocolMapperModel` | `addProtocolMapper(ProtocolMapperModel model)`
    `void` | `addScopeMapping(RoleModel role)`
    `void` | `deleteScopeMapping(RoleModel role)`
    `boolean` | `equals(Object o)`
    `String` | `getAttribute(String name)`
    `Map<String,String>` | `getAttributes()`
    `String` | `getDescription()`
    `String` | `getId()`
    `String` | `getName()`
    `String` | `getProtocol()`
    `ProtocolMapperModel` | `getProtocolMapperById(String id)`
    `ProtocolMapperModel` | `getProtocolMapperByName(String protocol, String name)`
    `Stream<ProtocolMapperModel>` | `getProtocolMappersStream()` Returns protocol mappers as a stream.
    `RealmModel` | `getRealm()`
    `Stream<RoleModel>` | `getRealmScopeMappingsStream()` From the scope mappings returned by `ScopeContainerModel.getScopeMappingsStream()` returns only those that belong to the realm that owns this scope container.
    `Stream<RoleModel>` | `getScopeMappingsStream()` Returns scope mappings for this scope container as a stream.
    `int` | `hashCode()`
    `boolean` | `hasScope(RoleModel role)`
    `void` | `invalidate()`
    `protected boolean` | `isUpdated()`
    `void` | `removeAttribute(String name)`
    `void` | `removeProtocolMapper(ProtocolMapperModel mapping)`
    `void` | `setAttribute(String name, String value)`
    `void` | `setDescription(String description)`
    `void` | `setName(String name)`
    `void` | `setProtocol(String protocol)`
    `String` | `toString()`
    `void` | `updateProtocolMapper(ProtocolMapperModel mapping)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.keycloak.models.ClientScopeModel

      `getConsentScreenText, getGuiOrder, isDisplayOnConsentScreen, isIncludeInTokenScope, setConsentScreenText, setDisplayOnConsentScreen, setGuiOrder, setIncludeInTokenScope`

    - ### Methods inherited from interface org.keycloak.models.ProtocolMapperContainerModel

      `getProtocolMappers`

    - ### Methods inherited from interface org.keycloak.models.ScopeContainerModel

      `getRealmScopeMappings, getScopeMappings`

- - ### Field Detail

    - #### cacheSession

          protected RealmCacheSession cacheSession

    - #### cachedRealm

          protected RealmModel cachedRealm

    - #### updated

          protected ClientScopeModel updated

    - #### cached

          protected CachedClientScope cached

    - #### invalidated

          protected boolean invalidated

  - ### Constructor Detail

    - #### ClientScopeAdapter

          public ClientScopeAdapter(RealmModel cachedRealm,
                                    CachedClientScope cached,
                                    RealmCacheSession cacheSession)

  - ### Method Detail

    - #### invalidate

          public void invalidate()

    - #### isUpdated

          protected boolean isUpdated()

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `ClientScopeModel`

    - #### getRealm

          public RealmModel getRealm()

      Specified by:
        `getRealm` in interface `ClientScopeModel`

    - #### getProtocolMappersStream

          public Stream<ProtocolMapperModel> getProtocolMappersStream()

      Description copied from interface: `ProtocolMapperContainerModel`
      Returns protocol mappers as a stream.
      Specified by:
        `getProtocolMappersStream` in interface `ProtocolMapperContainerModel`
      Returns:
        Stream of protocol mapper. Never returns `null`.

    - #### addProtocolMapper

          public ProtocolMapperModel addProtocolMapper(ProtocolMapperModel model)

      Specified by:
        `addProtocolMapper` in interface `ProtocolMapperContainerModel`

    - #### removeProtocolMapper

          public void removeProtocolMapper(ProtocolMapperModel mapping)

      Specified by:
        `removeProtocolMapper` in interface `ProtocolMapperContainerModel`

    - #### updateProtocolMapper

          public void updateProtocolMapper(ProtocolMapperModel mapping)

      Specified by:
        `updateProtocolMapper` in interface `ProtocolMapperContainerModel`

    - #### getProtocolMapperById

          public ProtocolMapperModel getProtocolMapperById(String id)

      Specified by:
        `getProtocolMapperById` in interface `ProtocolMapperContainerModel`

    - #### getProtocolMapperByName

          public ProtocolMapperModel getProtocolMapperByName(String protocol,
                                                             String name)

      Specified by:
        `getProtocolMapperByName` in interface `ProtocolMapperContainerModel`

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `ClientScopeModel`

    - #### setName

          public void setName(String name)

      Specified by:
        `setName` in interface `ClientScopeModel`

    - #### getDescription

          public String getDescription()

      Specified by:
        `getDescription` in interface `ClientScopeModel`

    - #### setDescription

          public void setDescription(String description)

      Specified by:
        `setDescription` in interface `ClientScopeModel`

    - #### getProtocol

          public String getProtocol()

      Specified by:
        `getProtocol` in interface `ClientScopeModel`

    - #### setProtocol

          public void setProtocol(String protocol)

      Specified by:
        `setProtocol` in interface `ClientScopeModel`

    - #### getScopeMappingsStream

          public Stream<RoleModel> getScopeMappingsStream()

      Description copied from interface: `ScopeContainerModel`
      Returns scope mappings for this scope container as a stream.
      Specified by:
        `getScopeMappingsStream` in interface `ScopeContainerModel`
      Returns:
        Stream of `RoleModel`. Never returns `null`.

    - #### addScopeMapping

          public void addScopeMapping(RoleModel role)

      Specified by:
        `addScopeMapping` in interface `ScopeContainerModel`

    - #### deleteScopeMapping

          public void deleteScopeMapping(RoleModel role)

      Specified by:
        `deleteScopeMapping` in interface `ScopeContainerModel`

    - #### getRealmScopeMappingsStream

          public Stream<RoleModel> getRealmScopeMappingsStream()

      Description copied from interface: `ScopeContainerModel`
      From the scope mappings returned by `ScopeContainerModel.getScopeMappingsStream()` returns only those that belong to the realm that owns this scope container.
      Specified by:
        `getRealmScopeMappingsStream` in interface `ScopeContainerModel`
      Returns:
        stream of `RoleModel`. Never returns `null`.

    - #### hasScope

          public boolean hasScope(RoleModel role)

      Specified by:
        `hasScope` in interface `ScopeContainerModel`

    - #### setAttribute

          public void setAttribute(String name,
                                   String value)

      Specified by:
        `setAttribute` in interface `ClientScopeModel`

    - #### removeAttribute

          public void removeAttribute(String name)

      Specified by:
        `removeAttribute` in interface `ClientScopeModel`

    - #### getAttribute

          public String getAttribute(String name)

      Specified by:
        `getAttribute` in interface `ClientScopeModel`

    - #### getAttributes

          public Map<String,String> getAttributes()

      Specified by:
        `getAttributes` in interface `ClientScopeModel`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2021 JBoss by Red Hat. All rights reserved.