private List<NextEventsDate> getNextEvents(boolean fetchOnlyImportant, String... almanachIds) {
   List<NextEventsDate> result = new ArrayList<NextEventsDate>();
   try {
     List<EventOccurrence> events = getAlmanachBm().getNextEventOccurrences(almanachIds);
     Date today = new Date();
     Date date = null;
     NextEventsDate nextEventsDate = null;
     for (EventOccurrence event : events) {
       if (Administration.get()
           .isComponentAvailable(event.getEventDetail().getInstanceId(), getUserId())) {
         if (!fetchOnlyImportant || (fetchOnlyImportant && event.isPriority())) {
           Date eventDate = event.getStartDate().asDate();
           if (DateUtil.compareTo(today, eventDate, true) != 0) {
             if (date == null || DateUtil.compareTo(date, eventDate, true) != 0) {
               nextEventsDate = new NextEventsDate(eventDate);
               result.add(nextEventsDate);
               date = eventDate;
             }
             nextEventsDate.addEvent(event);
           }
         }
       }
     }
   } catch (Exception e) {
     SilverTrace.error("lookAurora", "LookAuroraHelper.getNextEvents", "", e);
   }
   return result;
 }
  public List<EventOccurrence> getTodayEvents() {
    List<EventOccurrence> availableEvents = new ArrayList<EventOccurrence>();
    try {
      List<EventOccurrence> events =
          getAlmanachBm()
              .getEventOccurrencesInPeriod(
                  Period.from(new Date(), PeriodType.day, "fr"), getAlmanachIds());
      for (EventOccurrence event : events) {
        if (Administration.get()
            .isComponentAvailable(event.getEventDetail().getInstanceId(), getUserId())) {
          availableEvents.add(event);
        }
      }
    } catch (Exception e) {
      SilverTrace.error("lookAurora", "LookAuroraHelper.getTodayEvents", "", e);
    }

    return availableEvents;
  }