Package flexagon.fd.core.utils
Class StringPropertyReplacement
java.lang.Object
flexagon.fd.core.utils.AbstractPropertyReplacement
flexagon.fd.core.utils.StringPropertyReplacement
Concrete implementation for property replacement on a String. Properties are defined within a
given source using the notation ${{PropertyName}}. The property names are case-sensitive.
-
Field Summary
Fields inherited from class flexagon.fd.core.utils.AbstractPropertyReplacement
mPropertyReplacementContext -
Constructor Summary
ConstructorsConstructorDescriptionStringPropertyReplacement(PropertyReplacementContext pPropertyReplacementContext) Constructs this utility for use with the given property replacement context. -
Method Summary
Modifier and TypeMethodDescriptionreplaceProperties(String pString) Replaces all properties within the given source with the key/values found in the PropertyReplacementContext.Methods inherited from class flexagon.fd.core.utils.AbstractPropertyReplacement
hasReplacementToken, replace
-
Constructor Details
-
StringPropertyReplacement
Constructs this utility for use with the given property replacement context.- Parameters:
pPropertyReplacementContext- the property replacement context This is a fairly expensive operation. Do this once, and then use the StringPropertyReplacement many times.
-
-
Method Details
-
replaceProperties
Replaces all properties within the given source with the key/values found in the PropertyReplacementContext.- Parameters:
pString- the input source containing properties to replace- Returns:
- the new String with property values replaced
- Throws:
FlexCheckedException- if a property replacement fails
-