org.apache.myfaces.extensions.cdi.message.api
Interface MessageInterpolator
- All Superinterfaces:
- Serializable
public interface MessageInterpolator
- extends Serializable
Implementations are responsible to replace placeholders in a message with the final value
interpolate
String interpolate(MessageContext messageContext,
String messageText,
Serializable... arguments)
- replaces the arguments of the given message with the given arguments
- Parameters:
messageContext
- the current MessageContext
instead of a MessageContextAware interface. we need it to avoid expensive operations like locking or deep cloningmessageText
- the message text which has to be interpolatedarguments
- a list of numbered and/or named arguments for the current message
- Returns:
- the final (interpolated) message text
if it was possible to replace the parameters with the given arguments
the unmodified messageText otherwise
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.