org.keycloak.models.cache.infinispan.authorization

## 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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected CachedPermissionTicket` | `cached`
    `protected StoreFactoryCacheSession` | `cacheSession`
    `protected boolean` | `invalidated`
    `protected PermissionTicket` | `updated`

    - ### Fields inherited from interface org.keycloak.authorization.model.PermissionTicket

      `GRANTED, ID, OWNER, POLICY, POLICY_IS_NOT_NULL, REQUESTER, REQUESTER_IS_NULL, RESOURCE, RESOURCE_NAME, SCOPE, SCOPE_IS_NULL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PermissionTicketAdapter(CachedPermissionTicket cached, StoreFactoryCacheSession cacheSession)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 provider
    `Long` | `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 the `Resource` associated with this instance
    `ResourceServer` | `getResourceServer()` Returns the `ResourceServer` where this policy belongs to.
    `Scope` | `getScope()` Returns the `Scope` associated with this instance
    `int` | `hashCode()`
    `void` | `invalidate()` Invalidate the cache for this model
    `protected void` | `invalidateFlag()`
    `boolean` | `isGranted()`
    `protected boolean` | `isUpdated()`
    `void` | `setGrantedTimestamp(Long millis)`
    `void` | `setPolicy(Policy policy)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### 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 interface `CachedModel<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 interface `CachedModel<PermissionTicket>`

    - #### getCacheTimestamp

          public long getCacheTimestamp()

      Description copied from interface: `CachedModel`
      When was the model was loaded from database.
      Specified by:
        `getCacheTimestamp` in interface `CachedModel<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 interface `PermissionTicket`
      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 interface `PermissionTicket`
      Returns:
        the owner of this resource

    - #### getRequester

          public String getRequester()

      Specified by:
        `getRequester` in interface `PermissionTicket`

    - #### isGranted

          public boolean isGranted()

      Specified by:
        `isGranted` in interface `PermissionTicket`

    - #### getCreatedTimestamp

          public Long getCreatedTimestamp()

      Specified by:
        `getCreatedTimestamp` in interface `PermissionTicket`

    - #### getGrantedTimestamp

          public Long getGrantedTimestamp()

      Specified by:
        `getGrantedTimestamp` in interface `PermissionTicket`

    - #### setGrantedTimestamp

          public void setGrantedTimestamp(Long millis)

      Specified by:
        `setGrantedTimestamp` in interface `PermissionTicket`

    - #### getResourceServer

          public ResourceServer getResourceServer()

      Description copied from interface: `PermissionTicket`
      Returns the `ResourceServer` where this policy belongs to.
      Specified by:
        `getResourceServer` in interface `PermissionTicket`
      Returns:
        a resource server

    - #### getPolicy

          public Policy getPolicy()

      Specified by:
        `getPolicy` in interface `PermissionTicket`

    - #### setPolicy

          public void setPolicy(Policy policy)

      Specified by:
        `setPolicy` in interface `PermissionTicket`

    - #### getResource

          public Resource getResource()

      Description copied from interface: `PermissionTicket`
      Returns the `Resource` associated with this instance
      Specified by:
        `getResource` in interface `PermissionTicket`
      Returns:
        the `Resource` associated with this instance

    - #### getScope

          public Scope getScope()

      Description copied from interface: `PermissionTicket`
      Returns the `Scope` associated with this instance
      Specified by:
        `getScope` in interface `PermissionTicket`
      Returns:
        the `Scope` associated with this instance

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2021 JBoss by Red Hat. All rights reserved.