org.keycloak.storage.client

## Class UnsupportedOperationsClientStorageAdapter

- java.lang.Object
- - org.keycloak.storage.client.UnsupportedOperationsClientStorageAdapter

- All Implemented Interfaces:
    ClientModel, ClientScopeModel, OrderedModel, ProtocolMapperContainerModel, RoleContainerModel, ScopeContainerModel
  Direct Known Subclasses:
    AbstractClientStorageAdapter

      public abstract class UnsupportedOperationsClientStorageAdapter
      extends Object
      implements ClientModel

  Base helper class. Unsupported operations are implemented here that throw exception on invocation.
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

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

      `ClientModel.ClientCreationEvent, ClientModel.ClientProtocolUpdatedEvent, ClientModel.ClientRemovedEvent, ClientModel.ClientUpdatedEvent, ClientModel.SearchableFields`

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

      `ClientScopeModel.ClientScopeRemovedEvent`

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

      `OrderedModel.OrderedModelComparator<OM extends OrderedModel>`

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

      `RoleContainerModel.RoleRemovedEvent`

  - ### Field Summary

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

      `PRIVATE_KEY, PUBLIC_KEY, X509CERTIFICATE`

    - ### 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
    `UnsupportedOperationsClientStorageAdapter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDefaultRole(String name)`
    `RoleModel` | `addRole(String name)`
    `RoleModel` | `addRole(String id, String name)`
    `Stream<String>` | `getDefaultRolesStream()`
    `RoleModel` | `getRole(String name)`
    `Stream<RoleModel>` | `getRolesStream()` Returns available roles as a stream.
    `Stream<RoleModel>` | `getRolesStream(Integer first, Integer max)` Returns available roles as a stream.
    `void` | `removeDefaultRoles(String... defaultRoles)`
    `boolean` | `removeRole(RoleModel role)`
    `Stream<RoleModel>` | `searchForRolesStream(String search, Integer first, Integer max)` Searches roles by the given name.
    `void` | `updateDefaultRoles(String... defaultRoles)`

    - ### 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.ClientModel

      `addClientScope, addClientScopes, addRedirectUri, addWebOrigin, getAttribute, getAttributes, getAuthenticationFlowBindingOverride, getAuthenticationFlowBindingOverrides, getBaseUrl, getClientAuthenticatorType, getClientId, getClientScopes, getConsentScreenText, getDescription, getDynamicClientScope, getId, getManagementUrl, getName, getNodeReRegistrationTimeout, getNotBefore, getProtocol, getRealm, getRedirectUris, getRegisteredNodes, getRegistrationToken, getRootUrl, getSecret, getWebOrigins, isAlwaysDisplayInConsole, isBearerOnly, isConsentRequired, isDirectAccessGrantsEnabled, isDisplayOnConsentScreen, isEnabled, isFrontchannelLogout, isFullScopeAllowed, isImplicitFlowEnabled, isPublicClient, isServiceAccountsEnabled, isStandardFlowEnabled, isSurrogateAuthRequired, registerNode, removeAttribute, removeAuthenticationFlowBindingOverride, removeClientScope, removeRedirectUri, removeWebOrigin, setAlwaysDisplayInConsole, setAttribute, setAuthenticationFlowBindingOverride, setBaseUrl, setBearerOnly, setClientAuthenticatorType, setClientId, setConsentRequired, setDescription, setDirectAccessGrantsEnabled, setEnabled, setFrontchannelLogout, setFullScopeAllowed, setImplicitFlowEnabled, setManagementUrl, setName, setNodeReRegistrationTimeout, setNotBefore, setProtocol, setPublicClient, setRedirectUris, setRegistrationToken, setRootUrl, setSecret, setServiceAccountsEnabled, setStandardFlowEnabled, setSurrogateAuthRequired, setWebOrigins, unregisterNode, updateClient, validateSecret`

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

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

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

      `addProtocolMapper, getProtocolMapperById, getProtocolMapperByName, getProtocolMappers, getProtocolMappersStream, removeProtocolMapper, updateProtocolMapper`

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

      `addScopeMapping, deleteScopeMapping, getRealmScopeMappings, getRealmScopeMappingsStream, getScopeMappings, getScopeMappingsStream, hasScope`

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

      `getDefaultRoles, getRoles, getRoles, searchForRoles`

- - ### Constructor Detail

    - #### UnsupportedOperationsClientStorageAdapter

          public UnsupportedOperationsClientStorageAdapter()

  - ### Method Detail

    - #### getRole

          public final RoleModel getRole(String name)

      Specified by:
        `getRole` in interface `RoleContainerModel`

    - #### addRole

          public final RoleModel addRole(String name)

      Specified by:
        `addRole` in interface `RoleContainerModel`

    - #### addRole

          public final RoleModel addRole(String id,
                                         String name)

      Specified by:
        `addRole` in interface `RoleContainerModel`

    - #### removeRole

          public final boolean removeRole(RoleModel role)

      Specified by:
        `removeRole` in interface `RoleContainerModel`

    - #### getRolesStream

          public final Stream<RoleModel> getRolesStream()

      Description copied from interface: `RoleContainerModel`
      Returns available roles as a stream.
      Specified by:
        `getRolesStream` in interface `RoleContainerModel`
      Returns:
        Stream of `RoleModel`. Never returns `null`.

    - #### getRolesStream

          public final Stream<RoleModel> getRolesStream(Integer first,
                                                        Integer max)

      Description copied from interface: `RoleContainerModel`
      Returns available roles as a stream.
      Specified by:
        `getRolesStream` in interface `RoleContainerModel`
      Parameters:
        `first` - `Integer` Index of the first desired role. Ignored if negative or `null`.
        `max` - `Integer` Maximum number of returned roles. Ignored if negative or `null`.
      Returns:
        Stream of `RoleModel`. Never returns `null`.

    - #### searchForRolesStream

          public final Stream<RoleModel> searchForRolesStream(String search,
                                                              Integer first,
                                                              Integer max)

      Description copied from interface: `RoleContainerModel`
      Searches roles by the given name. Returns all roles that match the given filter.
      Specified by:
        `searchForRolesStream` in interface `RoleContainerModel`
      Parameters:
        `search` - `String` Name of the role to be used as a filter.
        `first` - `Integer` Index of the first desired role. Ignored if negative or `null`.
        `max` - `Integer` Maximum number of returned roles. Ignored if negative or `null`.
      Returns:
        Stream of `RoleModel`. Never returns `null`.

    - #### getDefaultRolesStream

          public final Stream<String> getDefaultRolesStream()

      Specified by:
        `getDefaultRolesStream` in interface `RoleContainerModel`

    - #### addDefaultRole

          public final void addDefaultRole(String name)

      Specified by:
        `addDefaultRole` in interface `RoleContainerModel`

    - #### updateDefaultRoles

          public final void updateDefaultRoles(String... defaultRoles)

      Specified by:
        `updateDefaultRoles` in interface `RoleContainerModel`

    - #### removeDefaultRoles

          public final void removeDefaultRoles(String... defaultRoles)

      Specified by:
        `removeDefaultRoles` in interface `RoleContainerModel`

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