Class ResourceServerAdapter
- java.lang.Object
-
- org.keycloak.authorization.model.AbstractAuthorizationModel
-
- org.keycloak.authorization.jpa.store.ResourceServerAdapter
-
- All Implemented Interfaces:
ResourceServer
,JpaModel<ResourceServerEntity>
public class ResourceServerAdapter extends AbstractAuthorizationModel implements ResourceServer, JpaModel<ResourceServerEntity>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.authorization.model.ResourceServer
ResourceServer.SearchableFields
-
-
Constructor Summary
Constructors Constructor Description ResourceServerAdapter(ResourceServerEntity entity, javax.persistence.EntityManager em, StoreFactory storeFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
DecisionStrategy
getDecisionStrategy()
Returns theDecisionStrategy
configured for this instance.ResourceServerEntity
getEntity()
String
getId()
Returns the unique identifier for this instance.PolicyEnforcementMode
getPolicyEnforcementMode()
Returns thePolicyEnforcementMode
configured for this instance.int
hashCode()
boolean
isAllowRemoteResourceManagement()
Indicates if the resource server is allowed to manage its own resources remotely using the Protection API.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.static ResourceServerEntity
toEntity(javax.persistence.EntityManager em, ResourceServer resource)
-
Methods inherited from class org.keycloak.authorization.model.AbstractAuthorizationModel
throwExceptionIfReadonly
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.authorization.model.ResourceServer
getClientId
-
-
-
-
Constructor Detail
-
ResourceServerAdapter
public ResourceServerAdapter(ResourceServerEntity entity, javax.persistence.EntityManager em, StoreFactory storeFactory)
-
-
Method Detail
-
getEntity
public ResourceServerEntity getEntity()
- Specified by:
getEntity
in interfaceJpaModel<ResourceServerEntity>
-
getId
public String 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.true
if the resource server is allowed to managed them remotely- Specified by:
isAllowRemoteResourceManagement
in interfaceResourceServer
-
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
public PolicyEnforcementMode 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
public void setPolicyEnforcementMode(PolicyEnforcementMode enforcementMode)
Description copied from interface:ResourceServer
Defines aPolicyEnforcementMode
for this instance.- Specified by:
setPolicyEnforcementMode
in interfaceResourceServer
- Parameters:
enforcementMode
- one of the available options inPolicyEnforcementMode
-
getDecisionStrategy
public DecisionStrategy getDecisionStrategy()
Description copied from interface:ResourceServer
Returns theDecisionStrategy
configured for this instance.- Specified by:
getDecisionStrategy
in interfaceResourceServer
- Returns:
- the decision strategy
-
setDecisionStrategy
public void setDecisionStrategy(DecisionStrategy decisionStrategy)
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
-
toEntity
public static ResourceServerEntity toEntity(javax.persistence.EntityManager em, ResourceServer resource)
-
-