java.lang.Object
com.skava.marketplace.orchestration.constants.Constants

public final class Constants extends Object
The Class Constants.
  • Field Details

  • Method Details

    • getMessage

      public static String getMessage(String responseCode, org.springframework.context.MessageSource messageSource, String locale)
      Gets the message.
      Parameters:
      responseCode - holds Valid responseCode
      messageSource - hold valid messageSource
      locale - holds Valid locale
      Returns:
      String value as getMessage
    • getMessage

      public static String getMessage(String responseCode, org.springframework.context.MessageSource messageSource, String defaultMessage, String locale)
      Gets the message.
      Parameters:
      responseCode - holds ResponseCode as String
      messageSource - holds messageSource
      defaultMessage - holds defaultMessage
      locale - holds valid locale
      Returns:
      String as a message
    • getLocaleOrDefault

      public static Locale getLocaleOrDefault(String locale)
      Gets the locale or default.
      Parameters:
      locale - holds valid locale
      Returns:
      Locale Valid Locale
    • throwValidateException

      public static void throwValidateException(String errorCode, org.springframework.context.MessageSource messageSource, String locale)
      Throw validate exception.
      Parameters:
      errorCode - holds Error Code
      messageSource - holds MessageSource
      locale - holds locale
    • getMessageSource

      public static org.springframework.context.support.ResourceBundleMessageSource getMessageSource()
      Gets the message source.
      Returns:
      bean of ResourceBundleMessageSource