Package io.jmix.flowui.util
Class UnknownOperationResult
java.lang.Object
io.jmix.flowui.util.UnknownOperationResult
- All Implemented Interfaces:
OperationResult
Represents the result of an operation with an
UNKNOWN status.
This class is used when the success or failure state of the operation
cannot be determined immediately, and provides mechanisms for defining
callbacks for success and failure events.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.util.OperationResult
OperationResult.Status -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompose(Supplier<OperationResult> nextStep) Creates new operation result that represents composition of two operation results.voidfail()Marks the operation result as failed and notify all associated failure listeners.Adds fail callback to the operation result.voidresolveWith(OperationResult result) Resolve this result depending on the passed result.voidresume(OperationResult result) Resume action depending on the passed result.voidsuccess()Marks the operation result as successful and notifies all associated success listeners by running their callbacks.Adds success callback to the operation result.toString()
-
Constructor Details
-
UnknownOperationResult
public UnknownOperationResult()
-
-
Method Details
-
getStatus
- Specified by:
getStatusin interfaceOperationResult- Returns:
- status of the operation
-
compose
Description copied from interface:OperationResultCreates new operation result that represents composition of two operation results. If this result is resolved as successful, then the second result will be obtained from the passed supplier.- Specified by:
composein interfaceOperationResult- Parameters:
nextStep- the next operation result supplier- Returns:
- new composite operation result
-
then
Description copied from interface:OperationResultAdds success callback to the operation result.- Specified by:
thenin interfaceOperationResult- Parameters:
runnable- callback- Returns:
- this
-
otherwise
Description copied from interface:OperationResultAdds fail callback to the operation result.- Specified by:
otherwisein interfaceOperationResult- Parameters:
runnable- callback- Returns:
- this
-
fail
public void fail()Marks the operation result as failed and notify all associated failure listeners. -
success
public void success()Marks the operation result as successful and notifies all associated success listeners by running their callbacks. -
resolveWith
Resolve this result depending on the passed result. Alias forresume(OperationResult).- Parameters:
result- dependency
-
resume
Resume action depending on the passed result.- Parameters:
result- dependency
-
toString
-