Class PermissionTicketAdapter
- java.lang.Object
-
- org.keycloak.models.cache.infinispan.authorization.PermissionTicketAdapter
-
- All Implemented Interfaces:
CachedModel<PermissionTicket>,PermissionTicket
public class PermissionTicketAdapter extends Object implements PermissionTicket, CachedModel<PermissionTicket>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.authorization.model.PermissionTicket
PermissionTicket.FilterOption, PermissionTicket.SearchableFields
-
-
Field Summary
Fields Modifier and Type Field Description protected CachedPermissionTicketcachedprotected StoreFactoryCacheSessioncacheSessionprotected booleaninvalidatedprotected PermissionTicketupdated
-
Constructor Summary
Constructors Constructor Description PermissionTicketAdapter(CachedPermissionTicket cached, StoreFactoryCacheSession cacheSession)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCacheTimestamp()When was the model was loaded from database.LonggetCreatedTimestamp()PermissionTicketgetDelegateForUpdate()Invalidates the cache for this model and returns a delegate that represents the actual data providerLonggetGrantedTimestamp()StringgetId()Returns the unique identifier for this instance.StringgetOwner()Returns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner.PolicygetPolicy()StringgetRequester()ResourcegetResource()Returns theResourceassociated with this instanceResourceServergetResourceServer()Returns theResourceServerwhere this policy belongs to.ScopegetScope()Returns theScopeassociated with this instanceinthashCode()voidinvalidate()Invalidate the cache for this modelprotected voidinvalidateFlag()booleanisGranted()protected booleanisUpdated()voidsetGrantedTimestamp(Long millis)voidsetPolicy(Policy policy)
-
-
-
Field Detail
-
cached
protected CachedPermissionTicket cached
-
cacheSession
protected StoreFactoryCacheSession cacheSession
-
updated
protected PermissionTicket updated
-
invalidated
protected boolean invalidated
-
-
Constructor Detail
-
PermissionTicketAdapter
public PermissionTicketAdapter(CachedPermissionTicket cached, StoreFactoryCacheSession cacheSession)
-
-
Method Detail
-
getDelegateForUpdate
public PermissionTicket getDelegateForUpdate()
Description copied from interface:CachedModelInvalidates the cache for this model and returns a delegate that represents the actual data provider- Specified by:
getDelegateForUpdatein interfaceCachedModel<PermissionTicket>- Returns:
-
invalidateFlag
protected void invalidateFlag()
-
invalidate
public void invalidate()
Description copied from interface:CachedModelInvalidate the cache for this model- Specified by:
invalidatein interfaceCachedModel<PermissionTicket>
-
getCacheTimestamp
public long getCacheTimestamp()
Description copied from interface:CachedModelWhen was the model was loaded from database.- Specified by:
getCacheTimestampin interfaceCachedModel<PermissionTicket>- Returns:
-
isUpdated
protected boolean isUpdated()
-
getId
public String getId()
Description copied from interface:PermissionTicketReturns the unique identifier for this instance.- Specified by:
getIdin interfacePermissionTicket- Returns:
- the unique identifier for this instance
-
getOwner
public String getOwner()
Description copied from interface:PermissionTicketReturns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner.- Specified by:
getOwnerin interfacePermissionTicket- Returns:
- the owner of this resource
-
getRequester
public String getRequester()
- Specified by:
getRequesterin interfacePermissionTicket
-
isGranted
public boolean isGranted()
- Specified by:
isGrantedin interfacePermissionTicket
-
getCreatedTimestamp
public Long getCreatedTimestamp()
- Specified by:
getCreatedTimestampin interfacePermissionTicket
-
getGrantedTimestamp
public Long getGrantedTimestamp()
- Specified by:
getGrantedTimestampin interfacePermissionTicket
-
setGrantedTimestamp
public void setGrantedTimestamp(Long millis)
- Specified by:
setGrantedTimestampin interfacePermissionTicket
-
getResourceServer
public ResourceServer getResourceServer()
Description copied from interface:PermissionTicketReturns theResourceServerwhere this policy belongs to.- Specified by:
getResourceServerin interfacePermissionTicket- Returns:
- a resource server
-
getPolicy
public Policy getPolicy()
- Specified by:
getPolicyin interfacePermissionTicket
-
setPolicy
public void setPolicy(Policy policy)
- Specified by:
setPolicyin interfacePermissionTicket
-
getResource
public Resource getResource()
Description copied from interface:PermissionTicketReturns theResourceassociated with this instance- Specified by:
getResourcein interfacePermissionTicket- Returns:
- the
Resourceassociated with this instance
-
getScope
public Scope getScope()
Description copied from interface:PermissionTicketReturns theScopeassociated with this instance- Specified by:
getScopein interfacePermissionTicket- Returns:
- the
Scopeassociated with this instance
-
-