Package io.jmix.ui.util
Interface OperationResult
- All Known Implementing Classes:
FailedOperationResult
,SuccessOperationResult
,UnknownOperationResult
public interface OperationResult
Operation result object.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptioncompose
(Supplier<OperationResult> nextStep) Creates new operation result that represents composition of two operation results.static OperationResult
fail()
Adds fail callback to the operation result.static OperationResult
success()
Adds success callback to the operation result.
-
Method Details
-
fail
-
success
-
getStatus
OperationResult.Status getStatus()- Returns:
- status of the operation
-
compose
Creates 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.- Parameters:
nextStep
- the next operation result supplier- Returns:
- new composite operation result
-
then
Adds success callback to the operation result.- Parameters:
runnable
- callback- Returns:
- this
-
otherwise
Adds fail callback to the operation result.- Parameters:
runnable
- callback- Returns:
- this
-