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
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.authorization.model.ResourceServerResourceServer.SearchableFields
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected CachedResourceServercachedprotected StoreFactoryCacheSessioncacheSessionprotected booleaninvalidatedprotected ResourceServerupdated
 - 
Constructor SummaryConstructors Constructor Description ResourceServerAdapter(RealmModel realm, CachedResourceServer cached, StoreFactoryCacheSession cacheSession)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)longgetCacheTimestamp()When was the model was loaded from database.StringgetClientId()Returns id of a client that thisResourceServeris associated withDecisionStrategygetDecisionStrategy()Returns theDecisionStrategyconfigured for this instance.ResourceServergetDelegateForUpdate()Invalidates the cache for this model and returns a delegate that represents the actual data providerStringgetId()Returns the unique identifier for this instance.PolicyEnforcementModegetPolicyEnforcementMode()Returns thePolicyEnforcementModeconfigured for this instance.RealmModelgetRealm()Returns reference of a realm that thisResourceServerbelongs to.inthashCode()voidinvalidate()Invalidate the cache for this modelprotected voidinvalidateFlag()booleanisAllowRemoteResourceManagement()Indicates if the resource server is allowed to manage its own resources remotely using the Protection API.protected booleanisUpdated()voidsetAllowRemoteResourceManagement(boolean allowRemoteResourceManagement)Indicates if the resource server is allowed to manage its own resources remotely using the Protection API.voidsetDecisionStrategy(DecisionStrategy decisionStrategy)Defines aDecisionStrategyfor this instance, indicating how permissions should be granted depending on the givendecisionStrategy.voidsetPolicyEnforcementMode(PolicyEnforcementMode enforcementMode)Defines aPolicyEnforcementModefor this instance.
 
- 
- 
- 
Field Detail- 
cachedprotected CachedResourceServer cached 
 - 
cacheSessionprotected StoreFactoryCacheSession cacheSession 
 - 
updatedprotected ResourceServer updated 
 - 
invalidatedprotected boolean invalidated 
 
- 
 - 
Constructor Detail- 
ResourceServerAdapterpublic ResourceServerAdapter(RealmModel realm, CachedResourceServer cached, StoreFactoryCacheSession cacheSession) 
 
- 
 - 
Method Detail- 
getDelegateForUpdatepublic ResourceServer getDelegateForUpdate() Description copied from interface:CachedModelInvalidates the cache for this model and returns a delegate that represents the actual data provider- Specified by:
- getDelegateForUpdatein interface- CachedModel<ResourceServer>
- Returns:
 
 - 
invalidateFlagprotected void invalidateFlag() 
 - 
invalidatepublic void invalidate() Description copied from interface:CachedModelInvalidate the cache for this model- Specified by:
- invalidatein interface- CachedModel<ResourceServer>
 
 - 
getCacheTimestamppublic long getCacheTimestamp() Description copied from interface:CachedModelWhen was the model was loaded from database.- Specified by:
- getCacheTimestampin interface- CachedModel<ResourceServer>
- Returns:
 
 - 
isUpdatedprotected boolean isUpdated() 
 - 
getIdpublic String getId() Description copied from interface:ResourceServerReturns the unique identifier for this instance.- Specified by:
- getIdin interface- ResourceServer
- Returns:
- the unique identifier for this instance
 
 - 
isAllowRemoteResourceManagementpublic boolean isAllowRemoteResourceManagement() Description copied from interface:ResourceServerIndicates if the resource server is allowed to manage its own resources remotely using the Protection API.- Specified by:
- isAllowRemoteResourceManagementin interface- ResourceServer
- Returns:
- trueif the resource server is allowed to managed them remotely
 
 - 
setAllowRemoteResourceManagementpublic void setAllowRemoteResourceManagement(boolean allowRemoteResourceManagement) Description copied from interface:ResourceServerIndicates if the resource server is allowed to manage its own resources remotely using the Protection API.- Specified by:
- setAllowRemoteResourceManagementin interface- ResourceServer
- Parameters:
- allowRemoteResourceManagement-- trueif the resource server is allowed to managed them remotely
 
 - 
getPolicyEnforcementModepublic PolicyEnforcementMode getPolicyEnforcementMode() Description copied from interface:ResourceServerReturns thePolicyEnforcementModeconfigured for this instance.- Specified by:
- getPolicyEnforcementModein interface- ResourceServer
- Returns:
- the PolicyEnforcementModeconfigured for this instance.
 
 - 
setPolicyEnforcementModepublic void setPolicyEnforcementMode(PolicyEnforcementMode enforcementMode) Description copied from interface:ResourceServerDefines aPolicyEnforcementModefor this instance.- Specified by:
- setPolicyEnforcementModein interface- ResourceServer
- Parameters:
- enforcementMode- one of the available options in- PolicyEnforcementMode
 
 - 
getDecisionStrategypublic DecisionStrategy getDecisionStrategy() Description copied from interface:ResourceServerReturns theDecisionStrategyconfigured for this instance.- Specified by:
- getDecisionStrategyin interface- ResourceServer
- Returns:
- the decision strategy
 
 - 
setDecisionStrategypublic void setDecisionStrategy(DecisionStrategy decisionStrategy) Description copied from interface:ResourceServerDefines aDecisionStrategyfor this instance, indicating how permissions should be granted depending on the givendecisionStrategy.- Specified by:
- setDecisionStrategyin interface- ResourceServer
- Parameters:
- decisionStrategy- the decision strategy
 
 - 
getClientIdpublic String getClientId() Description copied from interface:ResourceServerReturns id of a client that thisResourceServeris associated with- Specified by:
- getClientIdin interface- ResourceServer
- Returns:
- id of client
 
 - 
getRealmpublic RealmModel getRealm() Description copied from interface:ResourceServerReturns reference of a realm that thisResourceServerbelongs to.- Specified by:
- getRealmin interface- ResourceServer
- Returns:
- reference of a realm
 
 
- 
 
-