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.ResourceServer
ResourceServer.SearchableFields
-
Field Summary
Modifier and TypeFieldDescriptionprotected CachedResourceServer
protected StoreFactoryCacheSession
protected boolean
protected ResourceServer
-
Constructor Summary
ConstructorDescriptionResourceServerAdapter
(RealmModel realm, CachedResourceServer cached, StoreFactoryCacheSession cacheSession) -
Method Summary
Modifier and TypeMethodDescriptionboolean
long
When was the model was loaded from database.Returns id of a client that thisResourceServer
is associated withReturns theDecisionStrategy
configured 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 thePolicyEnforcementMode
configured for this instance.getRealm()
Returns reference of a realm that thisResourceServer
belongs to.int
hashCode()
void
Invalidate the cache for this modelprotected void
boolean
Indicates if the resource server is allowed to manage its own resources remotely using the Protection API.protected boolean
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 aDecisionStrategy
for this instance, indicating how permissions should be granted depending on the givendecisionStrategy
.void
setPolicyEnforcementMode
(PolicyEnforcementMode enforcementMode) Defines aPolicyEnforcementMode
for this instance.
-
Field Details
-
cached
-
cacheSession
-
updated
-
invalidated
protected boolean invalidated
-
-
Constructor Details
-
ResourceServerAdapter
public ResourceServerAdapter(RealmModel realm, CachedResourceServer cached, StoreFactoryCacheSession cacheSession)
-
-
Method Details
-
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 interfaceCachedModel<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 interfaceCachedModel<ResourceServer>
-
getCacheTimestamp
public long getCacheTimestamp()Description copied from interface:CachedModel
When was the model was loaded from database.- Specified by:
getCacheTimestamp
in interfaceCachedModel<ResourceServer>
- Returns:
-
isUpdated
protected boolean isUpdated() -
getId
Description copied from interface:ResourceServer
Returns the unique identifier for this instance.- Specified by:
getId
in interfaceResourceServer
- 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.- Specified by:
isAllowRemoteResourceManagement
in interfaceResourceServer
- Returns:
true
if the resource server is allowed to managed them remotely
-
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 interfaceResourceServer
- Parameters:
allowRemoteResourceManagement
-true
if the resource server is allowed to managed them remotely
-
getPolicyEnforcementMode
Description copied from interface:ResourceServer
Returns thePolicyEnforcementMode
configured for this instance.- Specified by:
getPolicyEnforcementMode
in interfaceResourceServer
- Returns:
- the
PolicyEnforcementMode
configured for this instance.
-
setPolicyEnforcementMode
Description copied from interface:ResourceServer
Defines aPolicyEnforcementMode
for this instance.- Specified by:
setPolicyEnforcementMode
in interfaceResourceServer
- Parameters:
enforcementMode
- one of the available options inPolicyEnforcementMode
-
getDecisionStrategy
Description copied from interface:ResourceServer
Returns theDecisionStrategy
configured for this instance.- Specified by:
getDecisionStrategy
in interfaceResourceServer
- Returns:
- the decision strategy
-
setDecisionStrategy
Description copied from interface:ResourceServer
Defines aDecisionStrategy
for this instance, indicating how permissions should be granted depending on the givendecisionStrategy
.- Specified by:
setDecisionStrategy
in interfaceResourceServer
- Parameters:
decisionStrategy
- the decision strategy
-
getClientId
Description copied from interface:ResourceServer
Returns id of a client that thisResourceServer
is associated with- Specified by:
getClientId
in interfaceResourceServer
- Returns:
- id of client
-
getRealm
Description copied from interface:ResourceServer
Returns reference of a realm that thisResourceServer
belongs to.- Specified by:
getRealm
in interfaceResourceServer
- Returns:
- reference of a realm
-
equals
-
hashCode
public int hashCode()
-