Tomer Saban has uploaded a new change for review. Change subject: webadmin: add waitForResult property to runMultipleAction ......................................................................
webadmin: add waitForResult property to runMultipleAction The waitForResult property is a flag to return the result after running the whole action and not just the can do action. Change-Id: Ia94ec1334f9d33fd74ac2c773a5ad1d25c82eb96 Signed-off-by: Alona Kaplan <alkap...@redhat.com> --- M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java 1 file changed, 38 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/98/41098/1 diff --git a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java index 1edfbb2..4ce9e01 100644 --- a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java +++ b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java @@ -517,7 +517,23 @@ } /** - * Run multiple actions using the same {@code VdcActionType}. + * RunMultipleActions without passing state. + * @param actionType The type of action to perform. + * @param parameters The parameters of the action. + * @param callback The callback to call after the operation happens. + * @param showErrorDialog Should we show an error dialog? + * @param waitForResult a flag to return the result after running the whole action and not just the can do actions. + */ + public void runMultipleAction(final VdcActionType actionType, + final List<VdcActionParametersBase> parameters, + final IFrontendMultipleActionAsyncCallback callback, + final boolean showErrorDialog, + final boolean waitForResult) { + runMultipleAction(actionType, parameters, false, callback, null, showErrorDialog, waitForResult); + } + + /** + * Run multiple without passing <code>showErrorDialog</code> and <code>waitForResult</code> * @param actionType The action type. * @param parameters The list of parameters. * @param isRunOnlyIfAllCanDoPass A flag to only run the actions if all can be completed. @@ -529,6 +545,26 @@ final boolean isRunOnlyIfAllCanDoPass, final IFrontendMultipleActionAsyncCallback callback, final Object state) { + runMultipleAction(actionType, parameters, isRunOnlyIfAllCanDoPass, callback, state, true, false); + } + + /** + * Run multiple actions using the same {@code VdcActionType}. + * @param actionType The action type. + * @param parameters The list of parameters. + * @param isRunOnlyIfAllCanDoPass A flag to only run the actions if all can be completed. + * @param callback The callback to call when the operation completes. + * @param state The state. + * @param showErrorDialog Should we show an error dialog? + * @param waitForResult a flag to return the result after running the whole action and not just the can do actions. + */ + public void runMultipleAction(final VdcActionType actionType, + final List<VdcActionParametersBase> parameters, + final boolean isRunOnlyIfAllCanDoPass, + final IFrontendMultipleActionAsyncCallback callback, + final Object state, + final boolean showErrorDialog, + final boolean waitForResult) { VdcOperationCallbackList<VdcOperation<VdcActionType, VdcActionParametersBase>, List<VdcReturnValueBase>> multiCallback = new VdcOperationCallbackList<VdcOperation<VdcActionType, VdcActionParametersBase>, List<VdcReturnValueBase>>() { @@ -576,7 +612,7 @@ List<VdcOperation<?, ?>> operationList = new ArrayList<VdcOperation<?, ?>>(); for (VdcActionParametersBase parameter: parameters) { VdcOperation<VdcActionType, VdcActionParametersBase> operation = new VdcOperation<VdcActionType, - VdcActionParametersBase>(actionType, parameter, true, multiCallback); + VdcActionParametersBase>(actionType, parameter, !waitForResult, multiCallback); operationList.add(operation); } if (operationList.isEmpty()) { -- To view, visit https://gerrit.ovirt.org/41098 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia94ec1334f9d33fd74ac2c773a5ad1d25c82eb96 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Tomer Saban <tsa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches