/** * Resolves a message string using application locale. A message is resolved by * checking if it is a value enclosed with a tag. If enclosed with a message tag * <em>$m{<value>}</em>, the value is used as a key to obtain a message * resource from the messages component. The obtained message is returned as the * resolved string. If enclosed with a string tag <em>$s{<value>}</em>, * the value is extracted and returned as the resolved string. For any other * condition, the string is returned as is. * * @param message * the message to resolve. * @param params * parameters * @return the resolved string or null if supplied string is null * @throws UnifyException * If an error occurs */ protected String resolveApplicationMessage(String message, Object... params) throws UnifyException { return resolveMessage(getLocale(LocaleType.APPLICATION), message, params); }
/** * Resolves a message string using current session's locale. A message is * resolved by checking if it is a value enclosed with a tag. If enclosed with a * message tag <em>$m{<value>}</em>, the value is used as a key to obtain * a message resource from the messages component. The obtained message is * returned as the resolved string. If enclosed with a string tag * <em>$s{<value>}</em>, the value is extracted and returned as the * resolved string. For any other condition, the string is returned as is. * * @param message * the message to resolve. * @param params * parameters * @return the resolved string or null if supplied string is null * @throws UnifyException * If an error occurs */ protected String resolveSessionMessage(String message, Object... params) throws UnifyException { return resolveMessage(getLocale(LocaleType.SESSION), message, params); }