1
14
15 package com.liferay.portlet.calendar.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class CalEventServiceUtil {
42 public static com.liferay.portlet.calendar.model.CalEvent addEvent(
43 java.lang.String title, java.lang.String description,
44 int startDateMonth, int startDateDay, int startDateYear,
45 int startDateHour, int startDateMinute, int endDateMonth,
46 int endDateDay, int endDateYear, int durationHour, int durationMinute,
47 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
48 boolean repeating,
49 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
50 int firstReminder, int secondReminder,
51 com.liferay.portal.service.ServiceContext serviceContext)
52 throws com.liferay.portal.PortalException,
53 com.liferay.portal.SystemException {
54 return getService()
55 .addEvent(title, description, startDateMonth, startDateDay,
56 startDateYear, startDateHour, startDateMinute, endDateMonth,
57 endDateDay, endDateYear, durationHour, durationMinute, allDay,
58 timeZoneSensitive, type, repeating, recurrence, remindBy,
59 firstReminder, secondReminder, serviceContext);
60 }
61
62 public static void deleteEvent(long eventId)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException {
65 getService().deleteEvent(eventId);
66 }
67
68 public static java.io.File exportEvent(long eventId)
69 throws com.liferay.portal.PortalException,
70 com.liferay.portal.SystemException {
71 return getService().exportEvent(eventId);
72 }
73
74 public static java.io.File exportGroupEvents(long groupId,
75 java.lang.String fileName)
76 throws com.liferay.portal.PortalException,
77 com.liferay.portal.SystemException {
78 return getService().exportGroupEvents(groupId, fileName);
79 }
80
81 public static com.liferay.portlet.calendar.model.CalEvent getEvent(
82 long eventId)
83 throws com.liferay.portal.PortalException,
84 com.liferay.portal.SystemException {
85 return getService().getEvent(eventId);
86 }
87
88 public static void importICal4j(long groupId, java.io.File file)
89 throws com.liferay.portal.PortalException,
90 com.liferay.portal.SystemException {
91 getService().importICal4j(groupId, file);
92 }
93
94 public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
95 long eventId, java.lang.String title, java.lang.String description,
96 int startDateMonth, int startDateDay, int startDateYear,
97 int startDateHour, int startDateMinute, int endDateMonth,
98 int endDateDay, int endDateYear, int durationHour, int durationMinute,
99 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
100 boolean repeating,
101 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
102 int firstReminder, int secondReminder,
103 com.liferay.portal.service.ServiceContext serviceContext)
104 throws com.liferay.portal.PortalException,
105 com.liferay.portal.SystemException {
106 return getService()
107 .updateEvent(eventId, title, description, startDateMonth,
108 startDateDay, startDateYear, startDateHour, startDateMinute,
109 endDateMonth, endDateDay, endDateYear, durationHour,
110 durationMinute, allDay, timeZoneSensitive, type, repeating,
111 recurrence, remindBy, firstReminder, secondReminder, serviceContext);
112 }
113
114 public static CalEventService getService() {
115 if (_service == null) {
116 _service = (CalEventService)PortalBeanLocatorUtil.locate(CalEventService.class.getName());
117
118 ReferenceRegistry.registerReference(CalEventServiceUtil.class,
119 "_service");
120 MethodCache.remove(CalEventService.class);
121 }
122
123 return _service;
124 }
125
126 public void setService(CalEventService service) {
127 MethodCache.remove(CalEventService.class);
128
129 _service = service;
130
131 ReferenceRegistry.registerReference(CalEventServiceUtil.class,
132 "_service");
133 MethodCache.remove(CalEventService.class);
134 }
135
136 private static CalEventService _service;
137 }