ActionResult.Builder Class

Contains methods to build and validate an instance of the Messaging.ActionResult class.

Messaging

See the example for the NotificationActionHandler Interface.

The following are methods for ActionResult.Builder.

  • build()

    Validates and returns the action result instance created by using the ActionResult.Builder methods.

  • withErrorCode(errorCode)

    Sets the error message associated with the action error.

  • withMessage(message)

    Sets the success or error message associated with the execution of the action.

  • withSuccess(success)

    Sets a Boolean that informs the user whether the execution of the action was successful (true) or not (false).

Validates and returns the action result instance created by using the ActionResult.Builder methods.

public Messaging.ActionResult build()

Type: Messaging.ActionResult

Sets the error message associated with the action error.

public Messaging.ActionResult.Builder withErrorCode(Messaging.ActionError errorCode)

Type: Messaging.ActionResult.Builder

Sets the success or error message associated with the execution of the action.

public Messaging.ActionResult.Builder withMessage(String message)

  • message:

    Type: String

    The notification message.

Type: Messaging.ActionResult.Builder

Sets a Boolean that informs the user whether the execution of the action was successful (true) or not (false).

public Messaging.ActionResult.Builder withSuccess(Boolean success)

Type: Messaging.ActionResult.Builder