public abstract class AbstractMessageBuilder extends Object implements MessageBuilder
MessageBuilder
implementation.DEFAULT
Constructor and Description |
---|
AbstractMessageBuilder() |
Modifier and Type | Method and Description |
---|---|
String |
buildMessage(Validation<?> component,
ValidationContext<?> context)
Builds localized error message for the specified validation component
and context.
|
protected abstract String |
renderTemplate(String template,
Map<String,Object> arguments,
ValidationContext<?> context)
Renders the specified message template using the specified arguments.
|
public final String buildMessage(Validation<?> component, ValidationContext<?> context)
buildMessage
in interface MessageBuilder
component
- Validation component.context
- Validation context.protected abstract String renderTemplate(String template, Map<String,Object> arguments, ValidationContext<?> context)
template
- Message template.arguments
- Arguments to be substituted into the message template.context
- Validation context.Copyright © 2011–2020 FoxLabs. All rights reserved.