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