/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @param args arguments for the message as a List, or {@code null} if none * @return the message * @throws org.springframework.context.NoSuchMessageException if not found */ public String getThemeMessage(String code, @Nullable List<?> args) throws NoSuchMessageException { return getTheme().getMessageSource().getMessage(code, (args != null ? args.toArray() : null), getLocale()); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @param args arguments for the message, or {@code null} if none * @param defaultMessage the String to return if the lookup fails * @return the message */ public String getThemeMessage(String code, @Nullable Object[] args, String defaultMessage) { String msg = getTheme().getMessageSource().getMessage(code, args, defaultMessage, getLocale()); return (msg != null ? msg : ""); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @param args arguments for the message, or {@code null} if none * @return the message * @throws org.springframework.context.NoSuchMessageException if not found */ public String getThemeMessage(String code, @Nullable Object[] args) throws NoSuchMessageException { return getTheme().getMessageSource().getMessage(code, args, getLocale()); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @param defaultMessage the String to return if the lookup fails * @return the message */ public String getThemeMessage(String code, String defaultMessage) { String msg = getTheme().getMessageSource().getMessage(code, null, defaultMessage, getLocale()); return (msg != null ? msg : ""); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @return the message * @throws org.springframework.context.NoSuchMessageException if not found */ public String getThemeMessage(String code) throws NoSuchMessageException { return getTheme().getMessageSource().getMessage(code, null, getLocale()); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @param args arguments for the message as a List, or {@code null} if none * @param defaultMessage the String to return if the lookup fails * @return the message */ public String getThemeMessage(String code, @Nullable List<?> args, String defaultMessage) { String msg = getTheme().getMessageSource().getMessage(code, (args != null ? args.toArray() : null), defaultMessage, getLocale()); return (msg != null ? msg : ""); }
/** * Retrieve the given MessageSourceResolvable in the current theme. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param resolvable the MessageSourceResolvable * @return the message * @throws org.springframework.context.NoSuchMessageException if not found */ public String getThemeMessage(MessageSourceResolvable resolvable) throws NoSuchMessageException { return getTheme().getMessageSource().getMessage(resolvable, getLocale()); }
/** * Use the theme MessageSource for theme message resolution. */ @Override protected MessageSource getMessageSource() { return getRequestContext().getTheme().getMessageSource(); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @param args arguments for the message as a List, or {@code null} if none * @return the message * @throws org.springframework.context.NoSuchMessageException if not found */ public String getThemeMessage(String code, @Nullable List<?> args) throws NoSuchMessageException { return getTheme().getMessageSource().getMessage(code, (args != null ? args.toArray() : null), getLocale()); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @param args arguments for the message, or {@code null} if none * @return the message * @throws org.springframework.context.NoSuchMessageException if not found */ public String getThemeMessage(String code, @Nullable Object[] args) throws NoSuchMessageException { return getTheme().getMessageSource().getMessage(code, args, getLocale()); }
/** * Return exception message that indicates the current theme. */ @Override protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) { return "Theme '" + getRequestContext().getTheme().getName() + "': " + ex.getMessage(); }
/** * Retrieve the given MessageSourceResolvable in the current theme. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param resolvable the MessageSourceResolvable * @return the message * @throws org.springframework.context.NoSuchMessageException if not found */ public String getThemeMessage(MessageSourceResolvable resolvable) throws NoSuchMessageException { return getTheme().getMessageSource().getMessage(resolvable, getLocale()); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @param args arguments for the message as a List, or {@code null} if none * @param defaultMessage the String to return if the lookup fails * @return the message */ public String getThemeMessage(String code, @Nullable List<?> args, String defaultMessage) { String msg = getTheme().getMessageSource().getMessage(code, (args != null ? args.toArray() : null), defaultMessage, getLocale()); return (msg != null ? msg : ""); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @param args arguments for the message, or {@code null} if none * @param defaultMessage the String to return if the lookup fails * @return the message */ public String getThemeMessage(String code, @Nullable Object[] args, String defaultMessage) { String msg = getTheme().getMessageSource().getMessage(code, args, defaultMessage, getLocale()); return (msg != null ? msg : ""); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @return the message * @throws org.springframework.context.NoSuchMessageException if not found */ public String getThemeMessage(String code) throws NoSuchMessageException { return getTheme().getMessageSource().getMessage(code, null, getLocale()); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @param defaultMessage the String to return if the lookup fails * @return the message */ public String getThemeMessage(String code, String defaultMessage) { String msg = getTheme().getMessageSource().getMessage(code, null, defaultMessage, getLocale()); return (msg != null ? msg : ""); }
/** * Use the theme MessageSource for theme message resolution. */ @Override protected MessageSource getMessageSource() { return getRequestContext().getTheme().getMessageSource(); }
/** * Return exception message that indicates the current theme. */ @Override protected String getNoSuchMessageExceptionDescription(NoSuchMessageException ex) { return "Theme '" + getRequestContext().getTheme().getName() + "': " + ex.getMessage(); }
/** * Retrieve the theme message for the given code. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param code code of the message * @param args arguments for the message as a List, or {@code null} if none * @return the message * @throws org.springframework.context.NoSuchMessageException if not found */ public String getThemeMessage(String code, List<?> args) throws NoSuchMessageException { return getTheme().getMessageSource().getMessage(code, (args != null ? args.toArray() : null), this.locale); }
/** * Retrieve the given MessageSourceResolvable in the current theme. * <p>Note that theme messages are never HTML-escaped, as they typically denote * theme-specific resource paths and not client-visible messages. * @param resolvable the MessageSourceResolvable * @return the message * @throws org.springframework.context.NoSuchMessageException if not found */ public String getThemeMessage(MessageSourceResolvable resolvable) throws NoSuchMessageException { return getTheme().getMessageSource().getMessage(resolvable, this.locale); }