Top Description Inners Constructors Methods
liquibase.util

public Class ShowSummaryUtil

extends Object
Class Inheritance
Imports
liquibase.*, liquibase.changelog.ChangeLogIterator, .ChangeSet, .ChangeSetStatus, .DatabaseChangeLog, liquibase.changelog.filter.ChangeSetFilter, .ChangeSetFilterResult, .DbmsChangeSetFilter, .ShouldRunChangeSetFilter, liquibase.changelog.visitor.StatusVisitor, liquibase.exception.LiquibaseException, liquibase.logging.mdc.MdcKey, .MdcObject, liquibase.logging.mdc.customobjects.UpdateSummary, liquibase.report.ShowSummaryGenerator, .ShowSummaryGeneratorFactory, lombok.Data, java.io.IOException, .OutputStream, .OutputStreamWriter, .Writer, java.util.*, java.util.concurrent.atomic.AtomicBoolean, java.util.stream.Collectors, .Stream

Methods to show a summary of change set counts after an update

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static interface

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static UpdateSummaryDetails

Returns:

the details of the update summary
buildSummaryDetails
(DatabaseChangeLog
The changelog used in this update
changeLog
,
UpdateSummaryEnum
Flag to control whether we show the summary
showSummary
,
UpdateSummaryOutputEnum
Flag to control where we show the summary
showSummaryOutput
,
StatusVisitor
The StatusVisitor used to determine statuses
statusVisitor
,
OutputStream
The OutputStream to use for the summary
outputStream
,
ChangeLogIterator runChangeLogIterator)

Show a summary of the changesets which were executed AND return an object with the records of what has happened.

private static List<ChangeSetStatus>
createFinalStatusList(List<ChangeSet> skippedChangeSets, List<ChangeSetStatus> filterDenied, SortedMap<String, Integer> mdcSkipCounts)

private static Writer
private static int
private static void
printDetailTable(List<List<String>> table, OutputStream outputStream)

private static ShowSummaryUtil.FilteredChanges
showDetailTable(List<ChangeSet> skippedChangeSets, List<ChangeSetStatus> filterDenied, OutputStream outputStream, boolean shouldPrintDetailTable, UpdateSummaryOutputEnum showSummaryOutput, List<ChangeSetStatus> additionalChangesets, ChangeLogIterator runChangeLogIterator)

private static UpdateSummaryDetails
showSummary(DatabaseChangeLog changeLog, StatusVisitor statusVisitor, List<ChangeSet> skippedChangeSets, List<ChangeSetStatus> filterDenied, OutputStream outputStream, UpdateSummaryOutputEnum showSummaryOutput, ChangeLogIterator runChangeLogIterator)

public static void
showUpdateSummary(DatabaseChangeLog
The changelog used in this update
changeLog
,
UpdateSummaryEnum
Flag to control whether or not we show the summary
showSummary
,
UpdateSummaryOutputEnum
Flag to control where we show the summary
showSummaryOutput
,
StatusVisitor
The StatusVisitor used to determine statuses
statusVisitor
,
OutputStream
The OutputStream to use for the summary
outputStream
)
Deprecated

Show a summary of the changesets which were executed

public static void
showUpdateSummary(DatabaseChangeLog
The changelog used in this update
changeLog
,
UpdateSummaryEnum
Flag to control whether or not we show the summary
showSummary
,
UpdateSummaryOutputEnum
Flag to control where we show the summary
showSummaryOutput
,
StatusVisitor
The StatusVisitor used to determine statuses
statusVisitor
,
OutputStream
The OutputStream to use for the summary
outputStream
,
ChangeLogIterator runChangeLogIterator)

Show a summary of the changesets which were executed

private static void
writeMessage(String message, UpdateSummaryOutputEnum showSummaryOutput, OutputStream outputStream)

private static void
writeToLog(String message)

private static void
writeToOutput(OutputStream outputStream, String message)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ShowSummaryUtilback to summary
public ShowSummaryUtil()

Method Detail

buildSummaryDetailsback to summary
public static UpdateSummaryDetails buildSummaryDetails(DatabaseChangeLog changeLog, UpdateSummaryEnum showSummary, UpdateSummaryOutputEnum showSummaryOutput, StatusVisitor statusVisitor, OutputStream outputStream, ChangeLogIterator runChangeLogIterator) throws LiquibaseException, IOException

Show a summary of the changesets which were executed AND return an object with the records of what has happened.

Parameters
changeLog:DatabaseChangeLog

The changelog used in this update

showSummary:UpdateSummaryEnum

Flag to control whether we show the summary

showSummaryOutput:UpdateSummaryOutputEnum

Flag to control where we show the summary

statusVisitor:StatusVisitor

The StatusVisitor used to determine statuses

outputStream:OutputStream

The OutputStream to use for the summary

Returns:UpdateSummaryDetails

the details of the update summary

Exceptions
LiquibaseException:
Thrown by this method
IOException:
Thrown by this method
createFinalStatusListback to summary
private static List<ChangeSetStatus> createFinalStatusList(List<ChangeSet> skippedChangeSets, List<ChangeSetStatus> filterDenied, SortedMap<String, Integer> mdcSkipCounts)
createOutputWriterback to summary
private static Writer createOutputWriter(OutputStream outputStream) throws IOException
determineOrderInChangelogback to summary
private static int determineOrderInChangelog(ChangeSet changeSetToMatch)
printDetailTableback to summary
private static void printDetailTable(List<List<String>> table, OutputStream outputStream) throws IOException, LiquibaseException
showDetailTableback to summary
private static ShowSummaryUtil.FilteredChanges showDetailTable(List<ChangeSet> skippedChangeSets, List<ChangeSetStatus> filterDenied, OutputStream outputStream, boolean shouldPrintDetailTable, UpdateSummaryOutputEnum showSummaryOutput, List<ChangeSetStatus> additionalChangesets, ChangeLogIterator runChangeLogIterator) throws IOException, LiquibaseException
showSummaryback to summary
private static UpdateSummaryDetails showSummary(DatabaseChangeLog changeLog, StatusVisitor statusVisitor, List<ChangeSet> skippedChangeSets, List<ChangeSetStatus> filterDenied, OutputStream outputStream, UpdateSummaryOutputEnum showSummaryOutput, ChangeLogIterator runChangeLogIterator) throws LiquibaseException
showUpdateSummaryback to summary
public static void showUpdateSummary(DatabaseChangeLog changeLog, UpdateSummaryEnum showSummary, UpdateSummaryOutputEnum showSummaryOutput, StatusVisitor statusVisitor, OutputStream outputStream) throws LiquibaseException, IOException

Deprecated

Show a summary of the changesets which were executed

Parameters
changeLog:DatabaseChangeLog

The changelog used in this update

showSummary:UpdateSummaryEnum

Flag to control whether or not we show the summary

showSummaryOutput:UpdateSummaryOutputEnum

Flag to control where we show the summary

statusVisitor:StatusVisitor

The StatusVisitor used to determine statuses

outputStream:OutputStream

The OutputStream to use for the summary

Annotations
@Deprecated
Exceptions
LiquibaseException:
Thrown by this method
IOException:
Thrown by this method
showUpdateSummaryback to summary
public static void showUpdateSummary(DatabaseChangeLog changeLog, UpdateSummaryEnum showSummary, UpdateSummaryOutputEnum showSummaryOutput, StatusVisitor statusVisitor, OutputStream outputStream, ChangeLogIterator runChangeLogIterator) throws LiquibaseException, IOException

Show a summary of the changesets which were executed

Parameters
changeLog:DatabaseChangeLog

The changelog used in this update

showSummary:UpdateSummaryEnum

Flag to control whether or not we show the summary

showSummaryOutput:UpdateSummaryOutputEnum

Flag to control where we show the summary

statusVisitor:StatusVisitor

The StatusVisitor used to determine statuses

outputStream:OutputStream

The OutputStream to use for the summary

Exceptions
LiquibaseException:
Thrown by this method
IOException:
Thrown by this method
writeMessageback to summary
private static void writeMessage(String message, UpdateSummaryOutputEnum showSummaryOutput, OutputStream outputStream) throws LiquibaseException
writeToLogback to summary
private static void writeToLog(String message)
writeToOutputback to summary
private static void writeToOutput(OutputStream outputStream, String message) throws LiquibaseException
liquibase.util back to summary

private Class ShowSummaryUtil.FilteredChanges

extends Object
Class Inheritance
Annotations
@lombok.Data

Field Summary

Modifier and TypeField and Description
private final SortedMap<String, Integer>
private final Map<ChangeSet, String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mdcSkipCountsback to summary
private final SortedMap<String, Integer> mdcSkipCounts
skippedChangesetsMessageback to summary
private final Map<ChangeSet, String> skippedChangesetsMessage

Constructor Detail

FilteredChangesback to summary
private FilteredChanges()
liquibase.util back to summary

public Interface ShowSummaryUtil.ShouldNotCountAsSkipChangesetFilter

extends ChangeSetFilter

Internal use only filter.

Method Summary

Inherited from liquibase.changelog.filter.ChangeSetFilter:
acceptsgetDisplayNamegetMdcName