001
014
015 package com.liferay.portlet.calendar.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class CalEventServiceUtil {
033 public static com.liferay.portlet.calendar.model.CalEvent addEvent(
034 java.lang.String title, java.lang.String description,
035 int startDateMonth, int startDateDay, int startDateYear,
036 int startDateHour, int startDateMinute, int endDateMonth,
037 int endDateDay, int endDateYear, int durationHour, int durationMinute,
038 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
039 boolean repeating,
040 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
041 int firstReminder, int secondReminder,
042 com.liferay.portal.service.ServiceContext serviceContext)
043 throws com.liferay.portal.kernel.exception.PortalException,
044 com.liferay.portal.kernel.exception.SystemException {
045 return getService()
046 .addEvent(title, description, startDateMonth, startDateDay,
047 startDateYear, startDateHour, startDateMinute, endDateMonth,
048 endDateDay, endDateYear, durationHour, durationMinute, allDay,
049 timeZoneSensitive, type, repeating, recurrence, remindBy,
050 firstReminder, secondReminder, serviceContext);
051 }
052
053 public static void deleteEvent(long eventId)
054 throws com.liferay.portal.kernel.exception.PortalException,
055 com.liferay.portal.kernel.exception.SystemException {
056 getService().deleteEvent(eventId);
057 }
058
059 public static java.io.File exportEvent(long eventId)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 return getService().exportEvent(eventId);
063 }
064
065 public static java.io.File exportGroupEvents(long groupId,
066 java.lang.String fileName)
067 throws com.liferay.portal.kernel.exception.PortalException,
068 com.liferay.portal.kernel.exception.SystemException {
069 return getService().exportGroupEvents(groupId, fileName);
070 }
071
072 public static com.liferay.portlet.calendar.model.CalEvent getEvent(
073 long eventId)
074 throws com.liferay.portal.kernel.exception.PortalException,
075 com.liferay.portal.kernel.exception.SystemException {
076 return getService().getEvent(eventId);
077 }
078
079 public static void importICal4j(long groupId, java.io.File file)
080 throws com.liferay.portal.kernel.exception.PortalException,
081 com.liferay.portal.kernel.exception.SystemException {
082 getService().importICal4j(groupId, file);
083 }
084
085 public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
086 long eventId, java.lang.String title, java.lang.String description,
087 int startDateMonth, int startDateDay, int startDateYear,
088 int startDateHour, int startDateMinute, int endDateMonth,
089 int endDateDay, int endDateYear, int durationHour, int durationMinute,
090 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
091 boolean repeating,
092 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
093 int firstReminder, int secondReminder,
094 com.liferay.portal.service.ServiceContext serviceContext)
095 throws com.liferay.portal.kernel.exception.PortalException,
096 com.liferay.portal.kernel.exception.SystemException {
097 return getService()
098 .updateEvent(eventId, title, description, startDateMonth,
099 startDateDay, startDateYear, startDateHour, startDateMinute,
100 endDateMonth, endDateDay, endDateYear, durationHour,
101 durationMinute, allDay, timeZoneSensitive, type, repeating,
102 recurrence, remindBy, firstReminder, secondReminder, serviceContext);
103 }
104
105 public static CalEventService getService() {
106 if (_service == null) {
107 _service = (CalEventService)PortalBeanLocatorUtil.locate(CalEventService.class.getName());
108 }
109
110 return _service;
111 }
112
113 public void setService(CalEventService service) {
114 _service = service;
115 }
116
117 private static CalEventService _service;
118 }