Package flexagon.fd.core.utils
Class AbstractPropertyReplacement
java.lang.Object
flexagon.fd.core.utils.AbstractPropertyReplacement
- Direct Known Subclasses:
FilePropertyReplacement,InMemoryPropertyReplacement,StringPropertyReplacement
Abstract implementation for replacing properties with their defined value from the
PropertyReplacementContext. Properties are defined within a given source
using the notation ${{PropertyName}}. The property names case sensitive.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPropertyReplacement(PropertyReplacementContext pPropertyReplacementContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanhasReplacementToken(String pString) Returns whether the given source text contains one or more replacement properties.protected StringReplaces any properties within the given source with the key/values found in the PropertyReplacementContext.
-
Field Details
-
mPropertyReplacementContext
-
-
Constructor Details
-
AbstractPropertyReplacement
-
-
Method Details
-
replace
Replaces any properties within the given source with the key/values found in the PropertyReplacementContext.- Parameters:
pString- the source containing property replacement keys- Returns:
- the new source with property values replaced
- Throws:
FlexCheckedException- if a property replacement fails
-
hasReplacementToken
Returns whether the given source text contains one or more replacement properties.- Parameters:
pString- the source containing property replacement keys- Returns:
- true if the source contains replacement properties; false otherwise.
-