Package liquibase.changelog
Class DatabaseChangeLog
java.lang.Object
liquibase.changelog.DatabaseChangeLog
- All Implemented Interfaces:
Comparable<DatabaseChangeLog>
,Conditional
Encapsulates the information stored in the change log XML file.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Controls what to do when including a file with a format that isn't recognized by a changelog parser. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeSet
(ChangeSet changeSet) void
int
protected ChangeSet
createChangeSet
(ParsedNode node, ResourceAccessor resourceAccessor) determineResourceComparator
(String resourceComparatorDef) boolean
protected void
expandExpressions
(ParsedNode parsedNode) findResources
(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, int minDepth, int maxDepth) Deprecated.findResources
(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, int minDepth, int maxDepth, String endsWithFilter) getChangeSet
(String path, String author, String id) getChangeSet
(RanChangeSet ranChangeSet) getChangeSets
(String path, String author, String id) getChangeSets
(RanChangeSet ranChangeSet) Deprecated.protected Comparator<String>
protected void
handleChildNode
(ParsedNode node, ResourceAccessor resourceAccessor) protected void
handleChildNode
(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) void
handleChildNodeHelper
(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) int
hashCode()
boolean
include
(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, LabelExpression labelExpression, Boolean ignore, boolean logEveryUnknownFileFormat) boolean
include
(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, boolean logEveryUnknownFileFormat) boolean
include
(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, String logicalFilePath, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat) boolean
include
(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, String logicalFilePath, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat, ModifyChangeSets modifyChangeSets) boolean
include
(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat) void
includeAll
(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, LabelExpression labelExpression, boolean ignore) void
includeAll
(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, int minDepth, int maxDepth, ModifyChangeSets modifyChangeSets) Deprecated.void
includeAll
(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, String logicalFilePath, int minDepth, int maxDepth) void
includeAll
(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, String logicalFilePath, int minDepth, int maxDepth, String endsWithFilter, ModifyChangeSets modifyChangeSets) boolean
isDbmsMatch
(String dbmsList) boolean
isDbmsMatch
(Set<String> dbmsSet) boolean
void
load
(ParsedNode parsedNode, ResourceAccessor resourceAccessor) static String
normalizePath
(String filePath) void
setChangeLogParameters
(ChangeLogParameters changeLogParameters) void
setContextFilter
(ContextExpression contextFilter) void
setContexts
(ContextExpression contexts) Deprecated.void
setIncludeContextFilter
(ContextExpression includeContextFilter) void
setIncludeContexts
(ContextExpression includeContexts) Deprecated.void
setIncludeIgnore
(boolean ignore) void
setIncludeLabels
(LabelExpression labels) Deprecated.Correct version issetIncludeLabels(Labels)
.void
setIncludeLabels
(Labels labels) void
setLogicalFilePath
(String logicalFilePath) void
setObjectQuotingStrategy
(ObjectQuotingStrategy objectQuotingStrategy) void
setParentChangeLog
(DatabaseChangeLog parentChangeLog) void
setPhysicalFilePath
(String physicalFilePath) void
setPreconditions
(PreconditionContainer precond) void
setRootChangeLog
(DatabaseChangeLog rootChangeLog) void
setRuntimeEnvironment
(RuntimeEnvironment runtimeEnvironment) toString()
void
void
validate
(Database database, Contexts contexts, LabelExpression labelExpression)
-
Field Details
-
SEEN_CHANGELOGS_PATHS_SCOPE_KEY
- See Also:
-
FILE
- See Also:
-
CONTEXT_FILTER
- See Also:
-
CONTEXT
- See Also:
-
LABELS
- See Also:
-
IGNORE
- See Also:
-
RELATIVE_TO_CHANGELOG_FILE
- See Also:
-
LOGICAL_FILE_PATH
- See Also:
-
ERROR_IF_MISSING
- See Also:
-
MODIFY_CHANGE_SETS
- See Also:
-
PATH
- See Also:
-
FILTER
- See Also:
-
RESOURCE_FILTER
- See Also:
-
RESOURCE_COMPARATOR
- See Also:
-
MIN_DEPTH
- See Also:
-
MAX_DEPTH
- See Also:
-
ENDS_WITH_FILTER
- See Also:
-
ERROR_IF_MISSING_OR_EMPTY
- See Also:
-
CHANGE_SET
- See Also:
-
DBMS
- See Also:
-
INCLUDE
- See Also:
-
INCLUDE_ALL
- See Also:
-
PRE_CONDITIONS
- See Also:
-
REMOVE_CHANGE_SET_PROPERTY
- See Also:
-
PROPERTY
- See Also:
-
NAME
- See Also:
-
VALUE
- See Also:
-
GLOBAL
- See Also:
-
-
Constructor Details
-
DatabaseChangeLog
public DatabaseChangeLog() -
DatabaseChangeLog
-
-
Method Details
-
setRootChangeLog
-
getRootChangeLog
-
setParentChangeLog
-
getParentChangeLog
-
getRuntimeEnvironment
-
setRuntimeEnvironment
-
getPreconditions
- Specified by:
getPreconditions
in interfaceConditional
-
setPreconditions
- Specified by:
setPreconditions
in interfaceConditional
-
getChangeLogParameters
-
setChangeLogParameters
-
getPhysicalFilePath
-
setPhysicalFilePath
-
getLogicalFilePath
-
setLogicalFilePath
-
getFilePath
-
getObjectQuotingStrategy
-
setObjectQuotingStrategy
-
getContexts
Deprecated. -
setContexts
Deprecated. -
getContextFilter
-
setContextFilter
-
getIncludeContextFilter
-
setIncludeLabels
Deprecated.Correct version issetIncludeLabels(Labels)
. Kept for backwards compatibility. -
setIncludeLabels
-
getIncludeLabels
-
setIncludeIgnore
public void setIncludeIgnore(boolean ignore) -
isIncludeIgnore
public boolean isIncludeIgnore() -
setIncludeContexts
Deprecated. -
setIncludeContextFilter
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<DatabaseChangeLog>
-
getChangeVisitors
-
getChangeSet
-
getChangeSets
-
getChangeSets
-
getSkippedBecauseOfLicenseChangeSets
-
getSkippedChangeSets
-
addChangeSet
-
equals
-
hashCode
public int hashCode() -
validate
- Throws:
LiquibaseException
-
validate
public void validate(Database database, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException - Throws:
LiquibaseException
-
getChangeSet
-
getChangeSets
-
load
public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException, SetupException - Throws:
ParsedNodeException
SetupException
-
expandExpressions
-
handleChildNode
protected void handleChildNode(ParsedNode node, ResourceAccessor resourceAccessor) throws ParsedNodeException, SetupException - Throws:
ParsedNodeException
SetupException
-
handleChildNode
protected void handleChildNode(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) throws ParsedNodeException, SetupException- Throws:
ParsedNodeException
SetupException
-
handleChildNodeHelper
public void handleChildNodeHelper(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) throws ParsedNodeException, SetupException- Throws:
ParsedNodeException
SetupException
-
determineResourceComparator
-
isDbmsMatch
-
isDbmsMatch
-
includeAll
@Deprecated public void includeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, LabelExpression labelExpression, boolean ignore) throws SetupException Deprecated.- Throws:
SetupException
-
includeAll
public void includeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, String logicalFilePath, int minDepth, int maxDepth) throws SetupException - Throws:
SetupException
-
includeAll
@Deprecated public void includeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, int minDepth, int maxDepth, ModifyChangeSets modifyChangeSets) throws SetupException Deprecated.- Throws:
SetupException
-
includeAll
public void includeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, String logicalFilePath, int minDepth, int maxDepth, String endsWithFilter, ModifyChangeSets modifyChangeSets) throws SetupException - Throws:
SetupException
-
findResources
@Deprecated public SortedSet<Resource> findResources(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, int minDepth, int maxDepth) throws SetupException Deprecated.- Throws:
SetupException
-
findResources
public SortedSet<Resource> findResources(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, int minDepth, int maxDepth, String endsWithFilter) throws SetupException - Throws:
SetupException
-
include
@Deprecated public boolean include(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, LabelExpression labelExpression, Boolean ignore, boolean logEveryUnknownFileFormat) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
include
public boolean include(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, boolean logEveryUnknownFileFormat) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
include
public boolean include(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat) throws LiquibaseException Deprecated.- Throws:
LiquibaseException
-
include
public boolean include(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, String logicalFilePath, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat) throws LiquibaseException - Throws:
LiquibaseException
-
include
public boolean include(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, String logicalFilePath, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat, ModifyChangeSets modifyChangeSets) throws LiquibaseException - Throws:
LiquibaseException
-
createChangeSet
protected ChangeSet createChangeSet(ParsedNode node, ResourceAccessor resourceAccessor) throws ParsedNodeException - Throws:
ParsedNodeException
-
getStandardChangeLogComparator
-
normalizePath
-
clearCheckSums
public void clearCheckSums()
-
getContextFilter()