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
Nested ClassesModifier and TypeClassDescriptionstatic enumControls what to do when including a file with a format that isn't recognized by a changelog parser. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeSet(ChangeSet changeSet) voidintprotected ChangeSetcreateChangeSet(ParsedNode node, ResourceAccessor resourceAccessor) determineResourceComparator(String resourceComparatorDef) booleanprotected voidexpandExpressions(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.use#getContextFilter()protected Comparator<String>protected voidhandleChildNode(ParsedNode node, ResourceAccessor resourceAccessor) protected voidhandleChildNode(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) voidhandleChildNodeHelper(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) inthashCode()booleaninclude(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, LabelExpression labelExpression, Boolean ignore, boolean logEveryUnknownFileFormat) booleaninclude(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, boolean logEveryUnknownFileFormat) booleaninclude(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, String logicalFilePath, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat) booleaninclude(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, String logicalFilePath, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat, ModifyChangeSets modifyChangeSets) booleaninclude(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat) voidincludeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, LabelExpression labelExpression, boolean ignore) voidincludeAll(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.voidincludeAll(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) voidincludeAll(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) booleanisDbmsMatch(String dbmsList) booleanisDbmsMatch(Set<String> dbmsSet) voidload(ParsedNode parsedNode, ResourceAccessor resourceAccessor) static StringnormalizePath(String filePath) voidsetChangeLogParameters(ChangeLogParameters changeLogParameters) voidsetContextFilter(ContextExpression contextFilter) voidsetContexts(ContextExpression contexts) Deprecated.voidsetIncludeContextFilter(ContextExpression includeContextFilter) voidsetIncludeContexts(ContextExpression includeContexts) Deprecated.voidsetIncludeIgnore(boolean ignore) voidsetIncludeLabels(LabelExpression labels) Deprecated.Correct version issetIncludeLabels(Labels).voidsetIncludeLabels(Labels labels) voidsetLogicalFilePath(String logicalFilePath) voidsetObjectQuotingStrategy(ObjectQuotingStrategy objectQuotingStrategy) voidsetParentChangeLog(DatabaseChangeLog parentChangeLog) voidsetPhysicalFilePath(String physicalFilePath) voidsetPreconditions(PreconditionContainer precondition) voidsetRootChangeLog(DatabaseChangeLog rootChangeLog) voidsetRuntimeEnvironment(RuntimeEnvironment runtimeEnvironment) toString()voidvoidvalidate(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_CHANGELOG
- See Also:
-
INCLUDE_ALL_CHANGELOGS
- 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
-
setRuntimeEnvironment
-
getPreconditions
- Specified by:
getPreconditionsin interfaceConditional
-
setPreconditions
- Specified by:
setPreconditionsin interfaceConditional
-
setChangeLogParameters
-
setPhysicalFilePath
-
getRawLogicalFilePath
-
getLogicalFilePath
-
setLogicalFilePath
-
getFilePath
-
setObjectQuotingStrategy
-
getContexts
Deprecated.use#getContextFilter() -
setContexts
Deprecated. -
setContextFilter
-
setIncludeLabels
Deprecated.Correct version issetIncludeLabels(Labels). Kept for backwards compatibility. -
setIncludeLabels
-
setIncludeIgnore
public void setIncludeIgnore(boolean ignore) -
setIncludeContexts
Deprecated. -
setIncludeContextFilter
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<DatabaseChangeLog>
-
getChangeSet
-
getChangeSets
-
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:
ParsedNodeExceptionSetupException
-
expandExpressions
-
handleChildNode
protected void handleChildNode(ParsedNode node, ResourceAccessor resourceAccessor) throws ParsedNodeException, SetupException - Throws:
ParsedNodeExceptionSetupException
-
handleChildNode
protected void handleChildNode(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) throws ParsedNodeException, SetupException- Throws:
ParsedNodeExceptionSetupException
-
handleChildNodeHelper
public void handleChildNodeHelper(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) throws ParsedNodeException, SetupException- Throws:
ParsedNodeExceptionSetupException
-
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
@Deprecated 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()
-
include(String, boolean, boolean, ResourceAccessor, ContextExpression, Labels, Boolean, String, OnUnknownFileFormat)