org.keycloak.models.cache.infinispan.authorization

## Class ScopeAdapter

- java.lang.Object
- - org.keycloak.models.cache.infinispan.authorization.ScopeAdapter

- All Implemented Interfaces:
    CachedModel<Scope>, Scope

      public class ScopeAdapter
      extends Object
      implements Scope, CachedModel<Scope>

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected CachedScope` | `cached`
    `protected StoreFactoryCacheSession` | `cacheSession`
    `protected boolean` | `invalidated`
    `protected Scope` | `updated`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScopeAdapter(CachedScope cached, StoreFactoryCacheSession cacheSession)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `long` | `getCacheTimestamp()` When was the model was loaded from database.
    `Scope` | `getDelegateForUpdate()` Invalidates the cache for this model and returns a delegate that represents the actual data provider
    `String` | `getDisplayName()` Returns the end user friendly name for this scope.
    `String` | `getIconUri()` Returns an icon `URI` for this scope.
    `String` | `getId()` Returns the unique identifier for this instance.
    `String` | `getName()` Returns the name of this scope.
    `ResourceServer` | `getResourceServer()` Returns the `ResourceServer` instance to where this scope belongs to.
    `int` | `hashCode()`
    `void` | `invalidate()` Invalidate the cache for this model
    `protected void` | `invalidateFlag()`
    `protected boolean` | `isUpdated()`
    `void` | `setDisplayName(String name)` Sets an end user friendly name for this scope.
    `void` | `setIconUri(String iconUri)` Sets an icon `URI` for this scope.
    `void` | `setName(String name)` Sets a name for this scope.

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

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

- - ### Field Detail

    - #### cached

          protected CachedScope cached

    - #### cacheSession

          protected StoreFactoryCacheSession cacheSession

    - #### updated

          protected Scope updated

    - #### invalidated

          protected boolean invalidated

  - ### Constructor Detail

    - #### ScopeAdapter

          public ScopeAdapter(CachedScope cached,
                              StoreFactoryCacheSession cacheSession)

  - ### Method Detail

    - #### getDelegateForUpdate

          public Scope getDelegateForUpdate()

      Description copied from interface: `CachedModel`
      Invalidates the cache for this model and returns a delegate that represents the actual data provider
      Specified by:
        `getDelegateForUpdate` in interface `CachedModel<Scope>`
      Returns:

    - #### invalidateFlag

          protected void invalidateFlag()

    - #### invalidate

          public void invalidate()

      Description copied from interface: `CachedModel`
      Invalidate the cache for this model
      Specified by:
        `invalidate` in interface `CachedModel<Scope>`

    - #### getCacheTimestamp

          public long getCacheTimestamp()

      Description copied from interface: `CachedModel`
      When was the model was loaded from database.
      Specified by:
        `getCacheTimestamp` in interface `CachedModel<Scope>`
      Returns:

    - #### isUpdated

          protected boolean isUpdated()

    - #### getId

          public String getId()

      Description copied from interface: `Scope`
      Returns the unique identifier for this instance.
      Specified by:
        `getId` in interface `Scope`
      Returns:
        the unique identifier for this instance

    - #### getName

          public String getName()

      Description copied from interface: `Scope`
      Returns the name of this scope.
      Specified by:
        `getName` in interface `Scope`
      Returns:
        the name of this scope

    - #### setName

          public void setName(String name)

      Description copied from interface: `Scope`
      Sets a name for this scope. The name must be unique.
      Specified by:
        `setName` in interface `Scope`
      Parameters:
        `name` - the name of this scope

    - #### getDisplayName

          public String getDisplayName()

      Description copied from interface: `Scope`
      Returns the end user friendly name for this scope. If not defined, value for `Scope.getName()` is returned.
      Specified by:
        `getDisplayName` in interface `Scope`
      Returns:
        the friendly name for this scope

    - #### setDisplayName

          public void setDisplayName(String name)

      Description copied from interface: `Scope`
      Sets an end user friendly name for this scope.
      Specified by:
        `setDisplayName` in interface `Scope`
      Parameters:
        `name` - the name of this scope

    - #### getIconUri

          public String getIconUri()

      Description copied from interface: `Scope`
      Returns an icon `URI` for this scope.
      Specified by:
        `getIconUri` in interface `Scope`
      Returns:
        a uri for an icon

    - #### setIconUri

          public void setIconUri(String iconUri)

      Description copied from interface: `Scope`
      Sets an icon `URI` for this scope.
      Specified by:
        `setIconUri` in interface `Scope`

    - #### getResourceServer

          public ResourceServer getResourceServer()

      Description copied from interface: `Scope`
      Returns the `ResourceServer` instance to where this scope belongs to.
      Specified by:
        `getResourceServer` in interface `Scope`
      Returns:

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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