org.keycloak.models.map.common

## Class AbstractMapProviderFactory<T extends Provider,K,V extends AbstractEntity<K>,M>

- java.lang.Object
- - org.keycloak.models.map.common.AbstractMapProviderFactory<T,K,V,M>

- All Implemented Interfaces:
    AmphibianProviderFactory<T>, ComponentFactory<T,T>, ConfiguredProvider, EnvironmentDependentProviderFactory, ProviderFactory<T>
  Direct Known Subclasses:
    MapClientProviderFactory, MapClientScopeProviderFactory, MapGroupProviderFactory, MapRealmProviderFactory, MapRoleProviderFactory, MapRootAuthenticationSessionProviderFactory, MapUserLoginFailureProviderFactory, MapUserProviderFactory

      public abstract class AbstractMapProviderFactory<T extends Provider,K,V extends AbstractEntity<K>,M>
      extends Object
      implements AmphibianProviderFactory<T>, EnvironmentDependentProviderFactory

  Author:
    hmlnarik

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CONFIG_STORAGE`
    `protected Class<V>` | `entityType`
    `protected org.jboss.logging.Logger` | `LOG`
    `protected Class<M>` | `modelType`
    `static String` | `PROVIDER_ID`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractMapProviderFactory(Class<? extends AbstractEntity> entityType, Class<M> modelType)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getId()`
    `protected MapStorage<K,V,M>` | `getStorage(KeycloakSession session)`
    `void` | `init(Config.Scope config)` Only called once when the factory is first created.
    `boolean` | `isSupported()`
    `void` | `postInit(KeycloakSessionFactory factory)` Called after all provider factories have been initialized

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

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

    - ### Methods inherited from interface org.keycloak.component.AmphibianProviderFactory

      `close, create, create, getConfigProperties, onUpdate, preRemove`

    - ### Methods inherited from interface org.keycloak.component.ComponentFactory

      `getCommonProviderConfigProperties, getTypeMetadata, onCreate, validateConfiguration`

    - ### Methods inherited from interface org.keycloak.provider.ProviderFactory

      `order`

    - ### Methods inherited from interface org.keycloak.provider.ConfiguredProvider

      `getHelpText`

- - ### Field Detail

    - #### PROVIDER_ID

          public static final String PROVIDER_ID

      See Also:
        Constant Field Values

    - #### CONFIG_STORAGE

          public static final String CONFIG_STORAGE

      See Also:
        Constant Field Values

    - #### LOG

          protected final org.jboss.logging.Logger LOG

    - #### modelType

          protected final Class<M> modelType

    - #### entityType

          protected final Class<V extends AbstractEntity<K>> entityType

  - ### Constructor Detail

    - #### AbstractMapProviderFactory

          protected AbstractMapProviderFactory(Class<? extends AbstractEntity> entityType,
                                               Class<M> modelType)

  - ### Method Detail

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `ProviderFactory<T extends Provider>`

    - #### getStorage

          protected MapStorage<K,V,M> getStorage(KeycloakSession session)

    - #### postInit

          public void postInit(KeycloakSessionFactory factory)

      Description copied from interface: `ProviderFactory`
      Called after all provider factories have been initialized
      Specified by:
        `postInit` in interface `ProviderFactory<T extends Provider>`

    - #### init

          public void init(Config.Scope config)

      Description copied from interface: `ProviderFactory`
      Only called once when the factory is first created. This config is pulled from keycloak_server.json
      Specified by:
        `init` in interface `ProviderFactory<T extends Provider>`

    - #### isSupported

          public boolean isSupported()

      Specified by:
        `isSupported` in interface `EnvironmentDependentProviderFactory`
      Returns:
        `true` if the provider is supported and should be available, `false` otherwise

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