1   /**
2    * Copyright (c) 2000-2007 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   * <a href="CalEventLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.calendar.service.CalEventLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.calendar.service.CalEventLocalServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.calendar.service.CalEventLocalService
48   * @see com.liferay.portlet.calendar.service.CalEventLocalServiceFactory
49   *
50   */
51  public class CalEventLocalServiceUtil {
52      public static com.liferay.portlet.calendar.model.CalEvent addCalEvent(
53          com.liferay.portlet.calendar.model.CalEvent model)
54          throws com.liferay.portal.SystemException {
55          CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
56  
57          return calEventLocalService.addCalEvent(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
64  
65          return calEventLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
72  
73          return calEventLocalService.dynamicQuery(queryInitializer, begin, end);
74      }
75  
76      public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
77          com.liferay.portlet.calendar.model.CalEvent model)
78          throws com.liferay.portal.SystemException {
79          CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
80  
81          return calEventLocalService.updateCalEvent(model);
82      }
83  
84      public static com.liferay.portlet.calendar.model.CalEvent addEvent(
85          long userId, long plid, java.lang.String title,
86          java.lang.String description, int startDateMonth, int startDateDay,
87          int startDateYear, int startDateHour, int startDateMinute,
88          int endDateMonth, int endDateDay, int endDateYear, int durationHour,
89          int durationMinute, boolean allDay, boolean timeZoneSensitive,
90          java.lang.String type, boolean repeating,
91          com.liferay.portal.kernel.cal.Recurrence recurrence,
92          java.lang.String remindBy, int firstReminder, int secondReminder,
93          boolean addCommunityPermissions, boolean addGuestPermissions)
94          throws com.liferay.portal.PortalException, 
95              com.liferay.portal.SystemException {
96          CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
97  
98          return calEventLocalService.addEvent(userId, plid, title, description,
99              startDateMonth, startDateDay, startDateYear, startDateHour,
100             startDateMinute, endDateMonth, endDateDay, endDateYear,
101             durationHour, durationMinute, allDay, timeZoneSensitive, type,
102             repeating, recurrence, remindBy, firstReminder, secondReminder,
103             addCommunityPermissions, addGuestPermissions);
104     }
105 
106     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
107         long userId, long plid, java.lang.String title,
108         java.lang.String description, int startDateMonth, int startDateDay,
109         int startDateYear, int startDateHour, int startDateMinute,
110         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
111         int durationMinute, boolean allDay, boolean timeZoneSensitive,
112         java.lang.String type, boolean repeating,
113         com.liferay.portal.kernel.cal.Recurrence recurrence,
114         java.lang.String remindBy, int firstReminder, int secondReminder,
115         java.lang.String[] communityPermissions,
116         java.lang.String[] guestPermissions)
117         throws com.liferay.portal.PortalException, 
118             com.liferay.portal.SystemException {
119         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
120 
121         return calEventLocalService.addEvent(userId, plid, title, description,
122             startDateMonth, startDateDay, startDateYear, startDateHour,
123             startDateMinute, endDateMonth, endDateDay, endDateYear,
124             durationHour, durationMinute, allDay, timeZoneSensitive, type,
125             repeating, recurrence, remindBy, firstReminder, secondReminder,
126             communityPermissions, guestPermissions);
127     }
128 
129     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
130         long userId, long plid, java.lang.String title,
131         java.lang.String description, int startDateMonth, int startDateDay,
132         int startDateYear, int startDateHour, int startDateMinute,
133         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
134         int durationMinute, boolean allDay, boolean timeZoneSensitive,
135         java.lang.String type, boolean repeating,
136         com.liferay.portal.kernel.cal.Recurrence recurrence,
137         java.lang.String remindBy, int firstReminder, int secondReminder,
138         java.lang.Boolean addCommunityPermissions,
139         java.lang.Boolean addGuestPermissions,
140         java.lang.String[] communityPermissions,
141         java.lang.String[] guestPermissions)
142         throws com.liferay.portal.PortalException, 
143             com.liferay.portal.SystemException {
144         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
145 
146         return calEventLocalService.addEvent(userId, plid, title, description,
147             startDateMonth, startDateDay, startDateYear, startDateHour,
148             startDateMinute, endDateMonth, endDateDay, endDateYear,
149             durationHour, durationMinute, allDay, timeZoneSensitive, type,
150             repeating, recurrence, remindBy, firstReminder, secondReminder,
151             addCommunityPermissions, addGuestPermissions, communityPermissions,
152             guestPermissions);
153     }
154 
155     public static void addEventResources(long eventId,
156         boolean addCommunityPermissions, boolean addGuestPermissions)
157         throws com.liferay.portal.PortalException, 
158             com.liferay.portal.SystemException {
159         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
160         calEventLocalService.addEventResources(eventId,
161             addCommunityPermissions, addGuestPermissions);
162     }
163 
164     public static void addEventResources(
165         com.liferay.portlet.calendar.model.CalEvent event,
166         boolean addCommunityPermissions, boolean addGuestPermissions)
167         throws com.liferay.portal.PortalException, 
168             com.liferay.portal.SystemException {
169         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
170         calEventLocalService.addEventResources(event, addCommunityPermissions,
171             addGuestPermissions);
172     }
173 
174     public static void addEventResources(long eventId,
175         java.lang.String[] communityPermissions,
176         java.lang.String[] guestPermissions)
177         throws com.liferay.portal.PortalException, 
178             com.liferay.portal.SystemException {
179         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
180         calEventLocalService.addEventResources(eventId, communityPermissions,
181             guestPermissions);
182     }
183 
184     public static void addEventResources(
185         com.liferay.portlet.calendar.model.CalEvent event,
186         java.lang.String[] communityPermissions,
187         java.lang.String[] guestPermissions)
188         throws com.liferay.portal.PortalException, 
189             com.liferay.portal.SystemException {
190         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
191         calEventLocalService.addEventResources(event, communityPermissions,
192             guestPermissions);
193     }
194 
195     public static void checkEvents()
196         throws com.liferay.portal.PortalException, 
197             com.liferay.portal.SystemException {
198         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
199         calEventLocalService.checkEvents();
200     }
201 
202     public static void deleteEvent(long eventId)
203         throws com.liferay.portal.PortalException, 
204             com.liferay.portal.SystemException {
205         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
206         calEventLocalService.deleteEvent(eventId);
207     }
208 
209     public static void deleteEvent(
210         com.liferay.portlet.calendar.model.CalEvent event)
211         throws com.liferay.portal.PortalException, 
212             com.liferay.portal.SystemException {
213         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
214         calEventLocalService.deleteEvent(event);
215     }
216 
217     public static void deleteEvents(long groupId)
218         throws com.liferay.portal.PortalException, 
219             com.liferay.portal.SystemException {
220         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
221         calEventLocalService.deleteEvents(groupId);
222     }
223 
224     public static java.io.File exportEvent(long userId, long eventId)
225         throws com.liferay.portal.PortalException, 
226             com.liferay.portal.SystemException {
227         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
228 
229         return calEventLocalService.exportEvent(userId, eventId);
230     }
231 
232     public static java.io.File exportGroupEvents(long userId, long plid,
233         java.lang.String fileName)
234         throws com.liferay.portal.PortalException, 
235             com.liferay.portal.SystemException {
236         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
237 
238         return calEventLocalService.exportGroupEvents(userId, plid, fileName);
239     }
240 
241     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
242         long eventId)
243         throws com.liferay.portal.PortalException, 
244             com.liferay.portal.SystemException {
245         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
246 
247         return calEventLocalService.getEvent(eventId);
248     }
249 
250     public static java.util.List getEvents(long groupId, java.lang.String type,
251         int begin, int end) throws com.liferay.portal.SystemException {
252         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
253 
254         return calEventLocalService.getEvents(groupId, type, begin, end);
255     }
256 
257     public static java.util.List getEvents(long groupId, java.util.Calendar cal)
258         throws com.liferay.portal.SystemException {
259         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
260 
261         return calEventLocalService.getEvents(groupId, cal);
262     }
263 
264     public static java.util.List getEvents(long groupId,
265         java.util.Calendar cal, java.lang.String type)
266         throws com.liferay.portal.SystemException {
267         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
268 
269         return calEventLocalService.getEvents(groupId, cal, type);
270     }
271 
272     public static int getEventsCount(long groupId, java.lang.String type)
273         throws com.liferay.portal.SystemException {
274         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
275 
276         return calEventLocalService.getEventsCount(groupId, type);
277     }
278 
279     public static java.util.List getRepeatingEvents(long groupId)
280         throws com.liferay.portal.SystemException {
281         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
282 
283         return calEventLocalService.getRepeatingEvents(groupId);
284     }
285 
286     public static boolean hasEvents(long groupId, java.util.Calendar cal)
287         throws com.liferay.portal.SystemException {
288         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
289 
290         return calEventLocalService.hasEvents(groupId, cal);
291     }
292 
293     public static boolean hasEvents(long groupId, java.util.Calendar cal,
294         java.lang.String type) throws com.liferay.portal.SystemException {
295         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
296 
297         return calEventLocalService.hasEvents(groupId, cal, type);
298     }
299 
300     public static void importICal4j(long userId, long plid, java.io.File file)
301         throws com.liferay.portal.PortalException, 
302             com.liferay.portal.SystemException {
303         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
304         calEventLocalService.importICal4j(userId, plid, file);
305     }
306 
307     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
308         long userId, long eventId, java.lang.String title,
309         java.lang.String description, int startDateMonth, int startDateDay,
310         int startDateYear, int startDateHour, int startDateMinute,
311         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
312         int durationMinute, boolean allDay, boolean timeZoneSensitive,
313         java.lang.String type, boolean repeating,
314         com.liferay.portal.kernel.cal.Recurrence recurrence,
315         java.lang.String remindBy, int firstReminder, int secondReminder)
316         throws com.liferay.portal.PortalException, 
317             com.liferay.portal.SystemException {
318         CalEventLocalService calEventLocalService = CalEventLocalServiceFactory.getService();
319 
320         return calEventLocalService.updateEvent(userId, eventId, title,
321             description, startDateMonth, startDateDay, startDateYear,
322             startDateHour, startDateMinute, endDateMonth, endDateDay,
323             endDateYear, durationHour, durationMinute, allDay,
324             timeZoneSensitive, type, repeating, recurrence, remindBy,
325             firstReminder, secondReminder);
326     }
327 }