public class ResourceServerAdapter extends Object implements ResourceServer, CachedModel<ResourceServer>
Modifier and Type | Field and Description |
---|---|
protected CachedResourceServer |
cached |
protected StoreFactoryCacheSession |
cacheSession |
protected boolean |
invalidated |
protected ResourceServer |
updated |
Constructor and Description |
---|
ResourceServerAdapter(CachedResourceServer cached,
StoreFactoryCacheSession cacheSession) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
long |
getCacheTimestamp()
When was the model was loaded from database.
|
DecisionStrategy |
getDecisionStrategy()
Returns the
DecisionStrategy configured for this instance. |
ResourceServer |
getDelegateForUpdate()
Invalidates the cache for this model and returns a delegate that represents the actual data provider
|
String |
getId()
Returns the unique identifier for this instance.
|
PolicyEnforcementMode |
getPolicyEnforcementMode()
Returns the
PolicyEnforcementMode configured for this instance. |
int |
hashCode() |
void |
invalidate()
Invalidate the cache for this model
|
protected void |
invalidateFlag() |
boolean |
isAllowRemoteResourceManagement()
Indicates if the resource server is allowed to manage its own resources remotely using the Protection API.
|
protected boolean |
isUpdated() |
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 a
DecisionStrategy for this instance, indicating how permissions should be granted depending on the given
decisionStrategy . |
void |
setPolicyEnforcementMode(PolicyEnforcementMode enforcementMode)
Defines a
PolicyEnforcementMode for this instance. |
protected CachedResourceServer cached
protected StoreFactoryCacheSession cacheSession
protected ResourceServer updated
protected boolean invalidated
public ResourceServerAdapter(CachedResourceServer cached, StoreFactoryCacheSession cacheSession)
public ResourceServer getDelegateForUpdate()
CachedModel
getDelegateForUpdate
in interface CachedModel<ResourceServer>
protected void invalidateFlag()
public void invalidate()
CachedModel
invalidate
in interface CachedModel<ResourceServer>
public long getCacheTimestamp()
CachedModel
getCacheTimestamp
in interface CachedModel<ResourceServer>
protected boolean isUpdated()
public String getId()
ResourceServer
getId
in interface ResourceServer
public boolean isAllowRemoteResourceManagement()
ResourceServer
true
if the resource server is allowed to managed them remotelyisAllowRemoteResourceManagement
in interface ResourceServer
public void setAllowRemoteResourceManagement(boolean allowRemoteResourceManagement)
ResourceServer
setAllowRemoteResourceManagement
in interface ResourceServer
allowRemoteResourceManagement
- true
if the resource server is allowed to managed them remotelypublic PolicyEnforcementMode getPolicyEnforcementMode()
ResourceServer
PolicyEnforcementMode
configured for this instance.getPolicyEnforcementMode
in interface ResourceServer
PolicyEnforcementMode
configured for this instance.public void setPolicyEnforcementMode(PolicyEnforcementMode enforcementMode)
ResourceServer
PolicyEnforcementMode
for this instance.setPolicyEnforcementMode
in interface ResourceServer
enforcementMode
- one of the available options in PolicyEnforcementMode
public DecisionStrategy getDecisionStrategy()
ResourceServer
DecisionStrategy
configured for this instance.getDecisionStrategy
in interface ResourceServer
public void setDecisionStrategy(DecisionStrategy decisionStrategy)
ResourceServer
DecisionStrategy
for this instance, indicating how permissions should be granted depending on the given
decisionStrategy
.setDecisionStrategy
in interface ResourceServer
decisionStrategy
- the decision strategyCopyright © 2020 JBoss by Red Hat. All rights reserved.