org.apache.myfaces.extensions.cdi.message.api
Interface MessageInterpolator

All Superinterfaces:
Serializable

public interface MessageInterpolator
extends Serializable

Author:
Manfred Geiler, Gerhard Petracek

Method Summary
 String interpolate(MessageContext messageContext, String messageText, Serializable... arguments)
          replaces the arguments of the given message with the given arguments
 

Method Detail

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 cloning
messageText - the message text which has to be interpolated
arguments - 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 The Apache Software Foundation. All Rights Reserved.