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 java.lang.String location, int startDateMonth, int startDateDay,
276 int startDateYear, int startDateHour, int startDateMinute,
277 int endDateMonth, int endDateDay, int endDateYear, int durationHour,
278 int durationMinute, boolean allDay, boolean timeZoneSensitive,
279 java.lang.String type, 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, location,
287 startDateMonth, startDateDay, startDateYear, startDateHour,
288 startDateMinute, endDateMonth, endDateDay, endDateYear,
289 durationHour, durationMinute, allDay, timeZoneSensitive, type,
290 repeating, recurrence, remindBy, firstReminder, secondReminder,
291 serviceContext);
292 }
293
294 public static void addEventResources(
295 com.liferay.portlet.calendar.model.CalEvent event,
296 boolean addGroupPermissions, boolean addGuestPermissions)
297 throws com.liferay.portal.kernel.exception.PortalException,
298 com.liferay.portal.kernel.exception.SystemException {
299 getService()
300 .addEventResources(event, addGroupPermissions, addGuestPermissions);
301 }
302
303 public static void addEventResources(
304 com.liferay.portlet.calendar.model.CalEvent event,
305 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
306 throws com.liferay.portal.kernel.exception.PortalException,
307 com.liferay.portal.kernel.exception.SystemException {
308 getService().addEventResources(event, groupPermissions, guestPermissions);
309 }
310
311 public static void addEventResources(long eventId,
312 boolean addGroupPermissions, boolean addGuestPermissions)
313 throws com.liferay.portal.kernel.exception.PortalException,
314 com.liferay.portal.kernel.exception.SystemException {
315 getService()
316 .addEventResources(eventId, addGroupPermissions, addGuestPermissions);
317 }
318
319 public static void addEventResources(long eventId,
320 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
321 throws com.liferay.portal.kernel.exception.PortalException,
322 com.liferay.portal.kernel.exception.SystemException {
323 getService()
324 .addEventResources(eventId, groupPermissions, guestPermissions);
325 }
326
327 public static void checkEvents()
328 throws com.liferay.portal.kernel.exception.PortalException,
329 com.liferay.portal.kernel.exception.SystemException {
330 getService().checkEvents();
331 }
332
333 public static void deleteEvent(
334 com.liferay.portlet.calendar.model.CalEvent event)
335 throws com.liferay.portal.kernel.exception.PortalException,
336 com.liferay.portal.kernel.exception.SystemException {
337 getService().deleteEvent(event);
338 }
339
340 public static void deleteEvent(long eventId)
341 throws com.liferay.portal.kernel.exception.PortalException,
342 com.liferay.portal.kernel.exception.SystemException {
343 getService().deleteEvent(eventId);
344 }
345
346 public static void deleteEvents(long groupId)
347 throws com.liferay.portal.kernel.exception.PortalException,
348 com.liferay.portal.kernel.exception.SystemException {
349 getService().deleteEvents(groupId);
350 }
351
352 public static java.io.File exportEvent(long userId, long eventId)
353 throws com.liferay.portal.kernel.exception.PortalException,
354 com.liferay.portal.kernel.exception.SystemException {
355 return getService().exportEvent(userId, eventId);
356 }
357
358 public static java.io.File exportGroupEvents(long userId, long groupId,
359 java.lang.String fileName)
360 throws com.liferay.portal.kernel.exception.PortalException,
361 com.liferay.portal.kernel.exception.SystemException {
362 return getService().exportGroupEvents(userId, groupId, fileName);
363 }
364
365 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(
366 long companyId, int start, int end)
367 throws com.liferay.portal.kernel.exception.SystemException {
368 return getService().getCompanyEvents(companyId, start, end);
369 }
370
371 public static int getCompanyEventsCount(long companyId)
372 throws com.liferay.portal.kernel.exception.SystemException {
373 return getService().getCompanyEventsCount(companyId);
374 }
375
376 public static com.liferay.portlet.calendar.model.CalEvent getEvent(
377 long eventId)
378 throws com.liferay.portal.kernel.exception.PortalException,
379 com.liferay.portal.kernel.exception.SystemException {
380 return getService().getEvent(eventId);
381 }
382
383 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
384 long groupId, java.util.Calendar cal)
385 throws com.liferay.portal.kernel.exception.SystemException {
386 return getService().getEvents(groupId, cal);
387 }
388
389 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
390 long groupId, java.util.Calendar cal, java.lang.String type)
391 throws com.liferay.portal.kernel.exception.SystemException {
392 return getService().getEvents(groupId, cal, type);
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[] types)
397 throws com.liferay.portal.kernel.exception.SystemException {
398 return getService().getEvents(groupId, cal, types);
399 }
400
401 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
402 long groupId, java.lang.String type, int start, int end)
403 throws com.liferay.portal.kernel.exception.SystemException {
404 return getService().getEvents(groupId, type, start, end);
405 }
406
407 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
408 long groupId, java.lang.String[] types, int start, int end)
409 throws com.liferay.portal.kernel.exception.SystemException {
410 return getService().getEvents(groupId, types, start, end);
411 }
412
413 public static int getEventsCount(long groupId, java.lang.String type)
414 throws com.liferay.portal.kernel.exception.SystemException {
415 return getService().getEventsCount(groupId, type);
416 }
417
418 public static int getEventsCount(long groupId, java.lang.String[] types)
419 throws com.liferay.portal.kernel.exception.SystemException {
420 return getService().getEventsCount(groupId, types);
421 }
422
423 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents()
424 throws com.liferay.portal.kernel.exception.SystemException {
425 return getService().getNoAssetEvents();
426 }
427
428 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
429 long groupId)
430 throws com.liferay.portal.kernel.exception.SystemException {
431 return getService().getRepeatingEvents(groupId);
432 }
433
434 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
435 long groupId, java.util.Calendar cal, java.lang.String[] types)
436 throws com.liferay.portal.kernel.exception.SystemException {
437 return getService().getRepeatingEvents(groupId, cal, types);
438 }
439
440 public static boolean hasEvents(long groupId, java.util.Calendar cal)
441 throws com.liferay.portal.kernel.exception.SystemException {
442 return getService().hasEvents(groupId, cal);
443 }
444
445 public static boolean hasEvents(long groupId, java.util.Calendar cal,
446 java.lang.String type)
447 throws com.liferay.portal.kernel.exception.SystemException {
448 return getService().hasEvents(groupId, cal, type);
449 }
450
451 public static boolean hasEvents(long groupId, java.util.Calendar cal,
452 java.lang.String[] types)
453 throws com.liferay.portal.kernel.exception.SystemException {
454 return getService().hasEvents(groupId, cal, types);
455 }
456
457 public static void importICal4j(long userId, long groupId,
458 java.io.InputStream inputStream)
459 throws com.liferay.portal.kernel.exception.PortalException,
460 com.liferay.portal.kernel.exception.SystemException {
461 getService().importICal4j(userId, groupId, inputStream);
462 }
463
464 public static void updateAsset(long userId,
465 com.liferay.portlet.calendar.model.CalEvent event,
466 long[] assetCategoryIds, java.lang.String[] assetTagNames,
467 long[] assetLinkEntryIds)
468 throws com.liferay.portal.kernel.exception.PortalException,
469 com.liferay.portal.kernel.exception.SystemException {
470 getService()
471 .updateAsset(userId, event, assetCategoryIds, assetTagNames,
472 assetLinkEntryIds);
473 }
474
475 public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
476 long userId, long eventId, java.lang.String title,
477 java.lang.String description, java.lang.String location,
478 int startDateMonth, int startDateDay, int startDateYear,
479 int startDateHour, int startDateMinute, int endDateMonth,
480 int endDateDay, int endDateYear, int durationHour, int durationMinute,
481 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
482 boolean repeating,
483 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
484 int firstReminder, int secondReminder,
485 com.liferay.portal.service.ServiceContext serviceContext)
486 throws com.liferay.portal.kernel.exception.PortalException,
487 com.liferay.portal.kernel.exception.SystemException {
488 return getService()
489 .updateEvent(userId, eventId, title, description, location,
490 startDateMonth, startDateDay, startDateYear, startDateHour,
491 startDateMinute, endDateMonth, endDateDay, endDateYear,
492 durationHour, durationMinute, allDay, timeZoneSensitive, type,
493 repeating, recurrence, remindBy, firstReminder, secondReminder,
494 serviceContext);
495 }
496
497 public static CalEventLocalService getService() {
498 if (_service == null) {
499 _service = (CalEventLocalService)PortalBeanLocatorUtil.locate(CalEventLocalService.class.getName());
500
501 ReferenceRegistry.registerReference(CalEventLocalServiceUtil.class,
502 "_service");
503 MethodCache.remove(CalEventLocalService.class);
504 }
505
506 return _service;
507 }
508
509 public void setService(CalEventLocalService service) {
510 MethodCache.remove(CalEventLocalService.class);
511
512 _service = service;
513
514 ReferenceRegistry.registerReference(CalEventLocalServiceUtil.class,
515 "_service");
516 MethodCache.remove(CalEventLocalService.class);
517 }
518
519 private static CalEventLocalService _service;
520 }