T
- value typepublic abstract class AbstractValidator<T>
extends java.lang.Object
implements java.util.function.Consumer<T>
Modifier and Type | Field and Description |
---|---|
protected DatatypeRegistry |
datatypeRegistry |
protected java.lang.String |
message |
protected Messages |
messages |
protected UserSessionSource |
userSessionSource |
Constructor and Description |
---|
AbstractValidator() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
formatValue(java.lang.Object value) |
java.lang.String |
getMessage() |
protected java.lang.String |
getTemplateErrorMessage(java.lang.String errorMessage,
java.util.Map<java.lang.String,java.lang.Object> values) |
void |
setMessage(java.lang.String message)
Sets custom error message that will be used instead of default message.
|
protected Messages messages
protected UserSessionSource userSessionSource
protected DatatypeRegistry datatypeRegistry
protected java.lang.String message
public java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- error messageprotected java.lang.String getTemplateErrorMessage(java.lang.String errorMessage, java.util.Map<java.lang.String,java.lang.Object> values)
errorMessage
- error messagevalues
- values mapprotected java.lang.String formatValue(java.lang.Object value)