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 CalEventLocalServiceUtil {
42 public static com.liferay.portlet.calendar.model.CalEvent addCalEvent(
43 com.liferay.portlet.calendar.model.CalEvent calEvent)
44 throws com.liferay.portal.SystemException {
45 return getService().addCalEvent(calEvent);
46 }
47
48 public static com.liferay.portlet.calendar.model.CalEvent createCalEvent(
49 long eventId) {
50 return getService().createCalEvent(eventId);
51 }
52
53 public static void deleteCalEvent(long eventId)
54 throws com.liferay.portal.PortalException,
55 com.liferay.portal.SystemException {
56 getService().deleteCalEvent(eventId);
57 }
58
59 public static void deleteCalEvent(
60 com.liferay.portlet.calendar.model.CalEvent calEvent)
61 throws com.liferay.portal.SystemException {
62 getService().deleteCalEvent(calEvent);
63 }
64
65 @SuppressWarnings("rawtypes")
66 public static java.util.List dynamicQuery(
67 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68 throws com.liferay.portal.SystemException {
69 return getService().dynamicQuery(dynamicQuery);
70 }
71
72 @SuppressWarnings("rawtypes")
73 public static java.util.List dynamicQuery(
74 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75 int end) throws com.liferay.portal.SystemException {
76 return getService().dynamicQuery(dynamicQuery, start, end);
77 }
78
79 @SuppressWarnings("rawtypes")
80 public static java.util.List dynamicQuery(
81 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82 int end,
83 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84 throws com.liferay.portal.SystemException {
85 return getService()
86 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87 }
88
89 public static int dynamicQueryCount(
90 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91 throws com.liferay.portal.SystemException {
92 return getService().dynamicQueryCount(dynamicQuery);
93 }
94
95 public static com.liferay.portlet.calendar.model.CalEvent getCalEvent(
96 long eventId)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 return getService().getCalEvent(eventId);
100 }
101
102 public static com.liferay.portlet.calendar.model.CalEvent getCalEventByUuidAndGroupId(
103 java.lang.String uuid, long groupId)
104 throws com.liferay.portal.PortalException,
105 com.liferay.portal.SystemException {
106 return getService().getCalEventByUuidAndGroupId(uuid, groupId);
107 }
108
109 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
110 int start, int end) throws com.liferay.portal.SystemException {
111 return getService().getCalEvents(start, end);
112 }
113
114 public static int getCalEventsCount()
115 throws com.liferay.portal.SystemException {
116 return getService().getCalEventsCount();
117 }
118
119 public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
120 com.liferay.portlet.calendar.model.CalEvent calEvent)
121 throws com.liferay.portal.SystemException {
122 return getService().updateCalEvent(calEvent);
123 }
124
125 public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
126 com.liferay.portlet.calendar.model.CalEvent calEvent, boolean merge)
127 throws com.liferay.portal.SystemException {
128 return getService().updateCalEvent(calEvent, merge);
129 }
130
131 public static com.liferay.portlet.calendar.model.CalEvent addEvent(
132 long userId, java.lang.String title, java.lang.String description,
133 int startDateMonth, int startDateDay, int startDateYear,
134 int startDateHour, int startDateMinute, int endDateMonth,
135 int endDateDay, int endDateYear, int durationHour, int durationMinute,
136 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
137 boolean repeating,
138 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
139 int firstReminder, int secondReminder,
140 com.liferay.portal.service.ServiceContext serviceContext)
141 throws com.liferay.portal.PortalException,
142 com.liferay.portal.SystemException {
143 return getService()
144 .addEvent(userId, title, description, startDateMonth,
145 startDateDay, startDateYear, startDateHour, startDateMinute,
146 endDateMonth, endDateDay, endDateYear, durationHour,
147 durationMinute, allDay, timeZoneSensitive, type, repeating,
148 recurrence, remindBy, firstReminder, secondReminder, serviceContext);
149 }
150
151 public static com.liferay.portlet.calendar.model.CalEvent addEvent(
152 java.lang.String uuid, long userId, java.lang.String title,
153 java.lang.String description, int startDateMonth, int startDateDay,
154 int startDateYear, int startDateHour, int startDateMinute,
155 int endDateMonth, int endDateDay, int endDateYear, int durationHour,
156 int durationMinute, boolean allDay, boolean timeZoneSensitive,
157 java.lang.String type, boolean repeating,
158 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
159 int firstReminder, int secondReminder,
160 com.liferay.portal.service.ServiceContext serviceContext)
161 throws com.liferay.portal.PortalException,
162 com.liferay.portal.SystemException {
163 return getService()
164 .addEvent(uuid, userId, title, description, startDateMonth,
165 startDateDay, startDateYear, startDateHour, startDateMinute,
166 endDateMonth, endDateDay, endDateYear, durationHour,
167 durationMinute, allDay, timeZoneSensitive, type, repeating,
168 recurrence, remindBy, firstReminder, secondReminder, serviceContext);
169 }
170
171 public static void addEventResources(
172 com.liferay.portlet.calendar.model.CalEvent event,
173 boolean addCommunityPermissions, boolean addGuestPermissions)
174 throws com.liferay.portal.PortalException,
175 com.liferay.portal.SystemException {
176 getService()
177 .addEventResources(event, addCommunityPermissions,
178 addGuestPermissions);
179 }
180
181 public static void addEventResources(
182 com.liferay.portlet.calendar.model.CalEvent event,
183 java.lang.String[] communityPermissions,
184 java.lang.String[] guestPermissions)
185 throws com.liferay.portal.PortalException,
186 com.liferay.portal.SystemException {
187 getService()
188 .addEventResources(event, communityPermissions, guestPermissions);
189 }
190
191 public static void addEventResources(long eventId,
192 boolean addCommunityPermissions, boolean addGuestPermissions)
193 throws com.liferay.portal.PortalException,
194 com.liferay.portal.SystemException {
195 getService()
196 .addEventResources(eventId, addCommunityPermissions,
197 addGuestPermissions);
198 }
199
200 public static void addEventResources(long eventId,
201 java.lang.String[] communityPermissions,
202 java.lang.String[] guestPermissions)
203 throws com.liferay.portal.PortalException,
204 com.liferay.portal.SystemException {
205 getService()
206 .addEventResources(eventId, communityPermissions, guestPermissions);
207 }
208
209 public static void checkEvents()
210 throws com.liferay.portal.PortalException,
211 com.liferay.portal.SystemException {
212 getService().checkEvents();
213 }
214
215 public static void deleteEvent(
216 com.liferay.portlet.calendar.model.CalEvent event)
217 throws com.liferay.portal.PortalException,
218 com.liferay.portal.SystemException {
219 getService().deleteEvent(event);
220 }
221
222 public static void deleteEvent(long eventId)
223 throws com.liferay.portal.PortalException,
224 com.liferay.portal.SystemException {
225 getService().deleteEvent(eventId);
226 }
227
228 public static void deleteEvents(long groupId)
229 throws com.liferay.portal.PortalException,
230 com.liferay.portal.SystemException {
231 getService().deleteEvents(groupId);
232 }
233
234 public static java.io.File exportEvent(long userId, long eventId)
235 throws com.liferay.portal.PortalException,
236 com.liferay.portal.SystemException {
237 return getService().exportEvent(userId, eventId);
238 }
239
240 public static java.io.File exportGroupEvents(long userId, long groupId,
241 java.lang.String fileName)
242 throws com.liferay.portal.PortalException,
243 com.liferay.portal.SystemException {
244 return getService().exportGroupEvents(userId, groupId, fileName);
245 }
246
247 public static com.liferay.portlet.calendar.model.CalEvent getEvent(
248 long eventId)
249 throws com.liferay.portal.PortalException,
250 com.liferay.portal.SystemException {
251 return getService().getEvent(eventId);
252 }
253
254 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
255 long groupId, java.util.Calendar cal)
256 throws com.liferay.portal.SystemException {
257 return getService().getEvents(groupId, cal);
258 }
259
260 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
261 long groupId, java.util.Calendar cal, java.lang.String type)
262 throws com.liferay.portal.SystemException {
263 return getService().getEvents(groupId, cal, type);
264 }
265
266 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
267 long groupId, java.lang.String type, int start, int end)
268 throws com.liferay.portal.SystemException {
269 return getService().getEvents(groupId, type, start, end);
270 }
271
272 public static int getEventsCount(long groupId, java.lang.String type)
273 throws com.liferay.portal.SystemException {
274 return getService().getEventsCount(groupId, type);
275 }
276
277 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
278 long groupId) throws com.liferay.portal.SystemException {
279 return getService().getRepeatingEvents(groupId);
280 }
281
282 public static boolean hasEvents(long groupId, java.util.Calendar cal)
283 throws com.liferay.portal.SystemException {
284 return getService().hasEvents(groupId, cal);
285 }
286
287 public static boolean hasEvents(long groupId, java.util.Calendar cal,
288 java.lang.String type) throws com.liferay.portal.SystemException {
289 return getService().hasEvents(groupId, cal, type);
290 }
291
292 public static void importICal4j(long userId, long groupId, java.io.File file)
293 throws com.liferay.portal.PortalException,
294 com.liferay.portal.SystemException {
295 getService().importICal4j(userId, groupId, file);
296 }
297
298 public static void reIndex(
299 com.liferay.portlet.calendar.model.CalEvent event)
300 throws com.liferay.portal.SystemException {
301 getService().reIndex(event);
302 }
303
304 public static void reIndex(long eventId)
305 throws com.liferay.portal.SystemException {
306 getService().reIndex(eventId);
307 }
308
309 public static void reIndex(java.lang.String[] ids)
310 throws com.liferay.portal.SystemException {
311 getService().reIndex(ids);
312 }
313
314 public static com.liferay.portal.kernel.search.Hits search(long companyId,
315 long groupId, long userId, long ownerUserId, java.lang.String keywords,
316 int start, int end) throws com.liferay.portal.SystemException {
317 return getService()
318 .search(companyId, groupId, userId, ownerUserId, keywords,
319 start, end);
320 }
321
322 public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
323 long userId, long eventId, java.lang.String title,
324 java.lang.String description, int startDateMonth, int startDateDay,
325 int startDateYear, int startDateHour, int startDateMinute,
326 int endDateMonth, int endDateDay, int endDateYear, int durationHour,
327 int durationMinute, boolean allDay, boolean timeZoneSensitive,
328 java.lang.String type, boolean repeating,
329 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
330 int firstReminder, int secondReminder,
331 com.liferay.portal.service.ServiceContext serviceContext)
332 throws com.liferay.portal.PortalException,
333 com.liferay.portal.SystemException {
334 return getService()
335 .updateEvent(userId, eventId, title, description,
336 startDateMonth, startDateDay, startDateYear, startDateHour,
337 startDateMinute, endDateMonth, endDateDay, endDateYear,
338 durationHour, durationMinute, allDay, timeZoneSensitive, type,
339 repeating, recurrence, remindBy, firstReminder, secondReminder,
340 serviceContext);
341 }
342
343 public static CalEventLocalService getService() {
344 if (_service == null) {
345 _service = (CalEventLocalService)PortalBeanLocatorUtil.locate(CalEventLocalService.class.getName());
346
347 ReferenceRegistry.registerReference(CalEventLocalServiceUtil.class,
348 "_service");
349 MethodCache.remove(CalEventLocalService.class);
350 }
351
352 return _service;
353 }
354
355 public void setService(CalEventLocalService service) {
356 MethodCache.remove(CalEventLocalService.class);
357
358 _service = service;
359
360 ReferenceRegistry.registerReference(CalEventLocalServiceUtil.class,
361 "_service");
362 MethodCache.remove(CalEventLocalService.class);
363 }
364
365 private static CalEventLocalService _service;
366 }