Top Fields Constructors Methods
liquibase.command.core

public Class GenerateChangelogCommandStep

extends AbstractChangelogCommandStep
Class Inheritance
Imports
liquibase.Scope, liquibase.command.*, liquibase.command.core.helpers.AbstractChangelogCommandStep, .DbUrlConnectionArgumentsCommandStep, .DiffOutputControlCommandStep, .ReferenceDbUrlConnectionCommandStep, liquibase.command.providers.ReferenceDatabase, liquibase.configuration.ConfigurationValueObfuscator, liquibase.database.Database, .ObjectQuotingStrategy, liquibase.diff.DiffResult, liquibase.diff.output.DiffOutputControl, liquibase.diff.output.changelog.DiffToChangeLog, liquibase.exception.CommandValidationException, liquibase.resource.PathHandlerFactory, .Resource, liquibase.util.StringUtil, .ValueHandlerUtil, java.io.IOException, .PrintStream, java.util.Arrays, .List, java.util.stream.Collectors

Field Summary

Modifier and TypeField and Description
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final String[]
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
private static final String
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<Boolean>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<Boolean>
Inherited from liquibase.command.core.helpers.AbstractChangelogCommandStep:
REPLACE_IF_EXISTS_TYPES_ARGRUN_ON_CHANGE_TYPES_ARG

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
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.

public void
validate(CommandScope commandScope)

Overrides liquibase.command.AbstractCommandStep.validate.

Implements liquibase.command.CommandStep.validate.

Default implementation does no additional validation.

private static void
validateConditionsToOverwriteChangelogFile(CommandScope commandScope)

If the changelog file already exists, validate if overwriteOutputFile is true.

Inherited from liquibase.command.core.helpers.AbstractChangelogCommandStep:
supportedReplaceIfExistsTypessupportedRunOnChangeTypesvalidateReplaceIfExistsTypesvalidateRunOnChangeTypes

Field Detail

AUTHOR_ARGback to summary
public static final CommandArgumentDefinition<String> AUTHOR_ARG
CHANGELOG_FILE_ARGback to summary
public static final CommandArgumentDefinition<String> CHANGELOG_FILE_ARG
COMMAND_NAMEback to summary
public static final String[] COMMAND_NAME

Hides liquibase.command.core.helpers.AbstractChangelogCommandStep.COMMAND_NAME.

CONTEXT_ARGback to summary
public static final CommandArgumentDefinition<String> CONTEXT_ARG
CONTEXTS_ARGback to summary
public static final CommandArgumentDefinition<String> CONTEXTS_ARG
DATA_OUTPUT_DIR_ARGback to summary
public static final CommandArgumentDefinition<String> DATA_OUTPUT_DIR_ARG
INFO_MESSAGEback to summary
private static final String INFO_MESSAGE
LABEL_FILTER_ARGback to summary
public static final CommandArgumentDefinition<String> LABEL_FILTER_ARG
OVERWRITE_OUTPUT_FILE_ARGback to summary
public static final CommandArgumentDefinition<Boolean> OVERWRITE_OUTPUT_FILE_ARG
REFERENCE_DEFAULT_CATALOG_NAME_ARGback to summary
public static final CommandArgumentDefinition<String> REFERENCE_DEFAULT_CATALOG_NAME_ARG
REFERENCE_DEFAULT_SCHEMA_NAME_ARGback to summary
public static final CommandArgumentDefinition<String> REFERENCE_DEFAULT_SCHEMA_NAME_ARG
REFERENCE_DRIVER_ARGback to summary
public static final CommandArgumentDefinition<String> REFERENCE_DRIVER_ARG
REFERENCE_DRIVER_PROPERTIES_FILE_ARGback to summary
public static final CommandArgumentDefinition<String> REFERENCE_DRIVER_PROPERTIES_FILE_ARG
REFERENCE_LIQUIBASE_CATALOG_NAME_ARGback to summary
public static final CommandArgumentDefinition<String> REFERENCE_LIQUIBASE_CATALOG_NAME_ARG
REFERENCE_LIQUIBASE_SCHEMA_NAME_ARGback to summary
public static final CommandArgumentDefinition<String> REFERENCE_LIQUIBASE_SCHEMA_NAME_ARG
REFERENCE_PASSWORD_ARGback to summary
public static final CommandArgumentDefinition<String> REFERENCE_PASSWORD_ARG
REFERENCE_SCHEMAS_ARGback to summary
public static final CommandArgumentDefinition<String> REFERENCE_SCHEMAS_ARG
REFERENCE_URL_ARGback to summary
public static final CommandArgumentDefinition<String> REFERENCE_URL_ARG
REFERENCE_USERNAME_ARGback to summary
public static final CommandArgumentDefinition<String> REFERENCE_USERNAME_ARG
USE_OR_REPLACE_OPTIONback to summary
public static final CommandArgumentDefinition<Boolean> USE_OR_REPLACE_OPTION

Constructor Detail

GenerateChangelogCommandStepback to summary
public GenerateChangelogCommandStep()

Method Detail

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
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
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
validateConditionsToOverwriteChangelogFileback to summary
private static void validateConditionsToOverwriteChangelogFile(CommandScope commandScope) throws CommandValidationException

If the changelog file already exists, validate if overwriteOutputFile is true. Otherwise, throws an exception