org.keycloak.models.cache.infinispan.authorization

## Class StoreFactoryCacheSession

- java.lang.Object
- - org.keycloak.models.cache.infinispan.authorization.StoreFactoryCacheSession

- All Implemented Interfaces:
    StoreFactory, CachedStoreFactoryProvider, Provider

      public class StoreFactoryCacheSession
      extends Object
      implements CachedStoreFactoryProvider

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `StoreFactoryCacheSession.PermissionTicketCache`
    `protected class` | `StoreFactoryCacheSession.PolicyCache`
    `protected class` | `StoreFactoryCacheSession.ResourceCache`
    `protected class` | `StoreFactoryCacheSession.ResourceServerCache`
    `protected class` | `StoreFactoryCacheSession.ScopeCache`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected StoreFactoryCacheManager` | `cache`
    `protected boolean` | `clearAll`
    `protected StoreFactory` | `delegate`
    `protected Set<InvalidationEvent>` | `invalidationEvents`
    `protected Set<String>` | `invalidations`
    `protected static org.jboss.logging.Logger` | `logger`
    `protected Map<String,PermissionTicketAdapter>` | `managedPermissionTickets`
    `protected Map<String,PolicyAdapter>` | `managedPolicies`
    `protected Map<String,ResourceAdapter>` | `managedResources`
    `protected Map<String,ResourceServerAdapter>` | `managedResourceServers`
    `protected Map<String,ScopeAdapter>` | `managedScopes`
    `protected StoreFactoryCacheSession.PermissionTicketCache` | `permissionTicketCache`
    `protected StoreFactoryCacheSession.PolicyCache` | `policyCache`
    `protected StoreFactoryCacheSession.ResourceCache` | `resourceCache`
    `protected StoreFactoryCacheSession.ResourceServerCache` | `resourceServerCache`
    `protected StoreFactoryCacheSession.ScopeCache` | `scopeCache`
    `protected KeycloakSession` | `session`
    `protected boolean` | `setRollbackOnly`
    `protected long` | `startupRevision`
    `protected boolean` | `transactionActive`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StoreFactoryCacheSession(StoreFactoryCacheManager cache, KeycloakSession session)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `StoreFactory` | `getDelegate()`
    `static String` | `getPermissionTicketByGranted(String userId, String serverId)`
    `static String` | `getPermissionTicketByOwner(String owner, String serverId)`
    `static String` | `getPermissionTicketByResource(String resourceId, String serverId)`
    `static String` | `getPermissionTicketByResourceNameAndGranted(String resourceName, String userId, String serverId)`
    `static String` | `getPermissionTicketByScope(String scopeId, String serverId)`
    `PermissionTicketStore` | `getPermissionTicketStore()` Returns a `PermissionTicketStore`.
    `PermissionTicketStore` | `getPermissionTicketStoreDelegate()`
    `static String` | `getPolicyByNameCacheKey(String name, String serverId)`
    `static String` | `getPolicyByResource(String resourceId, String serverId)`
    `static String` | `getPolicyByResourceScope(String scope, String resourceId, String serverId)`
    `static String` | `getPolicyByResourceType(String type, String serverId)`
    `static String` | `getPolicyByScope(String scope, String serverId)`
    `PolicyStore` | `getPolicyStore()` Returns a `PolicyStore`.
    `PolicyStore` | `getPolicyStoreDelegate()`
    `static String` | `getResourceByNameCacheKey(String name, String ownerId, String serverId)`
    `static String` | `getResourceByOwnerCacheKey(String owner, String serverId)`
    `static String` | `getResourceByScopeCacheKey(String scopeId, String serverId)`
    `static String` | `getResourceByTypeCacheKey(String type, String serverId)`
    `static String` | `getResourceByTypeCacheKey(String type, String owner, String serverId)`
    `static String` | `getResourceByTypeInstanceCacheKey(String type, String serverId)`
    `static String` | `getResourceByUriCacheKey(String uri, String serverId)`
    `static String` | `getResourceServerByClientCacheKey(String clientId)`
    `ResourceServerStore` | `getResourceServerStore()` Returns a `ResourceServerStore`.
    `ResourceServerStore` | `getResourceServerStoreDelegate()`
    `ResourceStore` | `getResourceStore()` Returns a `ResourceStore`.
    `ResourceStore` | `getResourceStoreDelegate()`
    `static String` | `getScopeByNameCacheKey(String name, String serverId)`
    `ScopeStore` | `getScopeStore()` Returns a `ScopeStore`.
    `ScopeStore` | `getScopeStoreDelegate()`
    `long` | `getStartupRevision()`
    `boolean` | `isInvalid(String id)`
    `boolean` | `isReadOnly()` Indicates if instances returned from storage are read-only.
    `void` | `registerPermissionTicketInvalidation(String id, String owner, String requester, String resource, String resourceName, String scope, String serverId)`
    `void` | `registerPolicyInvalidation(String id, String name, Set<String> resources, Set<String> scopes, String defaultResourceType, String serverId)`
    `void` | `registerResourceInvalidation(String id, String name, String type, Set<String> uris, Set<String> scopes, String serverId, String owner)`
    `void` | `registerResourceServerInvalidation(String id)`
    `void` | `registerScopeInvalidation(String id, String name, String serverId)`
    `protected void` | `runInvalidations()`
    `void` | `setReadOnly(boolean readOnly)` Sets whether or not changes to instances returned from this factory are supported.

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

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

- - ### Field Detail

    - #### logger

          protected static final org.jboss.logging.Logger logger

    - #### cache

          protected StoreFactoryCacheManager cache

    - #### transactionActive

          protected boolean transactionActive

    - #### setRollbackOnly

          protected boolean setRollbackOnly

    - #### managedResourceServers

          protected Map<String,ResourceServerAdapter> managedResourceServers

    - #### managedScopes

          protected Map<String,ScopeAdapter> managedScopes

    - #### managedResources

          protected Map<String,ResourceAdapter> managedResources

    - #### managedPolicies

          protected Map<String,PolicyAdapter> managedPolicies

    - #### managedPermissionTickets

          protected Map<String,PermissionTicketAdapter> managedPermissionTickets

    - #### invalidations

          protected Set<String> invalidations

    - #### invalidationEvents

          protected Set<InvalidationEvent> invalidationEvents

    - #### clearAll

          protected boolean clearAll

    - #### startupRevision

          protected final long startupRevision

    - #### delegate

          protected StoreFactory delegate

    - #### session

          protected KeycloakSession session

    - #### resourceServerCache

          protected StoreFactoryCacheSession.ResourceServerCache resourceServerCache

    - #### scopeCache

          protected StoreFactoryCacheSession.ScopeCache scopeCache

    - #### resourceCache

          protected StoreFactoryCacheSession.ResourceCache resourceCache

    - #### policyCache

          protected StoreFactoryCacheSession.PolicyCache policyCache

    - #### permissionTicketCache

          protected StoreFactoryCacheSession.PermissionTicketCache permissionTicketCache

  - ### Constructor Detail

    - #### StoreFactoryCacheSession

          public StoreFactoryCacheSession(StoreFactoryCacheManager cache,
                                          KeycloakSession session)

  - ### Method Detail

    - #### getResourceServerStore

          public ResourceServerStore getResourceServerStore()

      Description copied from interface: `StoreFactory`
      Returns a `ResourceServerStore`.
      Specified by:
        `getResourceServerStore` in interface `StoreFactory`
      Returns:
        the resource server store

    - #### getScopeStore

          public ScopeStore getScopeStore()

      Description copied from interface: `StoreFactory`
      Returns a `ScopeStore`.
      Specified by:
        `getScopeStore` in interface `StoreFactory`
      Returns:
        the scope store

    - #### getResourceStore

          public ResourceStore getResourceStore()

      Description copied from interface: `StoreFactory`
      Returns a `ResourceStore`.
      Specified by:
        `getResourceStore` in interface `StoreFactory`
      Returns:
        the resource store

    - #### getPolicyStore

          public PolicyStore getPolicyStore()

      Description copied from interface: `StoreFactory`
      Returns a `PolicyStore`.
      Specified by:
        `getPolicyStore` in interface `StoreFactory`
      Returns:
        the policy store

    - #### getPermissionTicketStore

          public PermissionTicketStore getPermissionTicketStore()

      Description copied from interface: `StoreFactory`
      Returns a `PermissionTicketStore`.
      Specified by:
        `getPermissionTicketStore` in interface `StoreFactory`
      Returns:
        the permission ticket store

    - #### setReadOnly

          public void setReadOnly(boolean readOnly)

      Description copied from interface: `StoreFactory`
      Sets whether or not changes to instances returned from this factory are supported. Once marked as read-only, any attempt to change state will throw an `IllegalStateException`.
      Specified by:
        `setReadOnly` in interface `StoreFactory`
      Parameters:
        `readOnly` - if true, changes are not supported

    - #### isReadOnly

          public boolean isReadOnly()

      Description copied from interface: `StoreFactory`
      Indicates if instances returned from storage are read-only.
      Specified by:
        `isReadOnly` in interface `StoreFactory`
      Returns:
        if true, instances only support reads.

    - #### close

          public void close()

      Specified by:
        `close` in interface `Provider`

    - #### runInvalidations

          protected void runInvalidations()

    - #### getStartupRevision

          public long getStartupRevision()

    - #### isInvalid

          public boolean isInvalid(String id)

    - #### registerResourceServerInvalidation

          public void registerResourceServerInvalidation(String id)

    - #### registerScopeInvalidation

          public void registerScopeInvalidation(String id,
                                                String name,
                                                String serverId)

    - #### registerResourceInvalidation

          public void registerResourceInvalidation(String id,
                                                   String name,
                                                   String type,
                                                   Set<String> uris,
                                                   Set<String> scopes,
                                                   String serverId,
                                                   String owner)

    - #### registerPolicyInvalidation

          public void registerPolicyInvalidation(String id,
                                                 String name,
                                                 Set<String> resources,
                                                 Set<String> scopes,
                                                 String defaultResourceType,
                                                 String serverId)

    - #### registerPermissionTicketInvalidation

          public void registerPermissionTicketInvalidation(String id,
                                                           String owner,
                                                           String requester,
                                                           String resource,
                                                           String resourceName,
                                                           String scope,
                                                           String serverId)

    - #### getResourceServerStoreDelegate

          public ResourceServerStore getResourceServerStoreDelegate()

    - #### getScopeStoreDelegate

          public ScopeStore getScopeStoreDelegate()

    - #### getResourceStoreDelegate

          public ResourceStore getResourceStoreDelegate()

    - #### getPolicyStoreDelegate

          public PolicyStore getPolicyStoreDelegate()

    - #### getPermissionTicketStoreDelegate

          public PermissionTicketStore getPermissionTicketStoreDelegate()

    - #### getResourceServerByClientCacheKey

          public static String getResourceServerByClientCacheKey(String clientId)

    - #### getScopeByNameCacheKey

          public static String getScopeByNameCacheKey(String name,
                                                      String serverId)

    - #### getResourceByNameCacheKey

          public static String getResourceByNameCacheKey(String name,
                                                         String ownerId,
                                                         String serverId)

    - #### getResourceByOwnerCacheKey

          public static String getResourceByOwnerCacheKey(String owner,
                                                          String serverId)

    - #### getResourceByTypeCacheKey

          public static String getResourceByTypeCacheKey(String type,
                                                         String serverId)

    - #### getResourceByTypeCacheKey

          public static String getResourceByTypeCacheKey(String type,
                                                         String owner,
                                                         String serverId)

    - #### getResourceByTypeInstanceCacheKey

          public static String getResourceByTypeInstanceCacheKey(String type,
                                                                 String serverId)

    - #### getResourceByUriCacheKey

          public static String getResourceByUriCacheKey(String uri,
                                                        String serverId)

    - #### getResourceByScopeCacheKey

          public static String getResourceByScopeCacheKey(String scopeId,
                                                          String serverId)

    - #### getPolicyByNameCacheKey

          public static String getPolicyByNameCacheKey(String name,
                                                       String serverId)

    - #### getPolicyByResource

          public static String getPolicyByResource(String resourceId,
                                                   String serverId)

    - #### getPolicyByResourceType

          public static String getPolicyByResourceType(String type,
                                                       String serverId)

    - #### getPolicyByScope

          public static String getPolicyByScope(String scope,
                                                String serverId)

    - #### getPolicyByResourceScope

          public static String getPolicyByResourceScope(String scope,
                                                        String resourceId,
                                                        String serverId)

    - #### getPermissionTicketByResource

          public static String getPermissionTicketByResource(String resourceId,
                                                             String serverId)

    - #### getPermissionTicketByScope

          public static String getPermissionTicketByScope(String scopeId,
                                                          String serverId)

    - #### getPermissionTicketByGranted

          public static String getPermissionTicketByGranted(String userId,
                                                            String serverId)

    - #### getPermissionTicketByResourceNameAndGranted

          public static String getPermissionTicketByResourceNameAndGranted(String resourceName,
                                                                           String userId,
                                                                           String serverId)

    - #### getPermissionTicketByOwner

          public static String getPermissionTicketByOwner(String owner,
                                                          String serverId)

    - #### getDelegate

          public StoreFactory getDelegate()

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