class ContainerRulesConfigPresenter {

    public void startScanner(final String interval,
                             final String timeUnit) {
        if (interval.trim().isEmpty()) {
            view.errorOnInterval();
            return;
        }
        Long actualInterval = calculateInterval(Long.valueOf(checkNotEmpty("interval",
                                                                           interval)),
                                                timeUnit);

        view.disableActions();
        ruleCapabilitiesService.call(new RemoteCallback<Void>() {
                                         @Override
                                         public void callback(final Void response) {
                                             scannerStatus = KieScannerStatus.STARTED;
                                             setScannerStatus();
                                             updateViewState();
                                         }
                                     },
                                     new ErrorCallback<Object>() {
                                         @Override
                                         public boolean error(final Object o,
                                                              final Throwable throwable) {
                                             notification.fire(new NotificationEvent(view.getStartScannerErrorMessage(),
                                                                                     NotificationEvent.NotificationType.ERROR));
                                             updateViewState();
                                             return false;
                                         }
                                     }).startScanner(containerSpec,
                                                     actualInterval);
    }

    @Inject public  ContainerRulesConfigPresenter(final Logger logger,
                                         final View view,
                                         final Caller<RuleCapabilitiesService> ruleCapabilitiesService,
                                         final Event<NotificationEvent> notification);

}