org.javalid.core.resource
Interface MessageCodeResolver

All Known Subinterfaces:
MessageCodeResourceBundleResolver
All Known Implementing Classes:
MessageCodeResourceBundleResolverImpl

public interface MessageCodeResolver

The interface which defines how a message code can be resolved.

Since:
1.2
Version:
1.0
Author:
M.Reuvers

Method Summary
 java.lang.String resolveMessage(java.lang.String code, java.util.Locale locale, java.lang.Object... params)
          Resolves given property code in given locale and formats it with optional parameters.
 java.lang.String resolveMessage(java.lang.String code, java.lang.Object... params)
          Resolves given property code and formats it with optional parameters (as locale uses the default locale, if you want to specify the locale use the other method.
 

Method Detail

resolveMessage

java.lang.String resolveMessage(java.lang.String code,
                                java.lang.Object... params)
                                throws JavalidException
Resolves given property code and formats it with optional parameters (as locale uses the default locale, if you want to specify the locale use the other method.

Parameters:
code - The code to resolve
params - The optional parameters to format the message with
Returns:
Formatted message
Throws:
JavalidException - Raised when code could not be resolved

resolveMessage

java.lang.String resolveMessage(java.lang.String code,
                                java.util.Locale locale,
                                java.lang.Object... params)
                                throws JavalidException
Resolves given property code in given locale and formats it with optional parameters.

Parameters:
code - The code to resolve
locale - The locale to use
params - The optional parameters to format the message with
Returns:
Formatted message
Throws:
JavalidException - Raised when code could not be resolved