org.keycloak.connections.jpa.updater.liquibase.conn

## Class DefaultLiquibaseConnectionProvider

- java.lang.Object
- - org.keycloak.connections.jpa.updater.liquibase.conn.DefaultLiquibaseConnectionProvider

- All Implemented Interfaces:
    LiquibaseConnectionProvider, LiquibaseConnectionProviderFactory, Provider, ProviderFactory<LiquibaseConnectionProvider>

      public class DefaultLiquibaseConnectionProvider
      extends Object
      implements LiquibaseConnectionProviderFactory, LiquibaseConnectionProvider

  Author:
    Marek Posolda

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `INDEX_CREATION_THRESHOLD_PARAM`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultLiquibaseConnectionProvider()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `baseLiquibaseInitialization()`
    `void` | `close()` This is called when the server shuts down.
    `LiquibaseConnectionProvider` | `create(KeycloakSession session)`
    `String` | `getId()`
    `liquibase.Liquibase` | `getLiquibase(Connection connection, String defaultSchema)`
    `liquibase.Liquibase` | `getLiquibaseForCustomUpdate(Connection connection, String defaultSchema, String changelogLocation, ClassLoader classloader, String changelogTableName)`
    `void` | `init(Config.Scope config)` Only called once when the factory is first created.
    `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.provider.ProviderFactory

      `order`

- - ### Field Detail

    - #### INDEX_CREATION_THRESHOLD_PARAM

          public static final String INDEX_CREATION_THRESHOLD_PARAM

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DefaultLiquibaseConnectionProvider

          public DefaultLiquibaseConnectionProvider()

  - ### Method Detail

    - #### create

          public LiquibaseConnectionProvider create(KeycloakSession session)

      Specified by:
        `create` in interface `ProviderFactory<LiquibaseConnectionProvider>`

    - #### baseLiquibaseInitialization

          protected void baseLiquibaseInitialization()

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

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

    - #### close

          public void close()

      Description copied from interface: `ProviderFactory`
      This is called when the server shuts down.
      Specified by:
        `close` in interface `Provider`
      Specified by:
        `close` in interface `ProviderFactory<LiquibaseConnectionProvider>`

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `ProviderFactory<LiquibaseConnectionProvider>`

    - #### getLiquibase

          public liquibase.Liquibase getLiquibase(Connection connection,
                                                  String defaultSchema)
                                           throws liquibase.exception.LiquibaseException

      Specified by:
        `getLiquibase` in interface `LiquibaseConnectionProvider`
      Throws:
        `liquibase.exception.LiquibaseException`

    - #### getLiquibaseForCustomUpdate

          public liquibase.Liquibase getLiquibaseForCustomUpdate(Connection connection,
                                                                 String defaultSchema,
                                                                 String changelogLocation,
                                                                 ClassLoader classloader,
                                                                 String changelogTableName)
                                                          throws liquibase.exception.LiquibaseException

      Specified by:
        `getLiquibaseForCustomUpdate` in interface `LiquibaseConnectionProvider`
      Throws:
        `liquibase.exception.LiquibaseException`

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