Package com.mooltiverse.oss.nyx.entities
Class Substitution
java.lang.Object
com.mooltiverse.oss.nyx.entities.Substitution
This object models a rule to replace some text matched by a regular expression in arbitrary text files
with a static or dynamic value that is configured within the rule.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.Substitution
(String files, String match, String replace) Standard constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetFiles()
Returns the glob expression to select the text files to replace the matched strings into.getMatch()
Returns the regular expression used to match the text to be replaced replace in files.Returns the template expression defining the text to use when replacing all matched tokens.void
Sets the glob expression to select the text files to replace the matched strings into.void
Sets the regular expression used to match the text to be replaced replace in files.void
setReplace
(String replace) Sets the template expression defining the text to use when replacing all matched tokens.
-
Constructor Details
-
Substitution
public Substitution()Default constructor. -
Substitution
Standard constructor.- Parameters:
files
- the glob expression to select the text files to replace the matched strings into.match
- the regular expression used to match the text to be replaced replace in files.replace
- the template expression defining the text to use when replacing all matched tokens.
-
-
Method Details
-
getFiles
Returns the glob expression to select the text files to replace the matched strings into.- Returns:
- the glob expression to select the text files to replace the matched strings into.
-
setFiles
Sets the glob expression to select the text files to replace the matched strings into.- Parameters:
files
- glob expression to select the text files to replace the matched strings into.
-
getMatch
Returns the regular expression used to match the text to be replaced replace in files.- Returns:
- the regular expression used to match the text to be replaced replace in files.
-
setMatch
Sets the regular expression used to match the text to be replaced replace in files.- Parameters:
match
- the regular expression used to match the text to be replaced replace in files.
-
getReplace
Returns the template expression defining the text to use when replacing all matched tokens.- Returns:
- the template expression defining the text to use when replacing all matched tokens.
-
setReplace
Sets the template expression defining the text to use when replacing all matched tokens.- Parameters:
replace
- the template expression defining the text to use when replacing all matched tokens.
-