Class ResourceAdapter
- java.lang.Object
-
- org.keycloak.authorization.model.AbstractAuthorizationModel
-
- org.keycloak.authorization.jpa.store.ResourceAdapter
-
- All Implemented Interfaces:
Resource,JpaModel<ResourceEntity>
public class ResourceAdapter extends AbstractAuthorizationModel implements Resource, JpaModel<ResourceEntity>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.authorization.model.Resource
Resource.FilterOption, Resource.SearchableFields
-
-
Constructor Summary
Constructors Constructor Description ResourceAdapter(ResourceEntity 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)List<String>getAttribute(String name)Map<String,List<String>>getAttributes()StringgetDisplayName()ResourceEntitygetEntity()StringgetIconUri()StringgetId()StringgetName()StringgetOwner()StringgetResourceServer()List<Scope>getScopes()StringgetSingleAttribute(String name)StringgetType()Set<String>getUris()inthashCode()booleanisOwnerManagedAccess()voidremoveAttribute(String name)voidsetAttribute(String name, List<String> values)voidsetDisplayName(String name)voidsetIconUri(String iconUri)voidsetName(String name)voidsetOwnerManagedAccess(boolean ownerManagedAccess)voidsetType(String type)static ResourceEntitytoEntity(javax.persistence.EntityManager em, Resource resource)voidupdateScopes(Set<Scope> toUpdate)voidupdateUris(Set<String> uri)-
Methods inherited from class org.keycloak.authorization.model.AbstractAuthorizationModel
throwExceptionIfReadonly
-
-
-
-
Constructor Detail
-
ResourceAdapter
public ResourceAdapter(ResourceEntity entity, javax.persistence.EntityManager em, StoreFactory storeFactory)
-
-
Method Detail
-
getEntity
public ResourceEntity getEntity()
- Specified by:
getEntityin interfaceJpaModel<ResourceEntity>
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceResource
-
setDisplayName
public void setDisplayName(String name)
- Specified by:
setDisplayNamein interfaceResource
-
updateUris
public void updateUris(Set<String> uri)
- Specified by:
updateUrisin interfaceResource
-
getIconUri
public String getIconUri()
- Specified by:
getIconUriin interfaceResource
-
setIconUri
public void setIconUri(String iconUri)
- Specified by:
setIconUriin interfaceResource
-
getResourceServer
public String getResourceServer()
- Specified by:
getResourceServerin interfaceResource
-
isOwnerManagedAccess
public boolean isOwnerManagedAccess()
- Specified by:
isOwnerManagedAccessin interfaceResource
-
setOwnerManagedAccess
public void setOwnerManagedAccess(boolean ownerManagedAccess)
- Specified by:
setOwnerManagedAccessin interfaceResource
-
updateScopes
public void updateScopes(Set<Scope> toUpdate)
- Specified by:
updateScopesin interfaceResource
-
getAttributes
public Map<String,List<String>> getAttributes()
- Specified by:
getAttributesin interfaceResource
-
getSingleAttribute
public String getSingleAttribute(String name)
- Specified by:
getSingleAttributein interfaceResource
-
getAttribute
public List<String> getAttribute(String name)
- Specified by:
getAttributein interfaceResource
-
setAttribute
public void setAttribute(String name, List<String> values)
- Specified by:
setAttributein interfaceResource
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttributein interfaceResource
-
toEntity
public static ResourceEntity toEntity(javax.persistence.EntityManager em, Resource resource)
-
-