Package com.smartgwt.client.util

# Class AsyncOperationResult

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.core.RefDataClass
com.smartgwt.client.util.AsyncOperationResult

All Implemented Interfaces:
  `HasHandlers`

Direct Known Subclasses:
  `AIResponse`, `AsyncMultipleValuesGenerationResult`, `AsyncSingleValueGenerationResult`, `BuildViaAIResponse`, `DataQuestionResult`, `HiliteViaAIResult`, `SuggestRecordSummaryTitleResult`, `SummarizeRecordsResult`

public class AsyncOperationResult extends RefDataClass
An object containing information about the result of an asynchronous operation.

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.core.RefDataClass

  `id`

  ### Fields inherited from class com.smartgwt.client.core.DataClass

  `factoryCreated, factoryProperties`

  ### Fields inherited from class com.smartgwt.client.core.JsObject

  `jsObj`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AsyncOperationResult()`
  `AsyncOperationResult(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getCancellationReason()`
  If this is a CANCELED-`type` result, an optional statement to be displayed to the user of the reason for cancellation.
  `String`
  `getDisabledMessage()`
  If this is a DISABLED-`type` result, an optional statement to be displayed to the user that the operation was disabled.
  `String`
  `getErrorMessage()`
  If this is an ERROR-`type` result, an optional statement to be displayed to the user of the error that occurred.
  `static AsyncOperationResult`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `AsyncOperationResultType`
  `getType()`
  The result type.
  `AsyncOperationResult`
  `setCancellationReason(String cancellationReason)`
  If this is a CANCELED-`type` result, an optional statement to be displayed to the user of the reason for cancellation.
  `AsyncOperationResult`
  `setDisabledMessage(String disabledMessage)`
  If this is a DISABLED-`type` result, an optional statement to be displayed to the user that the operation was disabled.
  `AsyncOperationResult`
  `setErrorMessage(String errorMessage)`
  If this is an ERROR-`type` result, an optional statement to be displayed to the user of the error that occurred.
  `AsyncOperationResult`
  `setType(AsyncOperationResultType type)`
  The result type.

  ### Methods inherited from class com.smartgwt.client.core.RefDataClass

  `getRef, getRef, internalSetID`

  ### Methods inherited from class com.smartgwt.client.core.DataClass

  `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

  ### Methods inherited from class com.smartgwt.client.core.JsObject

  `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AsyncOperationResult

    public AsyncOperationResult()

  - ### AsyncOperationResult

    public AsyncOperationResult(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static AsyncOperationResult getOrCreateRef(JavaScriptObject jsObj)

  - ### setCancellationReason

    public AsyncOperationResult setCancellationReason(String cancellationReason)
    If this is a CANCELED-`type` result, an optional statement to be displayed to the user of the reason for cancellation.
    Parameters:
      `cancellationReason` - New cancellationReason value. Default value is null
    Returns:
      `AsyncOperationResult` instance, for chaining setter calls
    See Also:
      - `CancellationController.cancel()`
      - `HTMLString`

  - ### getCancellationReason

    public String getCancellationReason()
    If this is a CANCELED-`type` result, an optional statement to be displayed to the user of the reason for cancellation.
    Returns:
      Current cancellationReason value. Default value is null
    See Also:
      - `CancellationController.cancel()`
      - `HTMLString`

  - ### setDisabledMessage

    public AsyncOperationResult setDisabledMessage(String disabledMessage)
    If this is a DISABLED-`type` result, an optional statement to be displayed to the user that the operation was disabled. This may include information about the reason why the operation was disabled.

    It is recommended to use the past tense, because this message may continue to be displayed to the user when the conditions for the operation being disabled are no longer the case.

    Parameters:
      `disabledMessage` - New disabledMessage value. Default value is null
    Returns:
      `AsyncOperationResult` instance, for chaining setter calls
    See Also:
      - `HTMLString`

  - ### getDisabledMessage

    public String getDisabledMessage()
    If this is a DISABLED-`type` result, an optional statement to be displayed to the user that the operation was disabled. This may include information about the reason why the operation was disabled.

    It is recommended to use the past tense, because this message may continue to be displayed to the user when the conditions for the operation being disabled are no longer the case.

    Returns:
      Current disabledMessage value. Default value is null
    See Also:
      - `HTMLString`

  - ### setErrorMessage

    public AsyncOperationResult setErrorMessage(String errorMessage)
    If this is an ERROR-`type` result, an optional statement to be displayed to the user of the error that occurred.
    Parameters:
      `errorMessage` - New errorMessage value. Default value is null
    Returns:
      `AsyncOperationResult` instance, for chaining setter calls
    See Also:
      - `HTMLString`

  - ### getErrorMessage

    public String getErrorMessage()
    If this is an ERROR-`type` result, an optional statement to be displayed to the user of the error that occurred.
    Returns:
      Current errorMessage value. Default value is null
    See Also:
      - `HTMLString`

  - ### setType

    public AsyncOperationResult setType(AsyncOperationResultType type)
    The result type.

    `null` is interpreted as a non-successful result type.

    Parameters:
      `type` - New type value. Default value is *initialized by the implementation*
    Returns:
      `AsyncOperationResult` instance, for chaining setter calls

  - ### getType

    public AsyncOperationResultType getType()
    The result type.

    `null` is interpreted as a non-successful result type.

    Returns:
      Current type value. Default value is *initialized by the implementation*