use of fi.otavanopisto.muikku.search.SearchReindexEvent in project muikku by otavanopisto.
the class SystemReindexBackingBean method init.
@RequestAction
public String init() {
if (sessionController.hasPermission(MuikkuPermissions.ADMIN, null)) {
List<Task> tasks = null;
if (StringUtils.isNotBlank(getTask())) {
Task task = EnumUtils.getEnum(Task.class, getTask());
if (task == null) {
return NavigationRules.INTERNAL_ERROR;
} else {
tasks = Arrays.asList(task);
}
} else {
tasks = Arrays.asList(Task.values());
}
reindexEvent.fire(new SearchReindexEvent(tasks, resume != null ? resume : false));
}
return "/index.jsf?faces-redirect=true";
}
Aggregations