001
014
015 package com.liferay.portlet.calendar.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class CalEventLocalServiceUtil {
035
040
041
048 public static com.liferay.portlet.calendar.model.CalEvent addCalEvent(
049 com.liferay.portlet.calendar.model.CalEvent calEvent)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addCalEvent(calEvent);
052 }
053
054
060 public static com.liferay.portlet.calendar.model.CalEvent createCalEvent(
061 long eventId) {
062 return getService().createCalEvent(eventId);
063 }
064
065
072 public static void deleteCalEvent(long eventId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().deleteCalEvent(eventId);
076 }
077
078
084 public static void deleteCalEvent(
085 com.liferay.portlet.calendar.model.CalEvent calEvent)
086 throws com.liferay.portal.kernel.exception.SystemException {
087 getService().deleteCalEvent(calEvent);
088 }
089
090
097 @SuppressWarnings("rawtypes")
098 public static java.util.List dynamicQuery(
099 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().dynamicQuery(dynamicQuery);
102 }
103
104
117 @SuppressWarnings("rawtypes")
118 public static java.util.List dynamicQuery(
119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120 int end) throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().dynamicQuery(dynamicQuery, start, end);
122 }
123
124
138 @SuppressWarnings("rawtypes")
139 public static java.util.List dynamicQuery(
140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141 int end,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getService()
145 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146 }
147
148
155 public static long dynamicQueryCount(
156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getService().dynamicQueryCount(dynamicQuery);
159 }
160
161
169 public static com.liferay.portlet.calendar.model.CalEvent getCalEvent(
170 long eventId)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 return getService().getCalEvent(eventId);
174 }
175
176 public static com.liferay.portal.model.PersistedModel getPersistedModel(
177 java.io.Serializable primaryKeyObj)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException {
180 return getService().getPersistedModel(primaryKeyObj);
181 }
182
183
192 public static com.liferay.portlet.calendar.model.CalEvent getCalEventByUuidAndGroupId(
193 java.lang.String uuid, long groupId)
194 throws com.liferay.portal.kernel.exception.PortalException,
195 com.liferay.portal.kernel.exception.SystemException {
196 return getService().getCalEventByUuidAndGroupId(uuid, groupId);
197 }
198
199
211 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
212 int start, int end)
213 throws com.liferay.portal.kernel.exception.SystemException {
214 return getService().getCalEvents(start, end);
215 }
216
217
223 public static int getCalEventsCount()
224 throws com.liferay.portal.kernel.exception.SystemException {
225 return getService().getCalEventsCount();
226 }
227
228
235 public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
236 com.liferay.portlet.calendar.model.CalEvent calEvent)
237 throws com.liferay.portal.kernel.exception.SystemException {
238 return getService().updateCalEvent(calEvent);
239 }
240
241
249 public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
250 com.liferay.portlet.calendar.model.CalEvent calEvent, boolean merge)
251 throws com.liferay.portal.kernel.exception.SystemException {
252 return getService().updateCalEvent(calEvent, merge);
253 }
254
255
260 public static java.lang.String getBeanIdentifier() {
261 return getService().getBeanIdentifier();
262 }
263
264
269 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
270 getService().setBeanIdentifier(beanIdentifier);
271 }
272
273 public static com.liferay.portlet.calendar.model.CalEvent addEvent(
274 long userId, java.lang.String title, java.lang.String description,
275 int startDateMonth, int startDateDay, int startDateYear,
276 int startDateHour, int startDateMinute, int endDateMonth,
277 int endDateDay, int endDateYear, int durationHour, int durationMinute,
278 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
279 boolean repeating,
280 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
281 int firstReminder, int secondReminder,
282 com.liferay.portal.service.ServiceContext serviceContext)
283 throws com.liferay.portal.kernel.exception.PortalException,
284 com.liferay.portal.kernel.exception.SystemException {
285 return getService()
286 .addEvent(userId, title, description, startDateMonth,
287 startDateDay, startDateYear, startDateHour, startDateMinute,
288 endDateMonth, endDateDay, endDateYear, durationHour,
289 durationMinute, allDay, timeZoneSensitive, type, repeating,
290 recurrence, remindBy, firstReminder, secondReminder, serviceContext);
291 }
292
293 public static void addEventResources(
294 com.liferay.portlet.calendar.model.CalEvent event,
295 boolean addCommunityPermissions, boolean addGuestPermissions)
296 throws com.liferay.portal.kernel.exception.PortalException,
297 com.liferay.portal.kernel.exception.SystemException {
298 getService()
299 .addEventResources(event, addCommunityPermissions,
300 addGuestPermissions);
301 }
302
303 public static void addEventResources(
304 com.liferay.portlet.calendar.model.CalEvent event,
305 java.lang.String[] communityPermissions,
306 java.lang.String[] guestPermissions)
307 throws com.liferay.portal.kernel.exception.PortalException,
308 com.liferay.portal.kernel.exception.SystemException {
309 getService()
310 .addEventResources(event, communityPermissions, guestPermissions);
311 }
312
313 public static void addEventResources(long eventId,
314 boolean addCommunityPermissions, boolean addGuestPermissions)
315 throws com.liferay.portal.kernel.exception.PortalException,
316 com.liferay.portal.kernel.exception.SystemException {
317 getService()
318 .addEventResources(eventId, addCommunityPermissions,
319 addGuestPermissions);
320 }
321
322 public static void addEventResources(long eventId,
323 java.lang.String[] communityPermissions,
324 java.lang.String[] guestPermissions)
325 throws com.liferay.portal.kernel.exception.PortalException,
326 com.liferay.portal.kernel.exception.SystemException {
327 getService()
328 .addEventResources(eventId, communityPermissions, guestPermissions);
329 }
330
331 public static void checkEvents()
332 throws com.liferay.portal.kernel.exception.PortalException,
333 com.liferay.portal.kernel.exception.SystemException {
334 getService().checkEvents();
335 }
336
337 public static void deleteEvent(
338 com.liferay.portlet.calendar.model.CalEvent event)
339 throws com.liferay.portal.kernel.exception.PortalException,
340 com.liferay.portal.kernel.exception.SystemException {
341 getService().deleteEvent(event);
342 }
343
344 public static void deleteEvent(long eventId)
345 throws com.liferay.portal.kernel.exception.PortalException,
346 com.liferay.portal.kernel.exception.SystemException {
347 getService().deleteEvent(eventId);
348 }
349
350 public static void deleteEvents(long groupId)
351 throws com.liferay.portal.kernel.exception.PortalException,
352 com.liferay.portal.kernel.exception.SystemException {
353 getService().deleteEvents(groupId);
354 }
355
356 public static java.io.File exportEvent(long userId, long eventId)
357 throws com.liferay.portal.kernel.exception.PortalException,
358 com.liferay.portal.kernel.exception.SystemException {
359 return getService().exportEvent(userId, eventId);
360 }
361
362 public static java.io.File exportGroupEvents(long userId, long groupId,
363 java.lang.String fileName)
364 throws com.liferay.portal.kernel.exception.PortalException,
365 com.liferay.portal.kernel.exception.SystemException {
366 return getService().exportGroupEvents(userId, groupId, fileName);
367 }
368
369 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(
370 long companyId, int start, int end)
371 throws com.liferay.portal.kernel.exception.SystemException {
372 return getService().getCompanyEvents(companyId, start, end);
373 }
374
375 public static int getCompanyEventsCount(long companyId)
376 throws com.liferay.portal.kernel.exception.SystemException {
377 return getService().getCompanyEventsCount(companyId);
378 }
379
380 public static com.liferay.portlet.calendar.model.CalEvent getEvent(
381 long eventId)
382 throws com.liferay.portal.kernel.exception.PortalException,
383 com.liferay.portal.kernel.exception.SystemException {
384 return getService().getEvent(eventId);
385 }
386
387 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
388 long groupId, java.util.Calendar cal)
389 throws com.liferay.portal.kernel.exception.SystemException {
390 return getService().getEvents(groupId, cal);
391 }
392
393 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
394 long groupId, java.util.Calendar cal, java.lang.String type)
395 throws com.liferay.portal.kernel.exception.SystemException {
396 return getService().getEvents(groupId, cal, type);
397 }
398
399 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
400 long groupId, java.lang.String type, int start, int end)
401 throws com.liferay.portal.kernel.exception.SystemException {
402 return getService().getEvents(groupId, type, start, end);
403 }
404
405 public static int getEventsCount(long groupId, java.lang.String type)
406 throws com.liferay.portal.kernel.exception.SystemException {
407 return getService().getEventsCount(groupId, type);
408 }
409
410 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents()
411 throws com.liferay.portal.kernel.exception.SystemException {
412 return getService().getNoAssetEvents();
413 }
414
415 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
416 long groupId)
417 throws com.liferay.portal.kernel.exception.SystemException {
418 return getService().getRepeatingEvents(groupId);
419 }
420
421 public static boolean hasEvents(long groupId, java.util.Calendar cal)
422 throws com.liferay.portal.kernel.exception.SystemException {
423 return getService().hasEvents(groupId, cal);
424 }
425
426 public static boolean hasEvents(long groupId, java.util.Calendar cal,
427 java.lang.String type)
428 throws com.liferay.portal.kernel.exception.SystemException {
429 return getService().hasEvents(groupId, cal, type);
430 }
431
432 public static void importICal4j(long userId, long groupId, java.io.File file)
433 throws com.liferay.portal.kernel.exception.PortalException,
434 com.liferay.portal.kernel.exception.SystemException {
435 getService().importICal4j(userId, groupId, file);
436 }
437
438 public static void updateAsset(long userId,
439 com.liferay.portlet.calendar.model.CalEvent event,
440 long[] assetCategoryIds, java.lang.String[] assetTagNames)
441 throws com.liferay.portal.kernel.exception.PortalException,
442 com.liferay.portal.kernel.exception.SystemException {
443 getService().updateAsset(userId, event, assetCategoryIds, assetTagNames);
444 }
445
446 public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
447 long userId, long eventId, java.lang.String title,
448 java.lang.String description, int startDateMonth, int startDateDay,
449 int startDateYear, int startDateHour, int startDateMinute,
450 int endDateMonth, int endDateDay, int endDateYear, int durationHour,
451 int durationMinute, boolean allDay, boolean timeZoneSensitive,
452 java.lang.String type, boolean repeating,
453 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
454 int firstReminder, int secondReminder,
455 com.liferay.portal.service.ServiceContext serviceContext)
456 throws com.liferay.portal.kernel.exception.PortalException,
457 com.liferay.portal.kernel.exception.SystemException {
458 return getService()
459 .updateEvent(userId, eventId, title, description,
460 startDateMonth, startDateDay, startDateYear, startDateHour,
461 startDateMinute, endDateMonth, endDateDay, endDateYear,
462 durationHour, durationMinute, allDay, timeZoneSensitive, type,
463 repeating, recurrence, remindBy, firstReminder, secondReminder,
464 serviceContext);
465 }
466
467 public static CalEventLocalService getService() {
468 if (_service == null) {
469 _service = (CalEventLocalService)PortalBeanLocatorUtil.locate(CalEventLocalService.class.getName());
470
471 ReferenceRegistry.registerReference(CalEventLocalServiceUtil.class,
472 "_service");
473 MethodCache.remove(CalEventLocalService.class);
474 }
475
476 return _service;
477 }
478
479 public void setService(CalEventLocalService service) {
480 MethodCache.remove(CalEventLocalService.class);
481
482 _service = service;
483
484 ReferenceRegistry.registerReference(CalEventLocalServiceUtil.class,
485 "_service");
486 MethodCache.remove(CalEventLocalService.class);
487 }
488
489 private static CalEventLocalService _service;
490 }