public void loadPatches() { patchManager.getPatches( new SimpleCallback<Patches>() { @Override public void onSuccess(final Patches patches) { getView().update(patches); } }); }
public void launchApplyWizard() { // this callback is directly called from the standalone branch // or after the running server instances are retrieved in the domain branch final Callback<ApplyContext, Throwable> contextCallback = new Callback<ApplyContext, Throwable>() { @Override public void onFailure(final Throwable caught) { Log.error("Unable to launch apply patch wizard", caught); Console.error( Console.CONSTANTS.patch_manager_apply_new_wizard_error(), caught.getMessage()); } @Override public void onSuccess(final ApplyContext context) { window = new DefaultWindow(Console.CONSTANTS.patch_manager_apply_patch()); window.setWidth(480); window.setHeight(NORMAL_WINDOW_HEIGHT); window.trapWidget( new ApplyWizard( PatchManagerPresenter.this, context, Console.CONSTANTS.patch_manager_apply_patch(), dispatcher, patchManager) .asWidget()); window.setGlassEnabled(true); window.center(); } }; if (bootstrapContext.isStandalone()) { contextCallback.onSuccess( new ApplyContext( true, null, Collections.<String>emptyList(), patchManager.baseAddress(), bootstrapContext.getProperty(BootstrapContext.PATCH_API))); } else { final String host = domainManager.getSelectedHost(); dispatcher.execute( new DMRAction(getRunningServersOp(host)), new GetRunningServersCallback(contextCallback) { @Override protected void onServers(final List<String> runningServers) { contextCallback.onSuccess( new ApplyContext( false, host, runningServers, patchManager.baseAddress(), bootstrapContext.getProperty(BootstrapContext.PATCH_API))); } }); } }