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 public static com.liferay.portlet.calendar.model.CalEvent fetchCalEvent(
162 long eventId)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getService().fetchCalEvent(eventId);
165 }
166
167
175 public static com.liferay.portlet.calendar.model.CalEvent getCalEvent(
176 long eventId)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException {
179 return getService().getCalEvent(eventId);
180 }
181
182 public static com.liferay.portal.model.PersistedModel getPersistedModel(
183 java.io.Serializable primaryKeyObj)
184 throws com.liferay.portal.kernel.exception.PortalException,
185 com.liferay.portal.kernel.exception.SystemException {
186 return getService().getPersistedModel(primaryKeyObj);
187 }
188
189
198 public static com.liferay.portlet.calendar.model.CalEvent getCalEventByUuidAndGroupId(
199 java.lang.String uuid, long groupId)
200 throws com.liferay.portal.kernel.exception.PortalException,
201 com.liferay.portal.kernel.exception.SystemException {
202 return getService().getCalEventByUuidAndGroupId(uuid, groupId);
203 }
204
205
217 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
218 int start, int end)
219 throws com.liferay.portal.kernel.exception.SystemException {
220 return getService().getCalEvents(start, end);
221 }
222
223
229 public static int getCalEventsCount()
230 throws com.liferay.portal.kernel.exception.SystemException {
231 return getService().getCalEventsCount();
232 }
233
234
241 public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
242 com.liferay.portlet.calendar.model.CalEvent calEvent)
243 throws com.liferay.portal.kernel.exception.SystemException {
244 return getService().updateCalEvent(calEvent);
245 }
246
247
255 public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
256 com.liferay.portlet.calendar.model.CalEvent calEvent, boolean merge)
257 throws com.liferay.portal.kernel.exception.SystemException {
258 return getService().updateCalEvent(calEvent, merge);
259 }
260
261
266 public static java.lang.String getBeanIdentifier() {
267 return getService().getBeanIdentifier();
268 }
269
270
275 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
276 getService().setBeanIdentifier(beanIdentifier);
277 }
278
279 public static com.liferay.portlet.calendar.model.CalEvent addEvent(
280 long userId, java.lang.String title, java.lang.String description,
281 java.lang.String location, int startDateMonth, int startDateDay,
282 int startDateYear, int startDateHour, int startDateMinute,
283 int endDateMonth, int endDateDay, int endDateYear, int durationHour,
284 int durationMinute, boolean allDay, boolean timeZoneSensitive,
285 java.lang.String type, boolean repeating,
286 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
287 int firstReminder, int secondReminder,
288 com.liferay.portal.service.ServiceContext serviceContext)
289 throws com.liferay.portal.kernel.exception.PortalException,
290 com.liferay.portal.kernel.exception.SystemException {
291 return getService()
292 .addEvent(userId, title, description, location,
293 startDateMonth, startDateDay, startDateYear, startDateHour,
294 startDateMinute, endDateMonth, endDateDay, endDateYear,
295 durationHour, durationMinute, allDay, timeZoneSensitive, type,
296 repeating, recurrence, remindBy, firstReminder, secondReminder,
297 serviceContext);
298 }
299
300 public static void addEventResources(
301 com.liferay.portlet.calendar.model.CalEvent event,
302 boolean addGroupPermissions, boolean addGuestPermissions)
303 throws com.liferay.portal.kernel.exception.PortalException,
304 com.liferay.portal.kernel.exception.SystemException {
305 getService()
306 .addEventResources(event, addGroupPermissions, addGuestPermissions);
307 }
308
309 public static void addEventResources(
310 com.liferay.portlet.calendar.model.CalEvent event,
311 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
312 throws com.liferay.portal.kernel.exception.PortalException,
313 com.liferay.portal.kernel.exception.SystemException {
314 getService().addEventResources(event, groupPermissions, guestPermissions);
315 }
316
317 public static void addEventResources(long eventId,
318 boolean addGroupPermissions, boolean addGuestPermissions)
319 throws com.liferay.portal.kernel.exception.PortalException,
320 com.liferay.portal.kernel.exception.SystemException {
321 getService()
322 .addEventResources(eventId, addGroupPermissions, addGuestPermissions);
323 }
324
325 public static void addEventResources(long eventId,
326 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
327 throws com.liferay.portal.kernel.exception.PortalException,
328 com.liferay.portal.kernel.exception.SystemException {
329 getService()
330 .addEventResources(eventId, groupPermissions, guestPermissions);
331 }
332
333 public static void checkEvents()
334 throws com.liferay.portal.kernel.exception.PortalException,
335 com.liferay.portal.kernel.exception.SystemException {
336 getService().checkEvents();
337 }
338
339 public static void deleteEvent(
340 com.liferay.portlet.calendar.model.CalEvent event)
341 throws com.liferay.portal.kernel.exception.PortalException,
342 com.liferay.portal.kernel.exception.SystemException {
343 getService().deleteEvent(event);
344 }
345
346 public static void deleteEvent(long eventId)
347 throws com.liferay.portal.kernel.exception.PortalException,
348 com.liferay.portal.kernel.exception.SystemException {
349 getService().deleteEvent(eventId);
350 }
351
352 public static void deleteEvents(long groupId)
353 throws com.liferay.portal.kernel.exception.PortalException,
354 com.liferay.portal.kernel.exception.SystemException {
355 getService().deleteEvents(groupId);
356 }
357
358 public static java.io.File exportEvent(long userId, long eventId)
359 throws com.liferay.portal.kernel.exception.PortalException,
360 com.liferay.portal.kernel.exception.SystemException {
361 return getService().exportEvent(userId, eventId);
362 }
363
364 public static java.io.File exportGroupEvents(long userId, long groupId,
365 java.lang.String fileName)
366 throws com.liferay.portal.kernel.exception.PortalException,
367 com.liferay.portal.kernel.exception.SystemException {
368 return getService().exportGroupEvents(userId, groupId, fileName);
369 }
370
371 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(
372 long companyId, int start, int end)
373 throws com.liferay.portal.kernel.exception.SystemException {
374 return getService().getCompanyEvents(companyId, start, end);
375 }
376
377 public static int getCompanyEventsCount(long companyId)
378 throws com.liferay.portal.kernel.exception.SystemException {
379 return getService().getCompanyEventsCount(companyId);
380 }
381
382 public static com.liferay.portlet.calendar.model.CalEvent getEvent(
383 long eventId)
384 throws com.liferay.portal.kernel.exception.PortalException,
385 com.liferay.portal.kernel.exception.SystemException {
386 return getService().getEvent(eventId);
387 }
388
389 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
390 long groupId, java.util.Calendar cal)
391 throws com.liferay.portal.kernel.exception.SystemException {
392 return getService().getEvents(groupId, cal);
393 }
394
395 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
396 long groupId, java.util.Calendar cal, java.lang.String type)
397 throws com.liferay.portal.kernel.exception.SystemException {
398 return getService().getEvents(groupId, cal, type);
399 }
400
401 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
402 long groupId, java.util.Calendar cal, java.lang.String[] types)
403 throws com.liferay.portal.kernel.exception.SystemException {
404 return getService().getEvents(groupId, cal, types);
405 }
406
407 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
408 long groupId, java.lang.String type, int start, int end)
409 throws com.liferay.portal.kernel.exception.SystemException {
410 return getService().getEvents(groupId, type, start, end);
411 }
412
413 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
414 long groupId, java.lang.String[] types, int start, int end)
415 throws com.liferay.portal.kernel.exception.SystemException {
416 return getService().getEvents(groupId, types, start, end);
417 }
418
419 public static int getEventsCount(long groupId, java.lang.String type)
420 throws com.liferay.portal.kernel.exception.SystemException {
421 return getService().getEventsCount(groupId, type);
422 }
423
424 public static int getEventsCount(long groupId, java.lang.String[] types)
425 throws com.liferay.portal.kernel.exception.SystemException {
426 return getService().getEventsCount(groupId, types);
427 }
428
429 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents()
430 throws com.liferay.portal.kernel.exception.SystemException {
431 return getService().getNoAssetEvents();
432 }
433
434 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
435 long groupId)
436 throws com.liferay.portal.kernel.exception.SystemException {
437 return getService().getRepeatingEvents(groupId);
438 }
439
440 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
441 long groupId, java.util.Calendar cal, java.lang.String[] types)
442 throws com.liferay.portal.kernel.exception.SystemException {
443 return getService().getRepeatingEvents(groupId, cal, types);
444 }
445
446 public static boolean hasEvents(long groupId, java.util.Calendar cal)
447 throws com.liferay.portal.kernel.exception.SystemException {
448 return getService().hasEvents(groupId, cal);
449 }
450
451 public static boolean hasEvents(long groupId, java.util.Calendar cal,
452 java.lang.String type)
453 throws com.liferay.portal.kernel.exception.SystemException {
454 return getService().hasEvents(groupId, cal, type);
455 }
456
457 public static boolean hasEvents(long groupId, java.util.Calendar cal,
458 java.lang.String[] types)
459 throws com.liferay.portal.kernel.exception.SystemException {
460 return getService().hasEvents(groupId, cal, types);
461 }
462
463 public static void importICal4j(long userId, long groupId,
464 java.io.InputStream inputStream)
465 throws com.liferay.portal.kernel.exception.PortalException,
466 com.liferay.portal.kernel.exception.SystemException {
467 getService().importICal4j(userId, groupId, inputStream);
468 }
469
470 public static void updateAsset(long userId,
471 com.liferay.portlet.calendar.model.CalEvent event,
472 long[] assetCategoryIds, java.lang.String[] assetTagNames,
473 long[] assetLinkEntryIds)
474 throws com.liferay.portal.kernel.exception.PortalException,
475 com.liferay.portal.kernel.exception.SystemException {
476 getService()
477 .updateAsset(userId, event, assetCategoryIds, assetTagNames,
478 assetLinkEntryIds);
479 }
480
481 public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
482 long userId, long eventId, java.lang.String title,
483 java.lang.String description, java.lang.String location,
484 int startDateMonth, int startDateDay, int startDateYear,
485 int startDateHour, int startDateMinute, int endDateMonth,
486 int endDateDay, int endDateYear, int durationHour, int durationMinute,
487 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
488 boolean repeating,
489 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
490 int firstReminder, int secondReminder,
491 com.liferay.portal.service.ServiceContext serviceContext)
492 throws com.liferay.portal.kernel.exception.PortalException,
493 com.liferay.portal.kernel.exception.SystemException {
494 return getService()
495 .updateEvent(userId, eventId, title, description, location,
496 startDateMonth, startDateDay, startDateYear, startDateHour,
497 startDateMinute, endDateMonth, endDateDay, endDateYear,
498 durationHour, durationMinute, allDay, timeZoneSensitive, type,
499 repeating, recurrence, remindBy, firstReminder, secondReminder,
500 serviceContext);
501 }
502
503 public static CalEventLocalService getService() {
504 if (_service == null) {
505 _service = (CalEventLocalService)PortalBeanLocatorUtil.locate(CalEventLocalService.class.getName());
506
507 ReferenceRegistry.registerReference(CalEventLocalServiceUtil.class,
508 "_service");
509 MethodCache.remove(CalEventLocalService.class);
510 }
511
512 return _service;
513 }
514
515 public void setService(CalEventLocalService service) {
516 MethodCache.remove(CalEventLocalService.class);
517
518 _service = service;
519
520 ReferenceRegistry.registerReference(CalEventLocalServiceUtil.class,
521 "_service");
522 MethodCache.remove(CalEventLocalService.class);
523 }
524
525 private static CalEventLocalService _service;
526 }