Class MapJpaLiquibaseUpdaterProvider
- java.lang.Object
-
- org.keycloak.models.map.storage.jpa.liquibase.updater.MapJpaLiquibaseUpdaterProvider
-
- All Implemented Interfaces:
MapJpaUpdaterProvider
,Provider
public class MapJpaLiquibaseUpdaterProvider extends Object implements MapJpaUpdaterProvider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.map.storage.jpa.updater.MapJpaUpdaterProvider
MapJpaUpdaterProvider.Status
-
-
Constructor Summary
Constructors Constructor Description MapJpaLiquibaseUpdaterProvider(KeycloakSession session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
export(Class<?> modelType, Connection connection, String defaultSchema, File file)
Exports the SQL update script for the given model type into the given File.String
getDatabaseShortName()
Returns an all-lower-case short name of the used database.void
update(Class<?> modelType, Connection connection, String defaultSchema)
Updates the Keycloak database for the given model typeprotected void
updateChangeSet(liquibase.Liquibase liquibase)
protected void
updateSynch(Class<?> modelType, Connection connection, File file, String defaultSchema)
MapJpaUpdaterProvider.Status
validate(Class<?> modelType, Connection connection, String defaultSchema)
Checks whether Keycloak database for the given model type is up to date with the most recent changesetsprotected MapJpaUpdaterProvider.Status
validateChangeSet(liquibase.Liquibase liquibase, String changelog)
protected MapJpaUpdaterProvider.Status
validateSynch(Class<?> modelType, Connection connection, String defaultSchema)
-
-
-
Constructor Detail
-
MapJpaLiquibaseUpdaterProvider
public MapJpaLiquibaseUpdaterProvider(KeycloakSession session)
-
-
Method Detail
-
update
public void update(Class<?> modelType, Connection connection, String defaultSchema)
Description copied from interface:MapJpaUpdaterProvider
Updates the Keycloak database for the given model type- Specified by:
update
in interfaceMapJpaUpdaterProvider
- Parameters:
modelType
- Model typeconnection
- DB connectiondefaultSchema
- DB connection
-
export
public void export(Class<?> modelType, Connection connection, String defaultSchema, File file)
Description copied from interface:MapJpaUpdaterProvider
Exports the SQL update script for the given model type into the given File.- Specified by:
export
in interfaceMapJpaUpdaterProvider
- Parameters:
modelType
- Model typeconnection
- DB connectiondefaultSchema
- DB schema to usefile
- File to write to
-
updateSynch
protected void updateSynch(Class<?> modelType, Connection connection, File file, String defaultSchema)
-
updateChangeSet
protected void updateChangeSet(liquibase.Liquibase liquibase) throws liquibase.exception.LiquibaseException, SQLException
- Throws:
liquibase.exception.LiquibaseException
SQLException
-
validate
public MapJpaUpdaterProvider.Status validate(Class<?> modelType, Connection connection, String defaultSchema)
Description copied from interface:MapJpaUpdaterProvider
Checks whether Keycloak database for the given model type is up to date with the most recent changesets- Specified by:
validate
in interfaceMapJpaUpdaterProvider
- Parameters:
modelType
- Model typeconnection
- DB connectiondefaultSchema
- DB schema to use- Returns:
-
validateSynch
protected MapJpaUpdaterProvider.Status validateSynch(Class<?> modelType, Connection connection, String defaultSchema)
-
validateChangeSet
protected MapJpaUpdaterProvider.Status validateChangeSet(liquibase.Liquibase liquibase, String changelog) throws liquibase.exception.LiquibaseException
- Throws:
liquibase.exception.LiquibaseException
-
getDatabaseShortName
public String getDatabaseShortName()
Description copied from interface:MapJpaUpdaterProvider
Returns an all-lower-case short name of the used database.- Specified by:
getDatabaseShortName
in interfaceMapJpaUpdaterProvider
-
-