@Test public void testStopScanner() { presenter.stopScanner(); verify(view).disableActions(); verify(view).setStartScannerState(State.ENABLED); verify(view).setStopScannerState(State.DISABLED); verify(view).setScanNowState(State.ENABLED); verify(view).setUpgradeState(State.ENABLED); }
public void stopScanner() { view.disableActions(); ruleCapabilitiesService.call(new RemoteCallback<Void>() { @Override public void callback(final Void response) { scannerStatus = KieScannerStatus.STOPPED; setScannerStatus(); updateViewState(); } }, new ErrorCallback<Object>() { @Override public boolean error(final Object o, final Throwable throwable) { notification.fire(new NotificationEvent(view.getStopScannerErrorMessage(), NotificationEvent.NotificationType.ERROR)); updateViewState(); return false; } }).stopScanner(containerSpec); }
ContainerRulesConfigPresenter { public void stopScanner() { view.disableActions(); ruleCapabilitiesService.call(new RemoteCallback<Void>() { @Override public void callback(final Void response) { scannerStatus = KieScannerStatus.STOPPED; setScannerStatus(); updateViewState(); } }, new ErrorCallback<Object>() { @Override public boolean error(final Object o, final Throwable throwable) { notification.fire(new NotificationEvent(view.getStopScannerErrorMessage(), NotificationEvent.NotificationType.ERROR)); updateViewState(); return false; } }).stopScanner(containerSpec); } }
ContainerRulesConfigPresenter { public void stopScanner() { view.disableActions(); ruleCapabilitiesService.call(new RemoteCallback<Void>() { @Override public void callback(final Void response) { scannerStatus = KieScannerStatus.STOPPED; setScannerStatus(); updateViewState(); } }, new ErrorCallback<Object>() { @Override public boolean error(final Object o, final Throwable throwable) { notification.fire(new NotificationEvent(view.getStopScannerErrorMessage(), NotificationEvent.NotificationType.ERROR)); updateViewState(); return false; } }).stopScanner(containerSpec); } @Inject  ContainerRulesConfigPresenter(final Logger logger,
                                         final View view,
                                         final Caller<RuleCapabilitiesService> ruleCapabilitiesService,
                                         final Event<NotificationEvent> notification); }
ContainerRulesConfigPresenter { public void stopScanner() { view.disableActions(); ruleCapabilitiesService.call(new RemoteCallback<Void>() { @Override public void callback(final Void response) { scannerStatus = KieScannerStatus.STOPPED; setScannerStatus(); updateViewState(); } }, new ErrorCallback<Object>() { @Override public boolean error(final Object o, final Throwable throwable) { notification.fire(new NotificationEvent(view.getStopScannerErrorMessage(), NotificationEvent.NotificationType.ERROR)); updateViewState(); return false; } }).stopScanner(containerSpec); } @Inject  ContainerRulesConfigPresenter(final Logger logger,
                                         final View view,
                                         final Caller<RuleCapabilitiesService> ruleCapabilitiesService,
                                         final Event<NotificationEvent> notification); @PostConstruct void init(); View getView(); void setup(final ContainerSpec containerSpec,
                      final RuleConfig ruleConfig); void setVersion(final String version); void startScanner(final String interval,
                             final String timeUnit); void stopScanner(); void scanNow(); void upgrade(final String version); void onConfigUpdate(@Observes final RuleConfigUpdated configUpdated); void onRuleConfigUpdate(@Observes final RuleConfigUpdated configUpdate); }
ContainerRulesConfigPresenter { public void stopScanner() { view.disableActions(); ruleCapabilitiesService.call(new RemoteCallback<Void>() { @Override public void callback(final Void response) { scannerStatus = KieScannerStatus.STOPPED; setScannerStatus(); updateViewState(); } }, new ErrorCallback<Object>() { @Override public boolean error(final Object o, final Throwable throwable) { notification.fire(new NotificationEvent(view.getStopScannerErrorMessage(), NotificationEvent.NotificationType.ERROR)); updateViewState(); return false; } }).stopScanner(containerSpec); } @Inject  ContainerRulesConfigPresenter(final Logger logger,
                                         final View view,
                                         final Caller<RuleCapabilitiesService> ruleCapabilitiesService,
                                         final Event<NotificationEvent> notification); @PostConstruct void init(); View getView(); void setup(final ContainerSpec containerSpec,
                      final RuleConfig ruleConfig); void setVersion(final String version); void startScanner(final String interval,
                             final String timeUnit); void stopScanner(); void scanNow(); void upgrade(final String version); void onConfigUpdate(@Observes final RuleConfigUpdated configUpdated); void onRuleConfigUpdate(@Observes final RuleConfigUpdated configUpdate);  }