Top Fields Constructors Methods
liquibase.command.core

public Class ChangelogSyncCommandStep

extends AbstractCommandStep
Class Inheritance
Known Direct Subclasses
liquibase.command.core.ChangelogSyncSqlCommandStep, liquibase.command.core.ChangelogSyncToTagCommandStep
Imports
liquibase.Contexts, .LabelExpression, .RuntimeEnvironment, .Scope, liquibase.changelog.*, liquibase.changelog.filter.*, liquibase.changelog.visitor.ChangeLogSyncVisitor, .DefaultChangeExecListener, liquibase.command.*, liquibase.command.core.helpers.DatabaseChangelogCommandStep, liquibase.database.Database, liquibase.exception.CommandValidationException, .DatabaseException, liquibase.lockservice.LockService, liquibase.logging.mdc.MdcKey, .MdcObject, .MdcValue, liquibase.util.StringUtil, java.util.Arrays, .HashMap, .List, .Map, java.util.concurrent.atomic.AtomicInteger

Field Summary

Modifier and TypeField and Description
public static final String[]
private String
Inherited from liquibase.command.AbstractCommandStep:
coreBundle

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
addChangelogToMdc(String changelogFile, DatabaseChangeLog changeLog)

public void
private ChangeLogIterator
buildChangeLogIterator(String tag, DatabaseChangeLog changeLog, Contexts contexts, LabelExpression labelExpression, Database database)

public String[][]
defineCommandNames()

Implements liquibase.command.CommandStep.defineCommandNames.

Defines new command names For example, if it is part of `liquibase update`, this should return new String[][]{ new String[] {"update"}}.

public List<Class<?>>
requiredDependencies()

Overrides liquibase.command.AbstractCommandStep.requiredDependencies.

Implements liquibase.command.CommandStep.requiredDependencies.

Return a list of configured Classes that this command requires to be passed as a dependency.

public void
run(CommandResultsBuilder resultsBuilder)

Implements liquibase.command.CommandStep.run.

Performs the business logic.

protected void
setTag(String tag)

Tag value can be set by subclasses that implements "SyncToTag"

public void
validate(CommandScope commandScope)

Overrides liquibase.command.AbstractCommandStep.validate.

Implements liquibase.command.CommandStep.validate.

Default implementation does no additional validation.

Inherited from liquibase.command.AbstractCommandStep:
getOrderprovidedDependencies

Field Detail

COMMAND_NAMEback to summary
public static final String[] COMMAND_NAME
tagback to summary
private String tag

Constructor Detail

ChangelogSyncCommandStepback to summary
public ChangelogSyncCommandStep()

Method Detail

addChangelogToMdcback to summary
private void addChangelogToMdc(String changelogFile, DatabaseChangeLog changeLog)
adjustCommandDefinitionback to summary
public void adjustCommandDefinition(CommandDefinition commandDefinition)

Overrides liquibase.command.AbstractCommandStep.adjustCommandDefinition.

Implements liquibase.command.CommandStep.adjustCommandDefinition.

Doc from liquibase.command.AbstractCommandStep.adjustCommandDefinition.

Default implementation makes no changes

Annotations
@Override
buildChangeLogIteratorback to summary
private ChangeLogIterator buildChangeLogIterator(String tag, DatabaseChangeLog changeLog, Contexts contexts, LabelExpression labelExpression, Database database) throws DatabaseException
defineCommandNamesback to summary
public String[][] defineCommandNames()

Implements liquibase.command.CommandStep.defineCommandNames.

Doc from liquibase.command.CommandStep.defineCommandNames.

Defines new command names For example, if it is part of `liquibase update`, this should return new String[][]{ new String[] {"update"}}. If it is a part of `liquibase example init`, this should return {"example", "init"}.

This is used to determine the available command names.

This can return null if this step is not defining a new command but "cross-cutting" existing commands

Annotations
@Override
requiredDependenciesback to summary
public List<Class<?>> requiredDependencies()

Overrides liquibase.command.AbstractCommandStep.requiredDependencies.

Implements liquibase.command.CommandStep.requiredDependencies.

Doc from liquibase.command.CommandStep.requiredDependencies.

Return a list of configured Classes that this command requires to be passed as a dependency.

Returns:List<Class<?>>

list with the required classes types

Annotations
@Override
runback to summary
public void run(CommandResultsBuilder resultsBuilder) throws Exception

Implements liquibase.command.CommandStep.run.

Doc from liquibase.command.CommandStep.run.

Performs the business logic. This method should not be called directly. It is called by the overall pipeline logic in the CommandScope#execute() order.

Annotations
@Override
setTagback to summary
protected void setTag(String tag)

Tag value can be set by subclasses that implements "SyncToTag"

validateback to summary
public void validate(CommandScope commandScope) throws CommandValidationException

Overrides liquibase.command.AbstractCommandStep.validate.

Implements liquibase.command.CommandStep.validate.

Doc from liquibase.command.AbstractCommandStep.validate.

Default implementation does no additional validation.

Annotations
@Override