Class ResourceAdapter
- java.lang.Object
-
- org.keycloak.models.cache.infinispan.authorization.ResourceAdapter
-
- All Implemented Interfaces:
CachedModel<Resource>,Resource
public class ResourceAdapter extends Object implements Resource, CachedModel<Resource>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.authorization.model.Resource
Resource.FilterOption, Resource.SearchableFields
-
-
Field Summary
Fields Modifier and Type Field Description protected CachedResourcecachedprotected StoreFactoryCacheSessioncacheSessionprotected booleaninvalidatedprotected List<Scope>scopesprotected Resourceupdated
-
Constructor Summary
Constructors Constructor Description ResourceAdapter(CachedResource cached, StoreFactoryCacheSession cacheSession)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)List<String>getAttribute(String name)Map<String,List<String>>getAttributes()longgetCacheTimestamp()ResourcegetDelegateForUpdate()StringgetDisplayName()StringgetIconUri()StringgetId()StringgetName()StringgetOwner()ResourceServergetResourceServer()List<Scope>getScopes()StringgetSingleAttribute(String name)StringgetType()Set<String>getUris()inthashCode()voidinvalidate()protected voidinvalidateFlag()booleanisOwnerManagedAccess()protected booleanisUpdated()voidremoveAttribute(String name)voidsetAttribute(String name, List<String> values)voidsetDisplayName(String name)voidsetIconUri(String iconUri)voidsetName(String name)voidsetOwnerManagedAccess(boolean ownerManagedAccess)voidsetType(String type)voidupdateScopes(Set<Scope> scopes)voidupdateUris(Set<String> uris)
-
-
-
Field Detail
-
cached
protected final CachedResource cached
-
cacheSession
protected final StoreFactoryCacheSession cacheSession
-
updated
protected Resource updated
-
invalidated
protected boolean invalidated
-
-
Constructor Detail
-
ResourceAdapter
public ResourceAdapter(CachedResource cached, StoreFactoryCacheSession cacheSession)
-
-
Method Detail
-
getDelegateForUpdate
public Resource getDelegateForUpdate()
- Specified by:
getDelegateForUpdatein interfaceCachedModel<Resource>
-
invalidateFlag
protected void invalidateFlag()
-
invalidate
public void invalidate()
- Specified by:
invalidatein interfaceCachedModel<Resource>
-
getCacheTimestamp
public long getCacheTimestamp()
- Specified by:
getCacheTimestampin interfaceCachedModel<Resource>
-
isUpdated
protected boolean isUpdated()
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceResource
-
setDisplayName
public void setDisplayName(String name)
- Specified by:
setDisplayNamein interfaceResource
-
getIconUri
public String getIconUri()
- Specified by:
getIconUriin interfaceResource
-
setIconUri
public void setIconUri(String iconUri)
- Specified by:
setIconUriin interfaceResource
-
getResourceServer
public ResourceServer getResourceServer()
- Specified by:
getResourceServerin interfaceResource
-
updateUris
public void updateUris(Set<String> uris)
- Specified by:
updateUrisin 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> scopes)
- 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
-
-