Class PolicyAdapter
java.lang.Object
org.keycloak.models.cache.infinispan.authorization.PolicyAdapter
- All Implemented Interfaces:
CachedModel<Policy>,Policy
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.authorization.model.Policy
Policy.FilterOption -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CachedPolicyprotected final StoreFactoryCacheSessionprotected booleanprotected PolicyFields inherited from interface org.keycloak.authorization.model.Policy
CONFIG_SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAssociatedPolicy(Policy associatedPolicy) voidaddResource(Resource resource) voidbooleanReturns thePolicyinstances associated with this policy and used to evaluate authorization decisions when this policy applies.longWhen was the model was loaded from database.Returns aMapholding string-based key/value pairs representing any additional configuration for this policy.Returns theDecisionStrategyfor this policy.Invalidates the cache for this model and returns a delegate that represents the actual data providerReturns the description of this policy.getId()Returns the unique identifier for this instance.getLogic()Returns theLogicfor this policy.getName()Returns the name of this policy.getOwner()Returns the name of theResourceinstances where this policy applies.Returns theResourceinstances where this policy applies.Returns theResourceServerwhere this policy belongs to.Returns theScopeinstances where this policy applies.getType()Returns the type of this policy.inthashCode()voidInvalidate the cache for this modelprotected voidprotected booleanvoidvoidremoveAssociatedPolicy(Policy associatedPolicy) voidremoveConfig(String name) voidremoveResource(Resource resource) voidremoveScope(Scope scope) voidSets aMapwith string-based key/value pairs representing any additional configuration for this policy.voidsetDecisionStrategy(DecisionStrategy decisionStrategy) Sets the {DecisionStrategy} for this policy.voidsetDescription(String description) Sets the description for this policy.voidSets the {Logic} for this policy.voidSets an unique name to this policy.voidMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.authorization.model.Policy
getResourceType, setResourceType
-
Field Details
-
cached
-
cacheSession
-
updated
-
invalidated
protected boolean invalidated -
associatedPolicies
-
resources
-
scopes
-
-
Constructor Details
-
PolicyAdapter
-
-
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<Policy>- Returns:
-
invalidateFlag
protected void invalidateFlag() -
invalidate
public void invalidate()Description copied from interface:CachedModelInvalidate the cache for this model- Specified by:
invalidatein interfaceCachedModel<Policy>
-
getCacheTimestamp
public long getCacheTimestamp()Description copied from interface:CachedModelWhen was the model was loaded from database.- Specified by:
getCacheTimestampin interfaceCachedModel<Policy>- Returns:
-
isUpdated
protected boolean isUpdated() -
getId
Description copied from interface:PolicyReturns the unique identifier for this instance. -
getName
Description copied from interface:PolicyReturns the name of this policy. -
setName
Description copied from interface:PolicySets an unique name to this policy. -
getResourceServer
Description copied from interface:PolicyReturns theResourceServerwhere this policy belongs to.- Specified by:
getResourceServerin interfacePolicy- Returns:
- a resource server
-
getType
Description copied from interface:PolicyReturns the type of this policy. -
getDecisionStrategy
Description copied from interface:PolicyReturns theDecisionStrategyfor this policy.- Specified by:
getDecisionStrategyin interfacePolicy- Returns:
- the decision strategy defined for this policy
-
setDecisionStrategy
Description copied from interface:PolicySets the {DecisionStrategy} for this policy.- Specified by:
setDecisionStrategyin interfacePolicy- Parameters:
decisionStrategy- for this policy
-
getLogic
Description copied from interface:PolicyReturns theLogicfor this policy. -
setLogic
Description copied from interface:PolicySets the {Logic} for this policy. -
getConfig
Description copied from interface:PolicyReturns aMapholding string-based key/value pairs representing any additional configuration for this policy. -
setConfig
Description copied from interface:PolicySets aMapwith string-based key/value pairs representing any additional configuration for this policy. -
removeConfig
- Specified by:
removeConfigin interfacePolicy
-
putConfig
-
getDescription
Description copied from interface:PolicyReturns the description of this policy.- Specified by:
getDescriptionin interfacePolicy- Returns:
- a description or null of there is no description
-
setDescription
Description copied from interface:PolicySets the description for this policy.- Specified by:
setDescriptionin interfacePolicy- Parameters:
description- a description
-
getAssociatedPolicies
Description copied from interface:PolicyReturns thePolicyinstances associated with this policy and used to evaluate authorization decisions when this policy applies.- Specified by:
getAssociatedPoliciesin interfacePolicy- Returns:
- the associated policies or an empty set if no policy is associated with this policy
-
getResources
Description copied from interface:PolicyReturns theResourceinstances where this policy applies.- Specified by:
getResourcesin interfacePolicy- Returns:
- a set with all resource instances where this policy applies. Or an empty set if there is no resource associated with this policy
-
getResourceNames
Description copied from interface:PolicyReturns the name of theResourceinstances where this policy applies.- Specified by:
getResourceNamesin interfacePolicy- Returns:
- a set with all names of resource instances where this policy applies. Or an empty set if there is no resource associated with this policy
-
addScope
-
removeScope
- Specified by:
removeScopein interfacePolicy
-
addAssociatedPolicy
- Specified by:
addAssociatedPolicyin interfacePolicy
-
removeAssociatedPolicy
- Specified by:
removeAssociatedPolicyin interfacePolicy
-
addResource
- Specified by:
addResourcein interfacePolicy
-
removeResource
- Specified by:
removeResourcein interfacePolicy
-
getScopes
Description copied from interface:PolicyReturns theScopeinstances where this policy applies. -
getOwner
-
setOwner
-
equals
-
hashCode
public int hashCode()
-