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:
    com.google.gwt.event.shared.HasHandlers
  Direct Known Subclasses:
    AIResponse, AsyncMultipleValuesGenerationResult, AsyncSingleValueGenerationResult, BuildViaAIResponse, SuggestRecordSummaryTitleResult, SummarizeRecordsPartialResult, SummarizeRecordsResult, SummarizeValueResult

      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 and Description
    `AsyncOperationResult()`
    `AsyncOperationResult(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getCancellationReason()` If this is a CANCELED-`type` result, an optional statement to be displayed to the user of the reason for cancellation.
    `java.lang.String` | `getDisabledMessage()` If this is a DISABLED-`type` result, an optional statement to be displayed to the user that the operation was disabled.
    `java.lang.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(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `AsyncOperationResultType` | `getType()` The result type.
    `AsyncOperationResult` | `setCancellationReason(java.lang.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(java.lang.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(java.lang.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 Detail

    - #### AsyncOperationResult

          public AsyncOperationResult()

    - #### AsyncOperationResult

          public AsyncOperationResult(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static AsyncOperationResult getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setCancellationReason

          public AsyncOperationResult setCancellationReason(java.lang.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 java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.lang.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*