Package de.cxp.ocs.conf.converter
Class PatternWithReplacementConfiguration
- java.lang.Object
-
- de.cxp.ocs.conf.converter.PatternConfiguration
-
- de.cxp.ocs.conf.converter.PatternWithReplacementConfiguration
-
- All Implemented Interfaces:
ConfigureableField
public class PatternWithReplacementConfiguration extends PatternConfiguration
ConfigureableFieldimplementations that holds all information needed by theReplacePatternInValuesDataProcessor. The configuration allows:configuration: ReplacePatternInValuesDataProcessor: someFieldName: ".*\\d+.*" someFieldName_replacement: "foo" someFieldName_destination: "someDestinationField"
-
-
Field Summary
Fields Modifier and Type Field Description static StringFIELD_REPLACEMENT_SUFFIX-
Fields inherited from class de.cxp.ocs.conf.converter.PatternConfiguration
FIELD_REPLACEMENT_DESTINATION, FIELD_WORD_JOIN_SEPARATOR, FIELD_WORD_SPLIT_REGEX
-
-
Constructor Summary
Constructors Constructor Description PatternWithReplacementConfiguration(String fieldName, String destinationFieldName, Pattern pattern, String replacement)Creats a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetReplacement()Gets the replacement or an empty string if no replacement is configured.-
Methods inherited from class de.cxp.ocs.conf.converter.PatternConfiguration
getDestinationFieldName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.cxp.ocs.conf.converter.ConfigureableField
getFieldName
-
-
-
-
Field Detail
-
FIELD_REPLACEMENT_SUFFIX
public static final String FIELD_REPLACEMENT_SUFFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PatternWithReplacementConfiguration
public PatternWithReplacementConfiguration(String fieldName, String destinationFieldName, Pattern pattern, String replacement)
Creats a new instance.- Parameters:
fieldName- the field name.destinationFieldName- the destination name.pattern- thePatternto use.replacement- the replacement value used when the pattern matches.
-
-
Method Detail
-
getReplacement
public String getReplacement()
Gets the replacement or an empty string if no replacement is configured.- Returns:
- the replacement or an empty string.
-
-