public class PolicyAdapter extends Object implements Policy, CachedModel<Policy>
Policy.FilterOption, Policy.SearchableFields| Modifier and Type | Field and Description |
|---|---|
protected Set<Policy> |
associatedPolicies |
protected CachedPolicy |
cached |
protected StoreFactoryCacheSession |
cacheSession |
protected boolean |
invalidated |
protected Set<Resource> |
resources |
protected Set<Scope> |
scopes |
protected Policy |
updated |
CONFIG_SEPARATOR| Constructor and Description |
|---|
PolicyAdapter(CachedPolicy cached,
StoreFactoryCacheSession cacheSession) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssociatedPolicy(Policy associatedPolicy) |
void |
addResource(Resource resource) |
void |
addScope(Scope scope) |
boolean |
equals(Object o) |
Set<Policy> |
getAssociatedPolicies()
Returns the
Policy instances associated with this policy and used to evaluate authorization decisions when
this policy applies. |
long |
getCacheTimestamp()
When was the model was loaded from database.
|
Map<String,String> |
getConfig()
Returns a
Map holding string-based key/value pairs representing any additional configuration for this policy. |
DecisionStrategy |
getDecisionStrategy()
Returns the
DecisionStrategy for this policy. |
Policy |
getDelegateForUpdate()
Invalidates the cache for this model and returns a delegate that represents the actual data provider
|
String |
getDescription()
Returns the description of this policy.
|
String |
getId()
Returns the unique identifier for this instance.
|
Logic |
getLogic()
Returns the
Logic for this policy. |
String |
getName()
Returns the name of this policy.
|
String |
getOwner() |
Set<Resource> |
getResources()
Returns the
Resource instances where this policy applies. |
ResourceServer |
getResourceServer()
Returns the
ResourceServer where this policy belongs to. |
Set<Scope> |
getScopes()
Returns the
Scope instances where this policy applies. |
String |
getType()
Returns the type of this policy.
|
int |
hashCode() |
void |
invalidate()
Invalidate the cache for this model
|
protected void |
invalidateFlag() |
protected boolean |
isUpdated() |
void |
putConfig(String name,
String value) |
void |
removeAssociatedPolicy(Policy associatedPolicy) |
void |
removeConfig(String name) |
void |
removeResource(Resource resource) |
void |
removeScope(Scope scope) |
void |
setConfig(Map<String,String> config)
Sets a
Map with string-based key/value pairs representing any additional configuration for this policy. |
void |
setDecisionStrategy(DecisionStrategy decisionStrategy)
Sets the {DecisionStrategy} for this policy.
|
void |
setDescription(String description)
Sets the description for this policy.
|
void |
setLogic(Logic logic)
Sets the {Logic} for this policy.
|
void |
setName(String name)
Sets an unique name to this policy.
|
void |
setOwner(String owner) |
protected final CachedPolicy cached
protected final StoreFactoryCacheSession cacheSession
protected Policy updated
protected boolean invalidated
public PolicyAdapter(CachedPolicy cached, StoreFactoryCacheSession cacheSession)
public Policy getDelegateForUpdate()
CachedModelgetDelegateForUpdate in interface CachedModel<Policy>protected void invalidateFlag()
public void invalidate()
CachedModelinvalidate in interface CachedModel<Policy>public long getCacheTimestamp()
CachedModelgetCacheTimestamp in interface CachedModel<Policy>protected boolean isUpdated()
public String getId()
Policypublic String getName()
Policypublic void setName(String name)
Policypublic ResourceServer getResourceServer()
PolicyResourceServer where this policy belongs to.getResourceServer in interface Policypublic String getType()
Policypublic DecisionStrategy getDecisionStrategy()
PolicyDecisionStrategy for this policy.getDecisionStrategy in interface Policypublic void setDecisionStrategy(DecisionStrategy decisionStrategy)
PolicysetDecisionStrategy in interface Policypublic Logic getLogic()
PolicyLogic for this policy.public void setLogic(Logic logic)
Policypublic Map<String,String> getConfig()
PolicyMap holding string-based key/value pairs representing any additional configuration for this policy.public void setConfig(Map<String,String> config)
PolicyMap with string-based key/value pairs representing any additional configuration for this policy.public void removeConfig(String name)
removeConfig in interface Policypublic String getDescription()
PolicygetDescription in interface Policypublic void setDescription(String description)
PolicysetDescription in interface Policydescription - a descriptionpublic Set<Policy> getAssociatedPolicies()
PolicyPolicy instances associated with this policy and used to evaluate authorization decisions when
this policy applies.getAssociatedPolicies in interface Policypublic Set<Resource> getResources()
PolicyResource instances where this policy applies.getResources in interface Policypublic void removeScope(Scope scope)
removeScope in interface Policypublic void addAssociatedPolicy(Policy associatedPolicy)
addAssociatedPolicy in interface Policypublic void removeAssociatedPolicy(Policy associatedPolicy)
removeAssociatedPolicy in interface Policypublic void addResource(Resource resource)
addResource in interface Policypublic void removeResource(Resource resource)
removeResource in interface Policypublic Set<Scope> getScopes()
PolicyScope instances where this policy applies.Copyright © 2021 JBoss by Red Hat. All rights reserved.