Class BLCMessageUtils

java.lang.Object
org.broadleafcommerce.common.util.BLCMessageUtils
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Deprecated @Service("blBLCMessageUtils") public class BLCMessageUtils extends Object implements org.springframework.context.ApplicationContextAware
Deprecated.
this class should not be used to statically retrieve localized messages. MessageService should be used instead
Convenience class to faciliate getting internationalized messages.

Note that this class is scanned as a bean to pick up the applicationContext, but the methods this class provides should be invoked statically.

Author:
Andre Azzolini (apazzolini)
  • Field Details

    • applicationContext

      protected static org.springframework.context.ApplicationContext applicationContext
      Deprecated.
  • Constructor Details

    • BLCMessageUtils

      public BLCMessageUtils()
      Deprecated.
  • Method Details

    • getMessage

      public static String getMessage(String code)
      Deprecated.
      Returns the message requested by the code with no arguments and the currently set Java Locale on the BroadleafRequestContext as returned by BroadleafRequestContext.getJavaLocale()
      Parameters:
      code -
      Returns:
      the message
    • getMessage

      public static String getMessage(String code, Object... args)
      Deprecated.
      Returns the message requested by the code with the specified arguments and the currently set Java Locale on the BroadleafRequestContext as returned by BroadleafRequestContext.getJavaLocale()
      Parameters:
      code -
      Returns:
      the message
    • getMessageSource

      protected static org.springframework.context.MessageSource getMessageSource()
      Deprecated.
      Returns:
      the "messageSource" bean from the application context
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Deprecated.
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException