Class ChangeLogParameters
DatabaseChangeLog.
 In general, the end behavior of defined parameters is "the first set value wins". For example, if you set a parameter "x" to "1" and then set it to "2", the value will remain "1". This immutable property behavior allows users to easily set default values, knowing that any "upstream" overrides will take priority.
In determining which property value is actually "first set", context, label, and dbms filtering is taken into account.
Properties can be defined as "system", "global" or "local". Global and system properties span all change logs. A global setting configured in an included changelog is still available to all changesets. System properties such as environment variables are set up to not be filterable. This implies that they will ignore any label, context or dbms filters that are requested on the given execution. This is different from globals set up inside a changelog which can and will be filtered if they have a label, context or dbms associated with the property.
Local properties are available in the change log that they are defined AND in included changelogs.
- 
Constructor SummaryConstructorsConstructorDescriptionCallsChangeLogParameters(Database)with a null database.ChangeLogParameters(Database database) Creates a new ChangeLogParameters instance, populated with a set of "database.*" global parameters based on the passed database configuration.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd default-file properties to changelog parametersvoidAdd java property arguments to changelog parametersexpandExpressions(String string, DatabaseChangeLog changeLog) Expand any expressions in the given string, taking into account parameters local to the given changelog file as well as contexts, labels, and database configured in this instance.Gets the contexts to filter calls togetValue(String, DatabaseChangeLog)etc. with.Sets the database to filter calls togetValue(String, DatabaseChangeLog)etc. with.Gets the labels to filter calls togetValue(String, DatabaseChangeLog)etc. with.getLocalValue(String key, ChangeSet changeSet) Try to get local property from given ChangeSet.getValue(String key, DatabaseChangeLog changeLog) Get the value of the given parameter, taking into account parameters local to the given changelog file and values configured ingetContexts()andgetLabels()and the database.booleanhasValue(String key, DatabaseChangeLog changeLog) Return whether the given parameters is defined, taking into account parameters local to the given changelog file as well as contexts, labels, and database configured on this instancevoidSets a global changelog parameter with no context/label/database filters on it.voidset(String key, Object value, String contexts, String labels, String databases, boolean globalParam, DatabaseChangeLog changeLog) Convenience version ofset(String, Object, ContextExpression, Labels, String, boolean, DatabaseChangeLog).voidSets a global changelog parameter.voidset(String key, Object value, ContextExpression contexts, Labels labels, String databases, boolean globalParam, DatabaseChangeLog changeLog) Calls eitherset(String, Object, ContextExpression, Labels, String...)orsetLocal(String, Object, DatabaseChangeLog, ContextExpression, Labels, String...)depending on the value of globalParam.voidsetContexts(Contexts contexts) Sets the contexts to filter calls togetValue(String, DatabaseChangeLog)etc. with.voidsetDatabase(String filterDatabase) Sets the database to filter calls togetValue(String, DatabaseChangeLog)etc. with.voidsetLabels(LabelExpression labels) Sets the labels to filter calls togetValue(String, DatabaseChangeLog)etc. with.voidsetLocal(String parameter, Object value, DatabaseChangeLog changeLog) Sets a local changelog parameter with no context/label/database filters on it.voidsetLocal(String key, Object value, DatabaseChangeLog changeLog, ContextExpression contexts, Labels labels, String... databases) Sets a changelog parameter local to the given changeLog file.
- 
Constructor Details- 
ChangeLogParameterspublic ChangeLogParameters()CallsChangeLogParameters(Database)with a null database.
- 
ChangeLogParametersCreates a new ChangeLogParameters instance, populated with a set of "database.*" global parameters based on the passed database configuration. If the database is null, no global parameters are added.The passed database is used as a default value for getDatabase()
 
- 
- 
Method Details- 
setSets a global changelog parameter with no context/label/database filters on it. Convenience version ofset(String, Object, ContextExpression, Labels, String...).
- 
setLocalSets a local changelog parameter with no context/label/database filters on it. Convenience version ofsetLocal(String, Object, DatabaseChangeLog, ContextExpression, Labels, String...).
- 
setpublic void set(String key, Object value, ContextExpression contexts, Labels labels, String databases, boolean globalParam, DatabaseChangeLog changeLog) Calls eitherset(String, Object, ContextExpression, Labels, String...)orsetLocal(String, Object, DatabaseChangeLog, ContextExpression, Labels, String...)depending on the value of globalParam.
- 
setpublic void set(String key, Object value, String contexts, String labels, String databases, boolean globalParam, DatabaseChangeLog changeLog) Convenience version ofset(String, Object, ContextExpression, Labels, String, boolean, DatabaseChangeLog).
- 
setpublic void set(String key, Object value, ContextExpression contexts, Labels labels, String... databases) Sets a global changelog parameter. Just because you call this with a particular key, does not mean it will override the existing value. See the class description for more details on how values act as if they are immutable.
- 
setLocalpublic void setLocal(String key, Object value, DatabaseChangeLog changeLog, ContextExpression contexts, Labels labels, String... databases) Sets a changelog parameter local to the given changeLog file. Just because you call this with a particular key, does not mean it will override the existing value. See the class description for more details on how values act as if they are immutable.- Parameters:
- changeLog- required for local parameters, ignored for global parameters
 
- 
getValueGet the value of the given parameter, taking into account parameters local to the given changelog file and values configured ingetContexts()andgetLabels()and the database.
- 
getLocalValueTry to get local property from given ChangeSet.
- 
hasValueReturn whether the given parameters is defined, taking into account parameters local to the given changelog file as well as contexts, labels, and database configured on this instance
- 
expandExpressionspublic String expandExpressions(String string, DatabaseChangeLog changeLog) throws UnknownChangeLogParameterException Expand any expressions in the given string, taking into account parameters local to the given changelog file as well as contexts, labels, and database configured in this instance.
- 
getContextsGets the contexts to filter calls togetValue(String, DatabaseChangeLog)etc. with.
- 
setContextsSets the contexts to filter calls togetValue(String, DatabaseChangeLog)etc. with.
- 
getLabelsGets the labels to filter calls togetValue(String, DatabaseChangeLog)etc. with.
- 
setLabelsSets the labels to filter calls togetValue(String, DatabaseChangeLog)etc. with.
- 
getDatabaseSets the database to filter calls togetValue(String, DatabaseChangeLog)etc. with.
- 
setDatabaseSets the database to filter calls togetValue(String, DatabaseChangeLog)etc. with.
- 
addJavaPropertiespublic void addJavaProperties()Add java property arguments to changelog parameters
- 
addDefaultFilePropertiespublic void addDefaultFileProperties()Add default-file properties to changelog parameters
 
-