Module jp.ecuacion.lib.core
Class AppWarningException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jp.ecuacion.lib.core.exception.checked.AppWarningException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionAppWarningException(String messageId) Constructs a new instance withmessageId.AppWarningException(String messageId, String... messageArgs) Constructs a new instance withmessageIdandmessageArgs.AppWarningException(Locale locale, String messageId) Constructs a new instance with locale and messageId.AppWarningException(Locale locale, String messageId, String... messageArgs) Constructs a new instance with locale, messageId and message Arguments.AppWarningException(Locale locale, String buttonId, AppExceptionFields warnFields, String messageId, String... messageArgs) Constructs a new instance with warn fields, messageId and message Arguments.AppWarningException(Locale locale, AppExceptionFields warnFields, String messageId) Constructs a new instance with locale, warn fields and messageId.AppWarningException(Locale locale, AppExceptionFields warnFields, String messageId, String... messageArgs) Constructs a new instance with locale, warn fields, messageId and message Arguments.AppWarningException(AppExceptionFields warnFields, String messageId) Constructs a new instance with warn fields and messageId.AppWarningException(AppExceptionFields warnFields, String messageId, String... messageArgs) Constructs a new instance with warn fields, messageId and message Arguments. -
Method Summary
Modifier and TypeMethodDescriptionReturns buttonId.Returns locale.String[]Returns messageArgs.Returns messageId.Returns fields.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AppWarningException
Constructs a new instance withmessageId.- Parameters:
messageId- message ID
-
AppWarningException
Constructs a new instance withmessageIdandmessageArgs.- Parameters:
messageId- message IDmessageArgs- message Arguments
-
AppWarningException
Constructs a new instance with warn fields and messageId.- Parameters:
warnFields- fields related to the exeception. May be null, which means no fields designated.messageId- messageId. Cannot benull.
-
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 benull.messageArgs- message Arguments. May be null, which means no message arguments designated.
-
AppWarningException
Constructs a new instance with locale and messageId.- Parameters:
locale- locale. May be null, which means default locale is used.messageId- messageId. Cannot benull.
-
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 benull.messageArgs- message Arguments. May be null, which means no message arguments designated.
-
AppWarningException
public AppWarningException(@Nonnull Locale locale, @Nonnull AppExceptionFields warnFields, @Nonnull String messageId) Constructs a new instance with locale, warn fields and messageId.- 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 benull.
-
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 benull.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 benull.messageArgs- message Arguments. May be null, which means no message arguments designated.
-
-
Method Details
-
getLocale
Returns locale.- Returns:
- locale
-
getWarnFields
Returns fields.- Returns:
- warn fields
-
getMessageId
Returns messageId.- Returns:
- message ID
-
getMessageArgs
Returns messageArgs.- Returns:
- message arguments
-
getButtonId
Returns buttonId.- Returns:
- button ID
-