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 "global" or "local". Global properties span all change logs. A global setting configured in an included changelog is still available to all changesets Local properties are only available in the change log that they are defined in -- not even in changelogs "included" by the file that defines the property.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ExpressionExpander | |
| private Contexts | |
| private String | |
| private LabelExpression | |
| private final List | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ChangeLogParameters(Database database)
Creates a new ChangeLogParameters instance, populated with a set of "database.*" global parameters based on the passed database configuration. |
| Modifier and Type | Method and Description |
|---|---|
| public String | expandExpressions(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. |
| private ChangeLogParameters. | |
| public Contexts | |
| public String | |
| private ChangeLogParameters. | |
| public LabelExpression | |
| private String | |
| public Object | 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 in |
| public boolean | hasValue(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 instance |
| public void | |
| public void | set(String key, Object value, ContextExpression contexts, Labels labels, String databases, boolean globalParam, DatabaseChangeLog changeLog)
Calls either |
| public void | set(String key, Object value, String contexts, String labels, String databases, boolean globalParam, DatabaseChangeLog changeLog)
Convenience version of |
| public void | |
| public void | setContexts(Contexts contexts)
Sets the contexts to filter calls to |
| public void | setDatabase(String filterDatabase)
Sets the database to filter calls to |
| public void | setLabels(LabelExpression labels)
Sets the labels to filter calls to |
| public void | setLocal(String parameter, Object value, DatabaseChangeLog changeLog)
Sets a local changelog parameter with no context/label/database filters on it. |
| public void | setLocal(String key, Object value, DatabaseChangeLog
required for local parameters, ignored for global parameters changeLog, ContextExpression contexts, Labels labels, String... databases)Sets a changelog parameter local to the given changeLog file. |
| expressionExpander | back to summary |
|---|---|
| private final ExpressionExpander expressionExpander | |
| filterContexts | back to summary |
|---|---|
| private Contexts filterContexts | |
| filterDatabase | back to summary |
|---|---|
| private String filterDatabase | |
| filterLabels | back to summary |
|---|---|
| private LabelExpression filterLabels | |
| globalParameters | back to summary |
|---|---|
| private final List<ChangeLogParameters. | |
| localParameters | back to summary |
|---|---|
| private final Map<String, List<ChangeLogParameters. | |
| ChangeLogParameters | back to summary |
|---|---|
| public ChangeLogParameters() Calls | |
| ChangeLogParameters | back to summary |
|---|---|
| public ChangeLogParameters(Database database) Creates 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 | |
| expandExpressions | back to summary |
|---|---|
| public 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. | |
| getChangelogParameter | back to summary |
|---|---|
| private ChangeLogParameters. | |
| getContexts | back to summary |
|---|---|
| public Contexts getContexts() Gets the contexts to filter calls to | |
| getDatabase | back to summary |
|---|---|
| public String getDatabase() Sets the database to filter calls to | |
| getFilter | back to summary |
|---|---|
| private ChangeLogParameters. | |
| getLabels | back to summary |
|---|---|
| public LabelExpression getLabels() Gets the labels to filter calls to | |
| getLocalKey | back to summary |
|---|---|
| private String getLocalKey(DatabaseChangeLog changeLog) The key to use in | |
| getValue | back to summary |
|---|---|
| public Object 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 in | |
| hasValue | back to summary |
|---|---|
| public boolean hasValue(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 instance | |
| set | back to summary |
|---|---|
| public void set(String parameter, Object value) Sets a global changelog parameter with no context/label/database filters on it.
Convenience version of | |
| set | back to summary |
|---|---|
| public void set(String key, Object value, ContextExpression contexts, Labels labels, String databases, boolean globalParam, DatabaseChangeLog changeLog) Calls either | |
| set | back to summary |
|---|---|
| public void set(String key, Object value, String contexts, String labels, String databases, boolean globalParam, DatabaseChangeLog changeLog) Convenience version of | |
| set | back to summary |
|---|---|
| public 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. | |
| setContexts | back to summary |
|---|---|
| public void setContexts(Contexts contexts) Sets the contexts to filter calls to | |
| setDatabase | back to summary |
|---|---|
| public void setDatabase(String filterDatabase) Sets the database to filter calls to | |
| setLabels | back to summary |
|---|---|
| public void setLabels(LabelExpression labels) Sets the labels to filter calls to | |
| setLocal | back to summary |
|---|---|
| public void setLocal(String parameter, Object value, DatabaseChangeLog changeLog) Sets a local changelog parameter with no context/label/database filters on it.
Convenience version of | |
| setLocal | back to summary |
|---|---|
| public 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.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final ContextExpression | |
| private final List | |
| private final Labels | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ChangeLogParameter(String key, Object value, ContextExpression validContexts, Labels labels, String[] validDatabases)
|
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public Labels | |
| public ContextExpression | |
| public List | |
| public Object | |
| public String |
| key | back to summary |
|---|---|
| private final String key | |
| validContexts | back to summary |
|---|---|
| private final ContextExpression validContexts | |
| validDatabases | back to summary |
|---|---|
| private final List<String> validDatabases | |
| validLabels | back to summary |
|---|---|
| private final Labels validLabels | |
| value | back to summary |
|---|---|
| private final Object value | |
| ChangeLogParameter | back to summary |
|---|---|
| public ChangeLogParameter(String key, Object value) | |
| ChangeLogParameter | back to summary |
|---|---|
| public ChangeLogParameter(String key, Object value, ContextExpression validContexts, Labels labels, String[] validDatabases) | |
| getKey | back to summary |
|---|---|
| public String getKey() | |
| getLabels | back to summary |
|---|---|
| public Labels getLabels() | |
| getValidContexts | back to summary |
|---|---|
| public ContextExpression getValidContexts() | |
| getValidDatabases | back to summary |
|---|---|
| public List | |
| getValue | back to summary |
|---|---|
| public Object getValue() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| private final Contexts | |
| private final String | |
| private final LabelExpression |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean |
| contexts | back to summary |
|---|---|
| private final Contexts contexts | |
| database | back to summary |
|---|---|
| private final String database | |
| labels | back to summary |
|---|---|
| private final LabelExpression labels | |
| Filter | back to summary |
|---|---|
| public Filter(String database, Contexts contexts, LabelExpression labels) | |
| matches | back to summary |
|---|---|
| public boolean matches(ChangeLogParameters. | |