Class AppWarningException

java.lang.Object
java.lang.Throwable
java.lang.Exception
jp.ecuacion.lib.core.exception.checked.AppWarningException
All Implemented Interfaces:
Serializable

public class AppWarningException extends Exception
Provides an exception that indicates a warning.

This is used in web apps. When some business logic throws this warning exception, the app shows the warning popup window on screen and proceed when a user presses "OK".

It is not a child of AppException because AppException means an error occured in a business logic but AppWarningException doesn't mean it.
Localized message is needed for this, so the class is the same constructure as BizLogicAppException.

MultipleAppException for warning does not seem to be needed so it does not exist.

See Also:
  • Constructor Details

    • AppWarningException

      public AppWarningException(@Nonnull String messageId, @Nonnull String... messageArgs)
      Constructs a new instance with messageId and messageArgs.
      Parameters:
      messageId - message ID
      messageArgs - message Arguments
    • AppWarningException

      public AppWarningException(@Nonnull AppExceptionFields warnFields, @Nonnull String messageId, @Nonnull String... messageArgs)
      Constructs a new instance with warn fields, messageId and message Arguments.
      Parameters:
      warnFields - fields related to the exeception. May be null, which means no fields designated.
      messageId - messageId. Cannot be null.
      messageArgs - message Arguments. May be null, which means no message arguments designated.
    • AppWarningException

      public AppWarningException(@Nonnull Locale locale, @Nonnull String messageId, @Nonnull String... messageArgs)
      Constructs a new instance with locale, messageId and message Arguments.
      Parameters:
      locale - locale. May be null, which means default locale is used.
      messageId - messageId. Cannot be null.
      messageArgs - message Arguments. May be null, which means no message arguments designated.
    • AppWarningException

      public AppWarningException(@Nonnull Locale locale, @Nonnull AppExceptionFields warnFields, @Nonnull String messageId, @Nonnull String... messageArgs)
      Constructs a new instance with locale, warn fields, messageId and message Arguments.
      Parameters:
      locale - locale. May be null, which means default locale is used.
      warnFields - fields related to the exeception. May be null, which means no fields designated.
      messageId - messageId. Cannot be null.
      messageArgs - message Arguments. May be null, which means no message arguments designated.
    • AppWarningException

      public AppWarningException(@Nonnull Locale locale, @Nullable String buttonId, @Nullable AppExceptionFields warnFields, @Nonnull String messageId, @Nonnull String... messageArgs)
      Constructs a new instance with warn fields, messageId and message Arguments.
      Parameters:
      locale - locale. May be null, which means default locale is used.
      buttonId - button ID.
      warnFields - fields related to the exeception. May be null, which means no fields designated.
      messageId - messageId. Cannot be null.
      messageArgs - message Arguments. May be null, which means no message arguments designated.
  • Method Details

    • getLocale

      @Nonnull public Locale getLocale()
      Returns locale.
      Returns:
      locale
    • getWarnFields

      @Nonnull public AppExceptionFields getWarnFields()
      Returns fields.
      Returns:
      warn fields
    • getMessageId

      @Nonnull public String getMessageId()
      Returns messageId.
      Returns:
      message ID
    • getMessageArgs

      @Nonnull public String[] getMessageArgs()
      Returns messageArgs.
      Returns:
      message arguments
    • getButtonId

      @Nullable public String getButtonId()
      Returns buttonId.
      Returns:
      button ID