Posts

Showing posts with the label MessageBoard

Creating Scheduler in liferay - creating the scheduler dynamically based on the user inputs

As we know creating the static scheduler  is very easy as we  defined in the following url as    http://liferaytutorial.blogspot.com/2013/08/creating-scheduler-in-liferay.html Sometimes it may require to create dynamic schedule. Liferay had some created predefined class. Scheduling : In Messageboard portlet , Take a look at the MBMailingListLocalServiceImpl of  " protected void scheduleMailingList(MBMailingList mailingList) " method               Calendar startDate = CalendarFactoryUtil.getCalendar(); CronText cronText = new CronText(startDate, CronText.MINUTELY_FREQUENCY, mailingList.getInReadInterval()); Trigger trigger = new CronTrigger(groupName, groupName, startDate.getTime(), null, cronText.toString());                 SchedulerEngineUtil.schedule( trigger , StorageType.MEMORY_CLUSTERED, null, DestinationNames.MESSAGE_BOARDS_MAILING_LIST, mailingLi...