Top Fields Constructors Methods
liquibase.command.core

public Class SnapshotCommandStep

extends AbstractCommandStep
Class Inheritance
Annotations
@lombok.Getter
Imports
liquibase.CatalogAndSchema, .GlobalConfiguration, liquibase.command.*, liquibase.database.Database, .ObjectQuotingStrategy, liquibase.serializer.SnapshotSerializerFactory, liquibase.snapshot.DatabaseSnapshot, .SnapshotControl, .SnapshotGeneratorFactory, liquibase.structure.DatabaseObject, liquibase.util.StringUtil, lombok.Getter, java.io.IOException, .OutputStream, .OutputStreamWriter, .Writer, java.util.*

Field Summary

Modifier and TypeField and Description
public static final String[]
public static final CommandArgumentDefinition<String>
public static final CommandArgumentDefinition<SnapshotControl>
public static final CommandArgumentDefinition<String>
private Map<String, Object>
Inherited from liquibase.command.AbstractCommandStep:
coreBundle

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
protected SnapshotControl
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"}}.

private Writer
getOutputWriter(final OutputStream outputStream)

private CatalogAndSchema[]
parseSchemas(Database database, String... schemas)

private String
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.

Inherited from liquibase.command.AbstractCommandStep:
getOrderprovidedDependenciesvalidate

Field Detail

COMMAND_NAMEback to summary
public static final String[] COMMAND_NAME
SCHEMAS_ARGback to summary
public static final CommandArgumentDefinition<String> SCHEMAS_ARG
SNAPSHOT_CONTROL_ARGback to summary
public static final CommandArgumentDefinition<SnapshotControl> SNAPSHOT_CONTROL_ARG
SNAPSHOT_FORMAT_ARGback to summary
public static final CommandArgumentDefinition<String> SNAPSHOT_FORMAT_ARG
snapshotMetadataback to summary
private Map<String, Object> snapshotMetadata

Constructor Detail

SnapshotCommandStepback to summary
public SnapshotCommandStep()

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
createSnapshotControlback to summary
protected SnapshotControl createSnapshotControl(CommandScope commandScope, Database database)
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
getOutputWriterback to summary
private Writer getOutputWriter(final OutputStream outputStream) throws IOException
parseSchemasback to summary
private CatalogAndSchema[] parseSchemas(Database database, String... schemas)
printSnapshotback to summary
private String printSnapshot(CommandScope commandScope, DatabaseSnapshot snapshot)
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