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