Package com.jk.core.validation.builtin
Class ErrorMessageProvider
java.lang.Object
com.jk.core.validation.builtin.ErrorMessageProvider
This class is an abstract class that defines the contract for classes
responsible for providing error messages.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
getMessage
(Class<?> source, String messageId, String... args) This method retrieves an error message based on a message ID and optional arguments.
-
Constructor Details
-
ErrorMessageProvider
public ErrorMessageProvider()
-
-
Method Details
-
getMessage
This method retrieves an error message based on a message ID and optional arguments.- Parameters:
source
- Specifies the source class or resource bundle where the message is defined.messageId
- Specifies the unique identifier of the error message.args
- Specifies the optional arguments that can be inserted into the message template.- Returns:
- the formatted error message.
-