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(RealmModel realm, ResourceServerEntity entity, javax.persistence.EntityManager em, StoreFactory storeFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetClientId()Returns id of a client that thisResourceServeris associated withDecisionStrategygetDecisionStrategy()Returns theDecisionStrategyconfigured for this instance.ResourceServerEntitygetEntity()StringgetId()Returns the unique identifier for this instance.PolicyEnforcementModegetPolicyEnforcementMode()Returns thePolicyEnforcementModeconfigured for this instance.RealmModelgetRealm()Returns reference of a realm that thisResourceServerbelongs to.inthashCode()booleanisAllowRemoteResourceManagement()Indicates if the resource server is allowed to manage its own resources remotely using the Protection API.voidsetAllowRemoteResourceManagement(boolean allowRemoteResourceManagement)Indicates if the resource server is allowed to manage its own resources remotely using the Protection API.voidsetDecisionStrategy(DecisionStrategy decisionStrategy)Defines aDecisionStrategyfor this instance, indicating how permissions should be granted depending on the givendecisionStrategy.voidsetPolicyEnforcementMode(PolicyEnforcementMode enforcementMode)Defines aPolicyEnforcementModefor this instance.static ResourceServerEntitytoEntity(javax.persistence.EntityManager em, ResourceServer resource)-
Methods inherited from class org.keycloak.authorization.model.AbstractAuthorizationModel
throwExceptionIfReadonly
-
-
-
-
Constructor Detail
-
ResourceServerAdapter
public ResourceServerAdapter(RealmModel realm, ResourceServerEntity entity, javax.persistence.EntityManager em, StoreFactory storeFactory)
-
-
Method Detail
-
getEntity
public ResourceServerEntity getEntity()
- Specified by:
getEntityin interfaceJpaModel<ResourceServerEntity>
-
getId
public String getId()
Description copied from interface:ResourceServerReturns the unique identifier for this instance.- Specified by:
getIdin interfaceResourceServer- Returns:
- the unique identifier for this instance
-
isAllowRemoteResourceManagement
public boolean isAllowRemoteResourceManagement()
Description copied from interface:ResourceServerIndicates if the resource server is allowed to manage its own resources remotely using the Protection API.- Specified by:
isAllowRemoteResourceManagementin interfaceResourceServer- Returns:
trueif the resource server is allowed to managed them remotely
-
setAllowRemoteResourceManagement
public void setAllowRemoteResourceManagement(boolean allowRemoteResourceManagement)
Description copied from interface:ResourceServerIndicates if the resource server is allowed to manage its own resources remotely using the Protection API.- Specified by:
setAllowRemoteResourceManagementin interfaceResourceServer- Parameters:
allowRemoteResourceManagement-trueif the resource server is allowed to managed them remotely
-
getPolicyEnforcementMode
public PolicyEnforcementMode getPolicyEnforcementMode()
Description copied from interface:ResourceServerReturns thePolicyEnforcementModeconfigured for this instance.- Specified by:
getPolicyEnforcementModein interfaceResourceServer- Returns:
- the
PolicyEnforcementModeconfigured for this instance.
-
setPolicyEnforcementMode
public void setPolicyEnforcementMode(PolicyEnforcementMode enforcementMode)
Description copied from interface:ResourceServerDefines aPolicyEnforcementModefor this instance.- Specified by:
setPolicyEnforcementModein interfaceResourceServer- Parameters:
enforcementMode- one of the available options inPolicyEnforcementMode
-
getDecisionStrategy
public DecisionStrategy getDecisionStrategy()
Description copied from interface:ResourceServerReturns theDecisionStrategyconfigured for this instance.- Specified by:
getDecisionStrategyin interfaceResourceServer- Returns:
- the decision strategy
-
setDecisionStrategy
public void setDecisionStrategy(DecisionStrategy decisionStrategy)
Description copied from interface:ResourceServerDefines aDecisionStrategyfor this instance, indicating how permissions should be granted depending on the givendecisionStrategy.- Specified by:
setDecisionStrategyin interfaceResourceServer- Parameters:
decisionStrategy- the decision strategy
-
getClientId
public String getClientId()
Description copied from interface:ResourceServerReturns id of a client that thisResourceServeris associated with- Specified by:
getClientIdin interfaceResourceServer- Returns:
- id of client
-
getRealm
public RealmModel getRealm()
Description copied from interface:ResourceServerReturns reference of a realm that thisResourceServerbelongs to.- Specified by:
getRealmin interfaceResourceServer- Returns:
- reference of a realm
-
toEntity
public static ResourceServerEntity toEntity(javax.persistence.EntityManager em, ResourceServer resource)
-
-