*/
@Override
@SuppressWarnings("unused")
public void event(UserRequest ureq, Component source, Event event) {
if (STATISTICS_FULL_RECALCULATION_TRIGGER_BUTTON.equals(event.getCommand())) {
StatisticUpdateManager statisticUpdateManager = getStatisticUpdateManager();
if (statisticUpdateManager==null) {
log_.info("event: UpdateStatisticsJob configured, but no StatisticManager available");
} else {
String title = getTranslator().translate("statistics.fullrecalculation.really.title");
String text = getTranslator().translate("statistics.fullrecalculation.really.text");
dialogCtr_ = DialogBoxUIFactory.createYesNoDialog(ureq, getWindowControl(), title, text);
listenTo(dialogCtr_);
dialogCtr_.activate();
}
} else if (STATISTICS_UPDATE_TRIGGER_BUTTON.equals(event.getCommand())) {
StatisticUpdateManager statisticUpdateManager = getStatisticUpdateManager();
if (statisticUpdateManager==null) {
log_.info("event: UpdateStatisticsJob configured, but no StatisticManager available");
} else {
statisticUpdateManager.updateStatistics(false, getUpdateFinishedCallback());
refreshUIState();
content.put("updatecontrol", new JSAndCSSComponent("intervall", this.getClass(), null, null, false, null, 3000));
getInitialComponent().setDirty(true);
}
}