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
Modifier and TypeFieldDescriptionprotected CachedPermissionTicket
protected StoreFactoryCacheSession
protected boolean
protected PermissionTicket
-
Constructor Summary
ConstructorDescriptionPermissionTicketAdapter
(CachedPermissionTicket cached, StoreFactoryCacheSession cacheSession) -
Method Summary
Modifier and TypeMethodDescriptionlong
When was the model was loaded from database.Invalidates the cache for this model and returns a delegate that represents the actual data providergetId()
Returns the unique identifier for this instance.getOwner()
Returns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner.Returns theResource
associated with this instanceReturns theResourceServer
where this policy belongs to.getScope()
Returns theScope
associated with this instanceint
hashCode()
void
Invalidate the cache for this modelprotected void
boolean
protected boolean
void
setGrantedTimestamp
(Long millis) void
-
Field Details
-
cached
-
cacheSession
-
updated
-
invalidated
protected boolean invalidated
-
-
Constructor Details
-
PermissionTicketAdapter
public PermissionTicketAdapter(CachedPermissionTicket cached, StoreFactoryCacheSession cacheSession)
-
-
Method Details
-
getDelegateForUpdate
Description copied from interface:CachedModel
Invalidates the cache for this model and returns a delegate that represents the actual data provider- Specified by:
getDelegateForUpdate
in interfaceCachedModel<PermissionTicket>
- Returns:
-
invalidateFlag
protected void invalidateFlag() -
invalidate
public void invalidate()Description copied from interface:CachedModel
Invalidate the cache for this model- Specified by:
invalidate
in interfaceCachedModel<PermissionTicket>
-
getCacheTimestamp
public long getCacheTimestamp()Description copied from interface:CachedModel
When was the model was loaded from database.- Specified by:
getCacheTimestamp
in interfaceCachedModel<PermissionTicket>
- Returns:
-
isUpdated
protected boolean isUpdated() -
getId
Description copied from interface:PermissionTicket
Returns the unique identifier for this instance.- Specified by:
getId
in interfacePermissionTicket
- Returns:
- the unique identifier for this instance
-
getOwner
Description copied from interface:PermissionTicket
Returns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner.- Specified by:
getOwner
in interfacePermissionTicket
- Returns:
- the owner of this resource
-
getRequester
- Specified by:
getRequester
in interfacePermissionTicket
-
isGranted
public boolean isGranted()- Specified by:
isGranted
in interfacePermissionTicket
-
getCreatedTimestamp
- Specified by:
getCreatedTimestamp
in interfacePermissionTicket
-
getGrantedTimestamp
- Specified by:
getGrantedTimestamp
in interfacePermissionTicket
-
setGrantedTimestamp
- Specified by:
setGrantedTimestamp
in interfacePermissionTicket
-
getResourceServer
Description copied from interface:PermissionTicket
Returns theResourceServer
where this policy belongs to.- Specified by:
getResourceServer
in interfacePermissionTicket
- Returns:
- a resource server
-
getPolicy
- Specified by:
getPolicy
in interfacePermissionTicket
-
setPolicy
- Specified by:
setPolicy
in interfacePermissionTicket
-
getResource
Description copied from interface:PermissionTicket
Returns theResource
associated with this instance- Specified by:
getResource
in interfacePermissionTicket
- Returns:
- the
Resource
associated with this instance
-
getScope
Description copied from interface:PermissionTicket
Returns theScope
associated with this instance- Specified by:
getScope
in interfacePermissionTicket
- Returns:
- the
Scope
associated with this instance
-
hashCode
public int hashCode()
-