Reputation: 1349
I am using liferay 6.1 CE and I want to override remiderUser
method for event in calender portlet.
I have tried to find but I found the way to override CalEventLocalService
but I didn't find any method which sending the eventReminder
to user.
I have gone through following links.
https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/overriding-a-portal-service-using-a-hook https://www.liferay.com/community/forums/-/message_boards/message/29120467 https://www.liferay.com/community/forums/-/message_boards/message/29120467
Updated
Following class I have created and I am trying to override the checkEvents
method
public class MyCalEventServiceImple extends CalEventLocalServiceWrapper {
public MyCalEventServiceImple(CalEventLocalService calEventLocalService) {
super(calEventLocalService);
// TODO Auto-generated constructor stub
}
public CalEvent addEvent(
long userId, String title, String description, String location,
int startDateMonth, int startDateDay, int startDateYear,
int startDateHour, int startDateMinute, int endDateMonth,
int endDateDay, int endDateYear, int durationHour,
int durationMinute, boolean allDay, boolean timeZoneSensitive,
String type, boolean repeating, TZSRecurrence recurrence,
int remindBy, int firstReminder, int secondReminder,
ServiceContext serviceContext)
throws PortalException, SystemException {
// Event
System.out.println("*****************CALLED Success.....**********");
return null;
}
}
but not found any way to achieve this.
Anyone can help??
Thanks in advance.
Upvotes: 1
Views: 656
Reputation: 2924
If you look at the liferay source code remindUser
(which is protected) is the method that sends reminder to user about events. If you dig more into the liferay source code you can find that checkEvents
(which is public) is the method which ultimately calls remindUser
method. So, I think you can use checkEvents
method for your requirement.
EDIT : You can use service wrapper hook to override liferay service classes. Service Wrapper Hook
Upvotes: 3