Package liquibase
Class LabelExpression
- java.lang.Object
-
- liquibase.LabelExpression
-
public class LabelExpression extends Object
Wrapper for list of labels.Labels are tags that you can add to changesets to control which changeset will be executed in any migration run. Labels control whether a changeset is executed depending on runtime settings. Any string can be used for the label name, and it is case-insensitive.
- See Also:
- labels in documentation
-
-
Constructor Summary
Constructors Constructor Description LabelExpression()
LabelExpression(String labels)
LabelExpression(String... labels)
LabelExpression(Collection<String> labels)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(String label)
Set<String>
getLabels()
String
getOriginalString()
boolean
isEmpty()
boolean
matches(Labels runtimeLabels)
Returns true if the passed runtime labels match this label expressionstatic boolean
matchesAll(Collection<Labels> changesetLabels, LabelExpression labelExpression)
Return true if all the LabelExpression objects match the runtimeString
toString()
-
-
-
Constructor Detail
-
LabelExpression
public LabelExpression()
-
LabelExpression
public LabelExpression(String... labels)
-
LabelExpression
public LabelExpression(String labels)
-
LabelExpression
public LabelExpression(Collection<String> labels)
-
-
Method Detail
-
add
public boolean add(String label)
-
matches
public boolean matches(Labels runtimeLabels)
Returns true if the passed runtime labels match this label expression
-
matchesAll
public static boolean matchesAll(Collection<Labels> changesetLabels, LabelExpression labelExpression)
Return true if all the LabelExpression objects match the runtime- Parameters:
changesetLabels
- Expressions to match againstlabelExpression
- Runtime labels- Returns:
- boolean True if match
-
isEmpty
public boolean isEmpty()
-
getOriginalString
public String getOriginalString()
-
-