public abstract class BaseValidator extends java.lang.Object implements Validator
Modifier and Type | Field and Description |
---|---|
private Message |
message
Default validator message.
|
Constructor and Description |
---|
BaseValidator() |
Modifier and Type | Method and Description |
---|---|
Message |
getMessage()
Returns default message of validator.
|
abstract boolean |
isValid()
Performs validation and returns its result.
|
void |
setMessage(MessageCode aCode,
Creates new default message to be used by this validator.
|
void |
validate(ErrorCode aErrorCode,
Performs validation and throws exception in case validation did not pass.
|
aCode
- Code of default validation messageaMessage
- Text of default validation messageaParameters
- Parameters of default validation messagegetMessage
in interface Validator
Validator.getMessage()
isValid
in interface Validator
Validator.isValid()