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
FieldsModifier and TypeFieldDescriptionprotected CachedResourceServerprotected StoreFactoryCacheSessionprotected booleanprotected ResourceServer -
Constructor Summary
ConstructorsConstructorDescriptionResourceServerAdapter(CachedResourceServer cached, StoreFactoryCacheSession cacheSession) -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongWhen was the model was loaded from database.Returns id of a client that thisResourceServeris associated withReturns theDecisionStrategyconfigured for this instance.Invalidates the cache for this model and returns a delegate that represents the actual data providergetId()Returns the unique identifier for this instance.Returns thePolicyEnforcementModeconfigured for this instance.inthashCode()voidInvalidate the cache for this modelprotected voidbooleanIndicates if the resource server is allowed to manage its own resources remotely using the Protection API.protected booleanvoidsetAllowRemoteResourceManagement(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 Details
-
cached
-
cacheSession
-
updated
-
invalidated
protected boolean invalidated
-
-
Constructor Details
-
ResourceServerAdapter
-
-
Method Details
-
getDelegateForUpdate
Description copied from interface:CachedModelInvalidates the cache for this model and returns a delegate that represents the actual data provider- Specified by:
getDelegateForUpdatein interfaceCachedModel<ResourceServer>- Returns:
-
invalidateFlag
protected void invalidateFlag() -
invalidate
public void invalidate()Description copied from interface:CachedModelInvalidate the cache for this model- Specified by:
invalidatein interfaceCachedModel<ResourceServer>
-
getCacheTimestamp
public long getCacheTimestamp()Description copied from interface:CachedModelWhen was the model was loaded from database.- Specified by:
getCacheTimestampin interfaceCachedModel<ResourceServer>- Returns:
-
isUpdated
protected boolean isUpdated() -
getId
Description copied from interface:ResourceServerReturns the unique identifier for this instance.- Specified by:
getIdin interfaceResourceServer- Returns:
- the unique identifier for this instance
-
isAllowRemoteResourceManagement
public 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 interfaceResourceServer- Returns:
trueif the resource server is allowed to managed them remotely
-
setAllowRemoteResourceManagement
public 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 interfaceResourceServer- Parameters:
allowRemoteResourceManagement-trueif the resource server is allowed to managed them remotely
-
getPolicyEnforcementMode
Description copied from interface:ResourceServerReturns thePolicyEnforcementModeconfigured for this instance.- Specified by:
getPolicyEnforcementModein interfaceResourceServer- Returns:
- the
PolicyEnforcementModeconfigured for this instance.
-
setPolicyEnforcementMode
Description copied from interface:ResourceServerDefines aPolicyEnforcementModefor this instance.- Specified by:
setPolicyEnforcementModein interfaceResourceServer- Parameters:
enforcementMode- one of the available options inPolicyEnforcementMode
-
getDecisionStrategy
Description copied from interface:ResourceServerReturns theDecisionStrategyconfigured for this instance.- Specified by:
getDecisionStrategyin interfaceResourceServer- Returns:
- the decision strategy
-
setDecisionStrategy
Description copied from interface:ResourceServerDefines aDecisionStrategyfor this instance, indicating how permissions should be granted depending on the givendecisionStrategy.- Specified by:
setDecisionStrategyin interfaceResourceServer- Parameters:
decisionStrategy- the decision strategy
-
getClientId
Description copied from interface:ResourceServerReturns id of a client that thisResourceServeris associated with- Specified by:
getClientIdin interfaceResourceServer- Returns:
- id of client
-
equals
-
hashCode
public int hashCode()
-