1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.calendar.service;
24  
25  
26  /**
27   * <a href="CalEventLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.calendar.service.CalEventLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.calendar.service.CalEventLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.calendar.service.CalEventLocalService
50   * @see com.liferay.portlet.calendar.service.CalEventLocalServiceFactory
51   *
52   */
53  public class CalEventLocalServiceUtil {
54      public static com.liferay.portlet.calendar.model.CalEvent addCalEvent(
55          com.liferay.portlet.calendar.model.CalEvent model)
56          throws com.liferay.portal.SystemException {
57          CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
58  
59          return calEventLocalService.addCalEvent(model);
60      }
61  
62      public static java.util.List dynamicQuery(
63          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
64          throws com.liferay.portal.SystemException {
65          CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
66  
67          return calEventLocalService.dynamicQuery(queryInitializer);
68      }
69  
70      public static java.util.List dynamicQuery(
71          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
72          int begin, int end) throws com.liferay.portal.SystemException {
73          CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
74  
75          return calEventLocalService.dynamicQuery(queryInitializer, begin, end);
76      }
77  
78      public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
79          com.liferay.portlet.calendar.model.CalEvent model)
80          throws com.liferay.portal.SystemException {
81          CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
82  
83          return calEventLocalService.updateCalEvent(model);
84      }
85  
86      public static com.liferay.portlet.calendar.service.persistence.CalEventPersistence getCalEventPersistence() {
87          CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
88  
89          return calEventLocalService.getCalEventPersistence();
90      }
91  
92      public static void setCalEventPersistence(
93          com.liferay.portlet.calendar.service.persistence.CalEventPersistence calEventPersistence) {
94          CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
95  
96          calEventLocalService.setCalEventPersistence(calEventPersistence);
97      }
98  
99      public static com.liferay.portlet.calendar.service.persistence.CalEventFinder getCalEventFinder() {
100         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
101 
102         return calEventLocalService.getCalEventFinder();
103     }
104 
105     public static void setCalEventFinder(
106         com.liferay.portlet.calendar.service.persistence.CalEventFinder calEventFinder) {
107         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
108 
109         calEventLocalService.setCalEventFinder(calEventFinder);
110     }
111 
112     public static com.liferay.portal.service.persistence.CompanyPersistence getCompanyPersistence() {
113         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
114 
115         return calEventLocalService.getCompanyPersistence();
116     }
117 
118     public static void setCompanyPersistence(
119         com.liferay.portal.service.persistence.CompanyPersistence companyPersistence) {
120         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
121 
122         calEventLocalService.setCompanyPersistence(companyPersistence);
123     }
124 
125     public static com.liferay.portal.service.persistence.PortletPreferencesPersistence getPortletPreferencesPersistence() {
126         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
127 
128         return calEventLocalService.getPortletPreferencesPersistence();
129     }
130 
131     public static void setPortletPreferencesPersistence(
132         com.liferay.portal.service.persistence.PortletPreferencesPersistence portletPreferencesPersistence) {
133         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
134 
135         calEventLocalService.setPortletPreferencesPersistence(portletPreferencesPersistence);
136     }
137 
138     public static com.liferay.portal.service.persistence.PortletPreferencesFinder getPortletPreferencesFinder() {
139         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
140 
141         return calEventLocalService.getPortletPreferencesFinder();
142     }
143 
144     public static void setPortletPreferencesFinder(
145         com.liferay.portal.service.persistence.PortletPreferencesFinder portletPreferencesFinder) {
146         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
147 
148         calEventLocalService.setPortletPreferencesFinder(portletPreferencesFinder);
149     }
150 
151     public static com.liferay.portal.service.persistence.ResourcePersistence getResourcePersistence() {
152         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
153 
154         return calEventLocalService.getResourcePersistence();
155     }
156 
157     public static void setResourcePersistence(
158         com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence) {
159         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
160 
161         calEventLocalService.setResourcePersistence(resourcePersistence);
162     }
163 
164     public static com.liferay.portal.service.persistence.ResourceFinder getResourceFinder() {
165         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
166 
167         return calEventLocalService.getResourceFinder();
168     }
169 
170     public static void setResourceFinder(
171         com.liferay.portal.service.persistence.ResourceFinder resourceFinder) {
172         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
173 
174         calEventLocalService.setResourceFinder(resourceFinder);
175     }
176 
177     public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
178         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
179 
180         return calEventLocalService.getUserPersistence();
181     }
182 
183     public static void setUserPersistence(
184         com.liferay.portal.service.persistence.UserPersistence userPersistence) {
185         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
186 
187         calEventLocalService.setUserPersistence(userPersistence);
188     }
189 
190     public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
191         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
192 
193         return calEventLocalService.getUserFinder();
194     }
195 
196     public static void setUserFinder(
197         com.liferay.portal.service.persistence.UserFinder userFinder) {
198         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
199 
200         calEventLocalService.setUserFinder(userFinder);
201     }
202 
203     public static void afterPropertiesSet() {
204         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
205 
206         calEventLocalService.afterPropertiesSet();
207     }
208 
209     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
210         long userId, long plid, java.lang.String title,
211         java.lang.String description, int startDateMonth, int startDateDay,
212         int startDateYear, int startDateHour, int startDateMinute,
213         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
214         int durationMinute, boolean allDay, boolean timeZoneSensitive,
215         java.lang.String type, boolean repeating,
216         com.liferay.portal.kernel.cal.Recurrence recurrence,
217         java.lang.String remindBy, int firstReminder, int secondReminder,
218         boolean addCommunityPermissions, boolean addGuestPermissions)
219         throws com.liferay.portal.PortalException, 
220             com.liferay.portal.SystemException {
221         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
222 
223         return calEventLocalService.addEvent(userId, plid, title, description,
224             startDateMonth, startDateDay, startDateYear, startDateHour,
225             startDateMinute, endDateMonth, endDateDay, endDateYear,
226             durationHour, durationMinute, allDay, timeZoneSensitive, type,
227             repeating, recurrence, remindBy, firstReminder, secondReminder,
228             addCommunityPermissions, addGuestPermissions);
229     }
230 
231     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
232         java.lang.String uuid, long userId, long plid, java.lang.String title,
233         java.lang.String description, int startDateMonth, int startDateDay,
234         int startDateYear, int startDateHour, int startDateMinute,
235         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
236         int durationMinute, boolean allDay, boolean timeZoneSensitive,
237         java.lang.String type, boolean repeating,
238         com.liferay.portal.kernel.cal.Recurrence recurrence,
239         java.lang.String remindBy, int firstReminder, int secondReminder,
240         boolean addCommunityPermissions, boolean addGuestPermissions)
241         throws com.liferay.portal.PortalException, 
242             com.liferay.portal.SystemException {
243         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
244 
245         return calEventLocalService.addEvent(uuid, userId, plid, title,
246             description, startDateMonth, startDateDay, startDateYear,
247             startDateHour, startDateMinute, endDateMonth, endDateDay,
248             endDateYear, durationHour, durationMinute, allDay,
249             timeZoneSensitive, type, repeating, recurrence, remindBy,
250             firstReminder, secondReminder, addCommunityPermissions,
251             addGuestPermissions);
252     }
253 
254     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
255         long userId, long plid, java.lang.String title,
256         java.lang.String description, int startDateMonth, int startDateDay,
257         int startDateYear, int startDateHour, int startDateMinute,
258         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
259         int durationMinute, boolean allDay, boolean timeZoneSensitive,
260         java.lang.String type, boolean repeating,
261         com.liferay.portal.kernel.cal.Recurrence recurrence,
262         java.lang.String remindBy, int firstReminder, int secondReminder,
263         java.lang.String[] communityPermissions,
264         java.lang.String[] guestPermissions)
265         throws com.liferay.portal.PortalException, 
266             com.liferay.portal.SystemException {
267         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
268 
269         return calEventLocalService.addEvent(userId, plid, title, description,
270             startDateMonth, startDateDay, startDateYear, startDateHour,
271             startDateMinute, endDateMonth, endDateDay, endDateYear,
272             durationHour, durationMinute, allDay, timeZoneSensitive, type,
273             repeating, recurrence, remindBy, firstReminder, secondReminder,
274             communityPermissions, guestPermissions);
275     }
276 
277     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
278         java.lang.String uuid, long userId, long plid, java.lang.String title,
279         java.lang.String description, int startDateMonth, int startDateDay,
280         int startDateYear, int startDateHour, int startDateMinute,
281         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
282         int durationMinute, boolean allDay, boolean timeZoneSensitive,
283         java.lang.String type, boolean repeating,
284         com.liferay.portal.kernel.cal.Recurrence recurrence,
285         java.lang.String remindBy, int firstReminder, int secondReminder,
286         java.lang.Boolean addCommunityPermissions,
287         java.lang.Boolean addGuestPermissions,
288         java.lang.String[] communityPermissions,
289         java.lang.String[] guestPermissions)
290         throws com.liferay.portal.PortalException, 
291             com.liferay.portal.SystemException {
292         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
293 
294         return calEventLocalService.addEvent(uuid, userId, plid, title,
295             description, startDateMonth, startDateDay, startDateYear,
296             startDateHour, startDateMinute, endDateMonth, endDateDay,
297             endDateYear, durationHour, durationMinute, allDay,
298             timeZoneSensitive, type, repeating, recurrence, remindBy,
299             firstReminder, secondReminder, addCommunityPermissions,
300             addGuestPermissions, communityPermissions, guestPermissions);
301     }
302 
303     public static void addEventResources(long eventId,
304         boolean addCommunityPermissions, boolean addGuestPermissions)
305         throws com.liferay.portal.PortalException, 
306             com.liferay.portal.SystemException {
307         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
308 
309         calEventLocalService.addEventResources(eventId,
310             addCommunityPermissions, addGuestPermissions);
311     }
312 
313     public static void addEventResources(
314         com.liferay.portlet.calendar.model.CalEvent event,
315         boolean addCommunityPermissions, boolean addGuestPermissions)
316         throws com.liferay.portal.PortalException, 
317             com.liferay.portal.SystemException {
318         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
319 
320         calEventLocalService.addEventResources(event, addCommunityPermissions,
321             addGuestPermissions);
322     }
323 
324     public static void addEventResources(long eventId,
325         java.lang.String[] communityPermissions,
326         java.lang.String[] guestPermissions)
327         throws com.liferay.portal.PortalException, 
328             com.liferay.portal.SystemException {
329         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
330 
331         calEventLocalService.addEventResources(eventId, communityPermissions,
332             guestPermissions);
333     }
334 
335     public static void addEventResources(
336         com.liferay.portlet.calendar.model.CalEvent event,
337         java.lang.String[] communityPermissions,
338         java.lang.String[] guestPermissions)
339         throws com.liferay.portal.PortalException, 
340             com.liferay.portal.SystemException {
341         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
342 
343         calEventLocalService.addEventResources(event, communityPermissions,
344             guestPermissions);
345     }
346 
347     public static void checkEvents()
348         throws com.liferay.portal.PortalException, 
349             com.liferay.portal.SystemException {
350         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
351 
352         calEventLocalService.checkEvents();
353     }
354 
355     public static void deleteEvent(long eventId)
356         throws com.liferay.portal.PortalException, 
357             com.liferay.portal.SystemException {
358         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
359 
360         calEventLocalService.deleteEvent(eventId);
361     }
362 
363     public static void deleteEvent(
364         com.liferay.portlet.calendar.model.CalEvent event)
365         throws com.liferay.portal.PortalException, 
366             com.liferay.portal.SystemException {
367         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
368 
369         calEventLocalService.deleteEvent(event);
370     }
371 
372     public static void deleteEvents(long groupId)
373         throws com.liferay.portal.PortalException, 
374             com.liferay.portal.SystemException {
375         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
376 
377         calEventLocalService.deleteEvents(groupId);
378     }
379 
380     public static java.io.File exportEvent(long userId, long eventId)
381         throws com.liferay.portal.PortalException, 
382             com.liferay.portal.SystemException {
383         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
384 
385         return calEventLocalService.exportEvent(userId, eventId);
386     }
387 
388     public static java.io.File exportGroupEvents(long userId, long plid,
389         java.lang.String fileName)
390         throws com.liferay.portal.PortalException, 
391             com.liferay.portal.SystemException {
392         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
393 
394         return calEventLocalService.exportGroupEvents(userId, plid, fileName);
395     }
396 
397     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
398         long eventId)
399         throws com.liferay.portal.PortalException, 
400             com.liferay.portal.SystemException {
401         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
402 
403         return calEventLocalService.getEvent(eventId);
404     }
405 
406     public static java.util.List getEvents(long groupId, java.lang.String type,
407         int begin, int end) throws com.liferay.portal.SystemException {
408         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
409 
410         return calEventLocalService.getEvents(groupId, type, begin, end);
411     }
412 
413     public static java.util.List getEvents(long groupId, java.util.Calendar cal)
414         throws com.liferay.portal.SystemException {
415         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
416 
417         return calEventLocalService.getEvents(groupId, cal);
418     }
419 
420     public static java.util.List getEvents(long groupId,
421         java.util.Calendar cal, java.lang.String type)
422         throws com.liferay.portal.SystemException {
423         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
424 
425         return calEventLocalService.getEvents(groupId, cal, type);
426     }
427 
428     public static int getEventsCount(long groupId, java.lang.String type)
429         throws com.liferay.portal.SystemException {
430         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
431 
432         return calEventLocalService.getEventsCount(groupId, type);
433     }
434 
435     public static java.util.List getRepeatingEvents(long groupId)
436         throws com.liferay.portal.SystemException {
437         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
438 
439         return calEventLocalService.getRepeatingEvents(groupId);
440     }
441 
442     public static boolean hasEvents(long groupId, java.util.Calendar cal)
443         throws com.liferay.portal.SystemException {
444         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
445 
446         return calEventLocalService.hasEvents(groupId, cal);
447     }
448 
449     public static boolean hasEvents(long groupId, java.util.Calendar cal,
450         java.lang.String type) throws com.liferay.portal.SystemException {
451         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
452 
453         return calEventLocalService.hasEvents(groupId, cal, type);
454     }
455 
456     public static void importICal4j(long userId, long plid, java.io.File file)
457         throws com.liferay.portal.PortalException, 
458             com.liferay.portal.SystemException {
459         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
460 
461         calEventLocalService.importICal4j(userId, plid, file);
462     }
463 
464     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
465         long userId, long eventId, java.lang.String title,
466         java.lang.String description, int startDateMonth, int startDateDay,
467         int startDateYear, int startDateHour, int startDateMinute,
468         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
469         int durationMinute, boolean allDay, boolean timeZoneSensitive,
470         java.lang.String type, boolean repeating,
471         com.liferay.portal.kernel.cal.Recurrence recurrence,
472         java.lang.String remindBy, int firstReminder, int secondReminder)
473         throws com.liferay.portal.PortalException, 
474             com.liferay.portal.SystemException {
475         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
476 
477         return calEventLocalService.updateEvent(userId, eventId, title,
478             description, startDateMonth, startDateDay, startDateYear,
479             startDateHour, startDateMinute, endDateMonth, endDateDay,
480             endDateYear, durationHour, durationMinute, allDay,
481             timeZoneSensitive, type, repeating, recurrence, remindBy,
482             firstReminder, secondReminder);
483     }
484 }