public static class SmartServiceException.Builder
extends java.lang.Object
userMessage
, then build
. See the example in the main class javadoc.Constructor and Description |
---|
Builder(java.lang.Class smartServiceClass,
java.lang.String smartServiceBundleName,
java.lang.Throwable cause)
Construct a
SmartServiceException.Builder using the class that is throwing the exception,
the bundle name, and the cause of the exception. |
Builder(java.lang.Class smartServiceClass,
java.lang.Throwable cause)
Construct a
SmartServiceException.Builder using the class that is throwing the exception
and the cause of the exception. |
Modifier and Type | Method and Description |
---|---|
SmartServiceException.Builder |
addCauseToAlertMessageArgs()
Specifies that the message of the cause exception should be added to the list of
arguments passed to the alert message.
|
SmartServiceException.Builder |
addCauseToUserMessageArgs()
Specifies that the message of the cause exception should be added to the list of
arguments passed to the user message.
|
SmartServiceException.Builder |
alertMessage(java.lang.String key,
java.lang.Object... args)
Set the message that will be displayed in the error alert for both
attended and unattended nodes.
|
SmartServiceException |
build()
After setting the
userMessage , call build to create an instance of the SmartServiceException with
the message set. |
SmartServiceException.Builder |
errorCode(ErrorCode errorCode)
Set the ErrorCode for the SmartServiceException that is to be built.
|
SmartServiceException.Builder |
userMessage(java.lang.String key,
java.lang.Object... args)
Set the message that will be displayed in the user interface for attended nodes and in the error alert for both
attended and unattended nodes if
alertMessage is not set. |
public Builder(java.lang.Class smartServiceClass, java.lang.Throwable cause)
SmartServiceException.Builder
using the class that is throwing the exception
and the cause of the exception.smartServiceClass
- the class that is throwing the exceptioncause
- the Throwable that was caught, causing the SmartServiceException to be thrownpublic Builder(java.lang.Class smartServiceClass, java.lang.String smartServiceBundleName, java.lang.Throwable cause)
SmartServiceException.Builder
using the class that is throwing the exception,
the bundle name, and the cause of the exception.smartServiceClass
- the class that is throwing the exceptionsmartServiceBundleName
- the bundle name used to locate the i18n properties filecause
- the Throwable that was caught, causing the SmartServiceException to be thrownpublic SmartServiceException.Builder alertMessage(java.lang.String key, java.lang.Object... args)
key
- the key to the error message in the bundleargs
- the set of parameters that are passed with the error message to include dynamic information in the
message if the value of the error bundle contains templates.userMessage
public SmartServiceException.Builder addCauseToAlertMessageArgs()
public SmartServiceException.Builder userMessage(java.lang.String key, java.lang.Object... args)
alertMessage
is not set. The message is used when the smart service throws
the exception.key
- the key to the error message in the bundleargs
- the set of parameters that are passed with the error message to include dynamic information in the
message if the value of the error bundle contains templates.public SmartServiceException.Builder addCauseToUserMessageArgs()
public SmartServiceException.Builder errorCode(ErrorCode errorCode)
errorCode
- public SmartServiceException build()
userMessage
, call build
to create an instance of the SmartServiceException with
the message set.Copyright © 2003-2024 Appian Corporation. All Rights Reserved.