1
22
23 package com.liferay.portlet.calendar.service;
24
25
26
47 public class CalEventServiceUtil {
48 public static com.liferay.portlet.calendar.model.CalEvent addEvent(
49 java.lang.String title, java.lang.String description,
50 int startDateMonth, int startDateDay, int startDateYear,
51 int startDateHour, int startDateMinute, int endDateMonth,
52 int endDateDay, int endDateYear, int durationHour, int durationMinute,
53 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
54 boolean repeating,
55 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
56 int firstReminder, int secondReminder,
57 com.liferay.portal.service.ServiceContext serviceContext)
58 throws com.liferay.portal.PortalException,
59 com.liferay.portal.SystemException {
60 return getService()
61 .addEvent(title, description, startDateMonth, startDateDay,
62 startDateYear, startDateHour, startDateMinute, endDateMonth,
63 endDateDay, endDateYear, durationHour, durationMinute, allDay,
64 timeZoneSensitive, type, repeating, recurrence, remindBy,
65 firstReminder, secondReminder, serviceContext);
66 }
67
68 public static void deleteEvent(long eventId)
69 throws com.liferay.portal.PortalException,
70 com.liferay.portal.SystemException {
71 getService().deleteEvent(eventId);
72 }
73
74 public static java.io.File exportEvent(long eventId)
75 throws com.liferay.portal.PortalException,
76 com.liferay.portal.SystemException {
77 return getService().exportEvent(eventId);
78 }
79
80 public static java.io.File exportGroupEvents(long groupId,
81 java.lang.String fileName)
82 throws com.liferay.portal.PortalException,
83 com.liferay.portal.SystemException {
84 return getService().exportGroupEvents(groupId, fileName);
85 }
86
87 public static com.liferay.portlet.calendar.model.CalEvent getEvent(
88 long eventId)
89 throws com.liferay.portal.PortalException,
90 com.liferay.portal.SystemException {
91 return getService().getEvent(eventId);
92 }
93
94 public static void importICal4j(long groupId, java.io.File file)
95 throws com.liferay.portal.PortalException,
96 com.liferay.portal.SystemException {
97 getService().importICal4j(groupId, file);
98 }
99
100 public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
101 long eventId, java.lang.String title, java.lang.String description,
102 int startDateMonth, int startDateDay, int startDateYear,
103 int startDateHour, int startDateMinute, int endDateMonth,
104 int endDateDay, int endDateYear, int durationHour, int durationMinute,
105 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
106 boolean repeating,
107 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
108 int firstReminder, int secondReminder,
109 com.liferay.portal.service.ServiceContext serviceContext)
110 throws com.liferay.portal.PortalException,
111 com.liferay.portal.SystemException {
112 return getService()
113 .updateEvent(eventId, title, description, startDateMonth,
114 startDateDay, startDateYear, startDateHour, startDateMinute,
115 endDateMonth, endDateDay, endDateYear, durationHour,
116 durationMinute, allDay, timeZoneSensitive, type, repeating,
117 recurrence, remindBy, firstReminder, secondReminder, serviceContext);
118 }
119
120 public static CalEventService getService() {
121 if (_service == null) {
122 throw new RuntimeException("CalEventService is not set");
123 }
124
125 return _service;
126 }
127
128 public void setService(CalEventService service) {
129 _service = service;
130 }
131
132 private static CalEventService _service;
133 }