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