1
14
15 package com.liferay.portlet.calendar.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class CalEventLocalServiceUtil {
40 public static com.liferay.portlet.calendar.model.CalEvent addCalEvent(
41 com.liferay.portlet.calendar.model.CalEvent calEvent)
42 throws com.liferay.portal.kernel.exception.SystemException {
43 return getService().addCalEvent(calEvent);
44 }
45
46 public static com.liferay.portlet.calendar.model.CalEvent createCalEvent(
47 long eventId) {
48 return getService().createCalEvent(eventId);
49 }
50
51 public static void deleteCalEvent(long eventId)
52 throws com.liferay.portal.kernel.exception.PortalException,
53 com.liferay.portal.kernel.exception.SystemException {
54 getService().deleteCalEvent(eventId);
55 }
56
57 public static void deleteCalEvent(
58 com.liferay.portlet.calendar.model.CalEvent calEvent)
59 throws com.liferay.portal.kernel.exception.SystemException {
60 getService().deleteCalEvent(calEvent);
61 }
62
63 public static java.util.List<Object> dynamicQuery(
64 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65 throws com.liferay.portal.kernel.exception.SystemException {
66 return getService().dynamicQuery(dynamicQuery);
67 }
68
69 public static java.util.List<Object> dynamicQuery(
70 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71 int end) throws com.liferay.portal.kernel.exception.SystemException {
72 return getService().dynamicQuery(dynamicQuery, start, end);
73 }
74
75 public static com.liferay.portlet.calendar.model.CalEvent getCalEvent(
76 long eventId)
77 throws com.liferay.portal.kernel.exception.PortalException,
78 com.liferay.portal.kernel.exception.SystemException {
79 return getService().getCalEvent(eventId);
80 }
81
82 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
83 int start, int end)
84 throws com.liferay.portal.kernel.exception.SystemException {
85 return getService().getCalEvents(start, end);
86 }
87
88 public static int getCalEventsCount()
89 throws com.liferay.portal.kernel.exception.SystemException {
90 return getService().getCalEventsCount();
91 }
92
93 public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
94 com.liferay.portlet.calendar.model.CalEvent calEvent)
95 throws com.liferay.portal.kernel.exception.SystemException {
96 return getService().updateCalEvent(calEvent);
97 }
98
99 public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
100 com.liferay.portlet.calendar.model.CalEvent calEvent, boolean merge)
101 throws com.liferay.portal.kernel.exception.SystemException {
102 return getService().updateCalEvent(calEvent, merge);
103 }
104
105 public static com.liferay.portlet.calendar.model.CalEvent addEvent(
106 java.lang.String uuid, long userId, java.lang.String title,
107 java.lang.String description, int startDateMonth, int startDateDay,
108 int startDateYear, int startDateHour, int startDateMinute,
109 int endDateMonth, int endDateDay, int endDateYear, int durationHour,
110 int durationMinute, boolean allDay, boolean timeZoneSensitive,
111 java.lang.String type, boolean repeating,
112 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
113 int firstReminder, int secondReminder,
114 com.liferay.portal.service.ServiceContext serviceContext)
115 throws com.liferay.portal.kernel.exception.PortalException,
116 com.liferay.portal.kernel.exception.SystemException {
117 return getService()
118 .addEvent(uuid, userId, title, description, startDateMonth,
119 startDateDay, startDateYear, startDateHour, startDateMinute,
120 endDateMonth, endDateDay, endDateYear, durationHour,
121 durationMinute, allDay, timeZoneSensitive, type, repeating,
122 recurrence, remindBy, firstReminder, secondReminder, serviceContext);
123 }
124
125 public static void addEventResources(
126 com.liferay.portlet.calendar.model.CalEvent event,
127 boolean addCommunityPermissions, boolean addGuestPermissions)
128 throws com.liferay.portal.kernel.exception.PortalException,
129 com.liferay.portal.kernel.exception.SystemException {
130 getService()
131 .addEventResources(event, addCommunityPermissions,
132 addGuestPermissions);
133 }
134
135 public static void addEventResources(
136 com.liferay.portlet.calendar.model.CalEvent event,
137 java.lang.String[] communityPermissions,
138 java.lang.String[] guestPermissions)
139 throws com.liferay.portal.kernel.exception.PortalException,
140 com.liferay.portal.kernel.exception.SystemException {
141 getService()
142 .addEventResources(event, communityPermissions, guestPermissions);
143 }
144
145 public static void addEventResources(long eventId,
146 boolean addCommunityPermissions, boolean addGuestPermissions)
147 throws com.liferay.portal.kernel.exception.PortalException,
148 com.liferay.portal.kernel.exception.SystemException {
149 getService()
150 .addEventResources(eventId, addCommunityPermissions,
151 addGuestPermissions);
152 }
153
154 public static void addEventResources(long eventId,
155 java.lang.String[] communityPermissions,
156 java.lang.String[] guestPermissions)
157 throws com.liferay.portal.kernel.exception.PortalException,
158 com.liferay.portal.kernel.exception.SystemException {
159 getService()
160 .addEventResources(eventId, communityPermissions, guestPermissions);
161 }
162
163 public static void checkEvents()
164 throws com.liferay.portal.kernel.exception.PortalException,
165 com.liferay.portal.kernel.exception.SystemException {
166 getService().checkEvents();
167 }
168
169 public static void deleteEvent(
170 com.liferay.portlet.calendar.model.CalEvent event)
171 throws com.liferay.portal.kernel.exception.PortalException,
172 com.liferay.portal.kernel.exception.SystemException {
173 getService().deleteEvent(event);
174 }
175
176 public static void deleteEvent(long eventId)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException {
179 getService().deleteEvent(eventId);
180 }
181
182 public static void deleteEvents(long groupId)
183 throws com.liferay.portal.kernel.exception.PortalException,
184 com.liferay.portal.kernel.exception.SystemException {
185 getService().deleteEvents(groupId);
186 }
187
188 public static java.io.File exportEvent(long userId, long eventId)
189 throws com.liferay.portal.kernel.exception.PortalException,
190 com.liferay.portal.kernel.exception.SystemException {
191 return getService().exportEvent(userId, eventId);
192 }
193
194 public static java.io.File exportGroupEvents(long userId, long groupId,
195 java.lang.String fileName)
196 throws com.liferay.portal.kernel.exception.PortalException,
197 com.liferay.portal.kernel.exception.SystemException {
198 return getService().exportGroupEvents(userId, groupId, fileName);
199 }
200
201 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(
202 long companyId, int start, int end)
203 throws com.liferay.portal.kernel.exception.SystemException {
204 return getService().getCompanyEvents(companyId, start, end);
205 }
206
207 public static int getCompanyEventsCount(long companyId)
208 throws com.liferay.portal.kernel.exception.SystemException {
209 return getService().getCompanyEventsCount(companyId);
210 }
211
212 public static com.liferay.portlet.calendar.model.CalEvent getEvent(
213 long eventId)
214 throws com.liferay.portal.kernel.exception.PortalException,
215 com.liferay.portal.kernel.exception.SystemException {
216 return getService().getEvent(eventId);
217 }
218
219 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
220 long groupId, java.util.Calendar cal)
221 throws com.liferay.portal.kernel.exception.SystemException {
222 return getService().getEvents(groupId, cal);
223 }
224
225 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
226 long groupId, java.util.Calendar cal, java.lang.String type)
227 throws com.liferay.portal.kernel.exception.SystemException {
228 return getService().getEvents(groupId, cal, type);
229 }
230
231 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
232 long groupId, java.lang.String type, int start, int end)
233 throws com.liferay.portal.kernel.exception.SystemException {
234 return getService().getEvents(groupId, type, start, end);
235 }
236
237 public static int getEventsCount(long groupId, java.lang.String type)
238 throws com.liferay.portal.kernel.exception.SystemException {
239 return getService().getEventsCount(groupId, type);
240 }
241
242 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents()
243 throws com.liferay.portal.kernel.exception.SystemException {
244 return getService().getNoAssetEvents();
245 }
246
247 public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
248 long groupId)
249 throws com.liferay.portal.kernel.exception.SystemException {
250 return getService().getRepeatingEvents(groupId);
251 }
252
253 public static boolean hasEvents(long groupId, java.util.Calendar cal)
254 throws com.liferay.portal.kernel.exception.SystemException {
255 return getService().hasEvents(groupId, cal);
256 }
257
258 public static boolean hasEvents(long groupId, java.util.Calendar cal,
259 java.lang.String type)
260 throws com.liferay.portal.kernel.exception.SystemException {
261 return getService().hasEvents(groupId, cal, type);
262 }
263
264 public static void importICal4j(long userId, long groupId, java.io.File file)
265 throws com.liferay.portal.kernel.exception.PortalException,
266 com.liferay.portal.kernel.exception.SystemException {
267 getService().importICal4j(userId, groupId, file);
268 }
269
270 public static void updateAsset(long userId,
271 com.liferay.portlet.calendar.model.CalEvent event,
272 long[] assetCategoryIds, java.lang.String[] assetTagNames)
273 throws com.liferay.portal.kernel.exception.PortalException,
274 com.liferay.portal.kernel.exception.SystemException {
275 getService().updateAsset(userId, event, assetCategoryIds, assetTagNames);
276 }
277
278 public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
279 long userId, long eventId, java.lang.String title,
280 java.lang.String description, int startDateMonth, int startDateDay,
281 int startDateYear, int startDateHour, int startDateMinute,
282 int endDateMonth, int endDateDay, int endDateYear, int durationHour,
283 int durationMinute, boolean allDay, boolean timeZoneSensitive,
284 java.lang.String type, boolean repeating,
285 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
286 int firstReminder, int secondReminder,
287 com.liferay.portal.service.ServiceContext serviceContext)
288 throws com.liferay.portal.kernel.exception.PortalException,
289 com.liferay.portal.kernel.exception.SystemException {
290 return getService()
291 .updateEvent(userId, eventId, title, description,
292 startDateMonth, startDateDay, startDateYear, startDateHour,
293 startDateMinute, endDateMonth, endDateDay, endDateYear,
294 durationHour, durationMinute, allDay, timeZoneSensitive, type,
295 repeating, recurrence, remindBy, firstReminder, secondReminder,
296 serviceContext);
297 }
298
299 public static CalEventLocalService getService() {
300 if (_service == null) {
301 _service = (CalEventLocalService)PortalBeanLocatorUtil.locate(CalEventLocalService.class.getName());
302 }
303
304 return _service;
305 }
306
307 public void setService(CalEventLocalService service) {
308 _service = service;
309 }
310
311 private static CalEventLocalService _service;
312 }