Class MapPolicyAdapter
java.lang.Object
org.keycloak.authorization.model.AbstractAuthorizationModel
org.keycloak.models.map.authorization.adapter.AbstractPolicyModel<MapPolicyEntity>
org.keycloak.models.map.authorization.adapter.MapPolicyAdapter
- All Implemented Interfaces:
Policy
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.authorization.model.Policy
Policy.FilterOption, Policy.SearchableFields -
Field Summary
Fields inherited from class org.keycloak.models.map.authorization.adapter.AbstractPolicyModel
entityFields inherited from class org.keycloak.authorization.model.AbstractAuthorizationModel
storeFactoryFields inherited from interface org.keycloak.authorization.model.Policy
CONFIG_SEPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionMapPolicyAdapter(RealmModel realm, ResourceServer resourceServer, MapPolicyEntity entity, StoreFactory storeFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAssociatedPolicy(Policy associatedPolicy) voidaddResource(Resource resource) voidReturns thePolicyinstances associated with this policy and used to evaluate authorization decisions when this policy applies.Returns aMapholding string-based key/value pairs representing any additional configuration for this policy.Returns theDecisionStrategyfor this policy.Returns 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 theResourceinstances where this policy applies.Returns theResourceServerwhere this policy belongs to.Returns theScopeinstances where this policy applies.getType()Returns the type of this policy.voidvoidremoveAssociatedPolicy(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.voidtoString()Methods inherited from class org.keycloak.models.map.authorization.adapter.AbstractPolicyModel
equals, hashCodeMethods inherited from class org.keycloak.authorization.model.AbstractAuthorizationModel
throwExceptionIfReadonly
-
Constructor Details
-
MapPolicyAdapter
public MapPolicyAdapter(RealmModel realm, ResourceServer resourceServer, MapPolicyEntity entity, StoreFactory storeFactory)
-
-
Method Details
-
getId
Description copied from interface:PolicyReturns the unique identifier for this instance.- Returns:
- the unique identifier for this instance
-
getType
Description copied from interface:PolicyReturns the type of this policy.- Returns:
- the type of this policy
-
getDecisionStrategy
Description copied from interface:PolicyReturns theDecisionStrategyfor this policy.- Returns:
- the decision strategy defined for this policy
-
setDecisionStrategy
Description copied from interface:PolicySets the {DecisionStrategy} for this policy.- Parameters:
decisionStrategy- for this policy
-
getLogic
Description copied from interface:PolicyReturns theLogicfor this policy.- Returns:
- the decision strategy defined for this policy
-
setLogic
Description copied from interface:PolicySets the {Logic} for this policy.- Parameters:
logic- for this policy
-
getConfig
Description copied from interface:PolicyReturns aMapholding string-based key/value pairs representing any additional configuration for this policy.- Returns:
- a unmodifiable map with any additional configuration defined for this policy.
-
setConfig
Description copied from interface:PolicySets aMapwith string-based key/value pairs representing any additional configuration for this policy.- Parameters:
config- a map with any additional configuration for this policy.
-
removeConfig
-
putConfig
-
getName
Description copied from interface:PolicyReturns the name of this policy.- Returns:
- the name of this policy
-
setName
Description copied from interface:PolicySets an unique name to this policy.- Parameters:
name- an unique name
-
getDescription
Description copied from interface:PolicyReturns the description of this policy.- Returns:
- a description or null of there is no description
-
setDescription
Description copied from interface:PolicySets the description for this policy.- Parameters:
description- a description
-
getResourceServer
Description copied from interface:PolicyReturns theResourceServerwhere this policy belongs to.- Returns:
- a resource server
-
getAssociatedPolicies
Description copied from interface:PolicyReturns thePolicyinstances associated with this policy and used to evaluate authorization decisions when this policy applies.- 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.- Returns:
- a set with all resource instances where this policy applies. Or an empty set if there is no resource associated with this policy
-
getScopes
Description copied from interface:PolicyReturns theScopeinstances where this policy applies.- Returns:
- a set with all scope instances where this policy applies. Or an empty set if there is no scope associated with this policy
-
getOwner
-
setOwner
-
addScope
-
removeScope
-
addAssociatedPolicy
-
removeAssociatedPolicy
-
addResource
-
removeResource
-
toString
-