@Service public class WebCmsContentMarkerService extends Object
WebCmsComponentContentMarkerRenderer| Modifier and Type | Field and Description |
|---|---|
static Pattern |
MARKER_PATTERN |
| Constructor and Description |
|---|
WebCmsContentMarkerService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsMarkers(String text) |
WebCmsContentMarker |
parseMarker(String marker)
Converts a string version of a marker into the
WebCmsContentMarker. |
String |
replaceMarkers(String text,
@NonNull Function<WebCmsContentMarker,String> markerValueFunction)
Replace all markers in the text specified.
|
String |
replaceMarkers(String text,
Map<String,String> markerValues)
Replace all markers in the text specified.
|
Collection<String> |
retrieveMarkers(String text)
Retrieve the unique markers in a text.
|
String |
stripMarkers(String text)
Simply strip all markers from the text.
|
public static Pattern MARKER_PATTERN
public WebCmsContentMarker parseMarker(String marker)
WebCmsContentMarker.marker - stringpublic boolean containsMarkers(String text)
text - to check for markerspublic Collection<String> retrieveMarkers(String text)
text - to parse the markers frompublic String replaceMarkers(String text, Map<String,String> markerValues)
text - to replace the markers inmarkerValues - map of value for markerpublic String stripMarkers(String text)
text - to remove all markers frompublic String replaceMarkers(String text, @NonNull @NonNull Function<WebCmsContentMarker,String> markerValueFunction)
text - to replace the markers inmarkerValueFunction - to determine a marker valueCopyright © 2020. All rights reserved.