Class Constants

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

public final class Constants extends Object

The Class Constants

Common Constants that are available in the Orchestration Services are maintained here.
  • Field Details

  • Method Details

    • getMessage

      public static String getMessage(String responseCode, org.springframework.context.MessageSource messageSource, String locale)
      getMessage to return message for responseCode .
      Parameters:
      responseCode - to get response message for this code
      messageSource - stored multiple messages in this bundle
      locale - to get message according to this locale
      Returns:
      String returned response message for input responseCode
    • getMessage

      public static String getMessage(String responseCode, org.springframework.context.MessageSource messageSource, String defaultMessage, String locale)
      Gets the message.
      Parameters:
      responseCode - the response code
      messageSource - the message source
      defaultMessage - the default message
      locale - the locale
      Returns:
      the message
    • getLocaleOrDefault

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

      public static void throwValidateException(String errorCode, org.springframework.context.MessageSource messageSource, String locale)
      Throw validate exception.
      Parameters:
      errorCode - the error code
      messageSource - the message source
      locale - the locale
    • getMessageSource

      public static org.springframework.context.support.ResourceBundleMessageSource getMessageSource()
      This method is used to get the message source.
      Returns:
      the message source