@Component public class RegexValidatedTextDatatype extends SerializingCustomDatatype<java.lang.String>
CustomDatatype.Summary
Constructor and Description |
---|
RegexValidatedTextDatatype() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
deserialize(java.lang.String serializedValue) |
java.lang.String |
serialize(java.lang.String typedValue) |
void |
setConfiguration(java.lang.String regex)
Does nothing in the default implementation
|
void |
validate(java.lang.String typedValue)
Passes for all non-null values in the default implementation
|
doGetTextSummary, fromReferenceString, getReferenceStringForValue, getTextSummary, save
public void setConfiguration(java.lang.String regex)
SerializingCustomDatatype
setConfiguration
in interface CustomDatatype<java.lang.String>
setConfiguration
in class SerializingCustomDatatype<java.lang.String>
CustomDatatype.setConfiguration(java.lang.String)
public java.lang.String serialize(java.lang.String typedValue)
serialize
in class SerializingCustomDatatype<java.lang.String>
typedValue
- (has already had validate called)SerializingCustomDatatype.serialize(java.lang.Object)
public java.lang.String deserialize(java.lang.String serializedValue)
deserialize
in class SerializingCustomDatatype<java.lang.String>
SerializingCustomDatatype.deserialize(java.lang.String)
public void validate(java.lang.String typedValue) throws InvalidCustomValueException
SerializingCustomDatatype
validate
in interface CustomDatatype<java.lang.String>
validate
in class SerializingCustomDatatype<java.lang.String>
InvalidCustomValueException
CustomDatatype.validate(java.lang.Object)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.