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,
56 java.lang.String remindBy, 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,
108 java.lang.String remindBy, int firstReminder, int secondReminder)
109 throws com.liferay.portal.PortalException,
110 com.liferay.portal.SystemException {
111 return getService()
112 .updateEvent(eventId, title, description, startDateMonth,
113 startDateDay, startDateYear, startDateHour, startDateMinute,
114 endDateMonth, endDateDay, endDateYear, durationHour,
115 durationMinute, allDay, timeZoneSensitive, type, repeating,
116 recurrence, remindBy, firstReminder, secondReminder);
117 }
118
119 public static CalEventService getService() {
120 if (_service == null) {
121 throw new RuntimeException("CalEventService is not set");
122 }
123
124 return _service;
125 }
126
127 public void setService(CalEventService service) {
128 _service = service;
129 }
130
131 private static CalEventService _service;
132 }