List of usage examples for com.liferay.portal.kernel.util Time MONTH
long MONTH
To view the source code for com.liferay.portal.kernel.util Time MONTH.
Click Source Link
From source file:com.liferay.calendar.service.impl.CalendarBookingLocalServiceImpl.java
License:Open Source License
@Override public void checkCalendarBookings() throws PortalException { Date now = new Date(); List<CalendarBooking> calendarBookings = calendarBookingFinder.findByFutureReminders(now.getTime()); long endTime = now.getTime() + Time.MONTH; calendarBookings = RecurrenceUtil.expandCalendarBookings(calendarBookings, now.getTime(), endTime, 1); for (CalendarBooking calendarBooking : calendarBookings) { try {// w w w . j av a 2 s. c om Company company = companyPersistence.findByPrimaryKey(calendarBooking.getCompanyId()); if (company.isActive()) { NotificationUtil.notifyCalendarBookingReminders(calendarBooking, now.getTime()); } } catch (PortalException pe) { throw pe; } catch (SystemException se) { throw se; } catch (Exception e) { throw new SystemException(e); } } }