org.keycloak.models.cache.infinispan.authorization

## Class ResourceServerAdapter

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

- All Implemented Interfaces:
    CachedModel<ResourceServer>, ResourceServer

      public class ResourceServerAdapter
      extends Object
      implements ResourceServer, CachedModel<ResourceServer>

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceServerAdapter(CachedResourceServer 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.
    `DecisionStrategy` | `getDecisionStrategy()` Returns the `DecisionStrategy` configured for this instance.
    `ResourceServer` | `getDelegateForUpdate()` Invalidates the cache for this model and returns a delegate that represents the actual data provider
    `String` | `getId()` Returns the unique identifier for this instance.
    `PolicyEnforcementMode` | `getPolicyEnforcementMode()` Returns the `PolicyEnforcementMode` configured for this instance.
    `int` | `hashCode()`
    `void` | `invalidate()` Invalidate the cache for this model
    `protected void` | `invalidateFlag()`
    `boolean` | `isAllowRemoteResourceManagement()` Indicates if the resource server is allowed to manage its own resources remotely using the Protection API.
    `protected boolean` | `isUpdated()`
    `void` | `setAllowRemoteResourceManagement(boolean allowRemoteResourceManagement)` Indicates if the resource server is allowed to manage its own resources remotely using the Protection API.
    `void` | `setDecisionStrategy(DecisionStrategy decisionStrategy)` Defines a `DecisionStrategy` for this instance, indicating how permissions should be granted depending on the given `decisionStrategy`.
    `void` | `setPolicyEnforcementMode(PolicyEnforcementMode enforcementMode)` Defines a `PolicyEnforcementMode` for this instance.

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

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

- - ### Field Detail

    - #### cached

          protected CachedResourceServer cached

    - #### cacheSession

          protected StoreFactoryCacheSession cacheSession

    - #### updated

          protected ResourceServer updated

    - #### invalidated

          protected boolean invalidated

  - ### Constructor Detail

    - #### ResourceServerAdapter

          public ResourceServerAdapter(CachedResourceServer cached,
                                       StoreFactoryCacheSession cacheSession)

  - ### Method Detail

    - #### getDelegateForUpdate

          public ResourceServer 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<ResourceServer>`
      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<ResourceServer>`

    - #### getCacheTimestamp

          public long getCacheTimestamp()

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

    - #### isUpdated

          protected boolean isUpdated()

    - #### getId

          public String getId()

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

    - #### isAllowRemoteResourceManagement

          public boolean isAllowRemoteResourceManagement()

      Description copied from interface: `ResourceServer`
      Indicates if the resource server is allowed to manage its own resources remotely using the Protection API. `true` if the resource server is allowed to managed them remotely
      Specified by:
        `isAllowRemoteResourceManagement` in interface `ResourceServer`

    - #### setAllowRemoteResourceManagement

          public void setAllowRemoteResourceManagement(boolean allowRemoteResourceManagement)

      Description copied from interface: `ResourceServer`
      Indicates if the resource server is allowed to manage its own resources remotely using the Protection API.
      Specified by:
        `setAllowRemoteResourceManagement` in interface `ResourceServer`
      Parameters:
        `allowRemoteResourceManagement` - `true` if the resource server is allowed to managed them remotely

    - #### getPolicyEnforcementMode

          public PolicyEnforcementMode getPolicyEnforcementMode()

      Description copied from interface: `ResourceServer`
      Returns the `PolicyEnforcementMode` configured for this instance.
      Specified by:
        `getPolicyEnforcementMode` in interface `ResourceServer`
      Returns:
        the `PolicyEnforcementMode` configured for this instance.

    - #### setPolicyEnforcementMode

          public void setPolicyEnforcementMode(PolicyEnforcementMode enforcementMode)

      Description copied from interface: `ResourceServer`
      Defines a `PolicyEnforcementMode` for this instance.
      Specified by:
        `setPolicyEnforcementMode` in interface `ResourceServer`
      Parameters:
        `enforcementMode` - one of the available options in `PolicyEnforcementMode`

    - #### getDecisionStrategy

          public DecisionStrategy getDecisionStrategy()

      Description copied from interface: `ResourceServer`
      Returns the `DecisionStrategy` configured for this instance.
      Specified by:
        `getDecisionStrategy` in interface `ResourceServer`
      Returns:
        the decision strategy

    - #### setDecisionStrategy

          public void setDecisionStrategy(DecisionStrategy decisionStrategy)

      Description copied from interface: `ResourceServer`
      Defines a `DecisionStrategy` for this instance, indicating how permissions should be granted depending on the given `decisionStrategy`.
      Specified by:
        `setDecisionStrategy` in interface `ResourceServer`
      Parameters:
        `decisionStrategy` - the decision strategy

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