Class YamlInitialValueCustomChange
java.lang.Object
ch.tocco.nice2.dbrefactoring.spi.liquibase.JdbcHelper
ch.tocco.nice2.dbrefactoring.impl.data.YamlInitialValueCustomChange
- All Implemented Interfaces:
liquibase.change.custom.CustomChange
,liquibase.change.custom.CustomTaskChange
public class YamlInitialValueCustomChange
extends JdbcHelper
implements liquibase.change.custom.CustomTaskChange
this can be used to read YAML initial values during a liquibase run
usage:
<customChange class="ch.tocco.nice2.dbrefactoring.impl.data.YamlInitialValueCustomChange">
<!-- module where the initial values are -->
<param name="module" value="nice2.userbase"/>
<!--
the file to read, this is used to check the start of the filename, e.g. "Email_template" will find
Email_template.yaml as well as Email_template_type.yaml
-->
<param name="valueFileName" value="Email_template_type.yaml"/>
</customChange>
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.tocco.nice2.dbrefactoring.spi.liquibase.JdbcHelper
JdbcHelper.SqlFunction<A,
B> -
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(liquibase.database.Database database) void
setFileOpener
(liquibase.resource.ResourceAccessor resourceAccessor) void
void
setUp()
void
setValueFileName
(String valueFileName) liquibase.exception.ValidationErrors
validate
(liquibase.database.Database database) Methods inherited from class ch.tocco.nice2.dbrefactoring.spi.liquibase.JdbcHelper
ddlStatement, tableExists, uniqueIndexExists, withConnection, withResultSet, withStatement
-
Field Details
-
initialValueService
-
fragment
-
-
Constructor Details
-
YamlInitialValueCustomChange
public YamlInitialValueCustomChange()
-
-
Method Details
-
execute
public void execute(liquibase.database.Database database) throws liquibase.exception.CustomChangeException - Specified by:
execute
in interfaceliquibase.change.custom.CustomTaskChange
- Throws:
liquibase.exception.CustomChangeException
-
getConfirmationMessage
- Specified by:
getConfirmationMessage
in interfaceliquibase.change.custom.CustomChange
-
setUp
public void setUp() throws liquibase.exception.SetupException- Specified by:
setUp
in interfaceliquibase.change.custom.CustomChange
- Throws:
liquibase.exception.SetupException
-
setFileOpener
public void setFileOpener(liquibase.resource.ResourceAccessor resourceAccessor) - Specified by:
setFileOpener
in interfaceliquibase.change.custom.CustomChange
-
validate
public liquibase.exception.ValidationErrors validate(liquibase.database.Database database) - Specified by:
validate
in interfaceliquibase.change.custom.CustomChange
-
setModule
-
setValueFileName
-