1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.calendar.service;
21  
22  
23  /**
24   * <a href="CalEventLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.calendar.service.CalEventLocalService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.calendar.service.CalEventLocalService
42   *
43   */
44  public class CalEventLocalServiceUtil {
45      public static com.liferay.portlet.calendar.model.CalEvent addCalEvent(
46          com.liferay.portlet.calendar.model.CalEvent calEvent)
47          throws com.liferay.portal.SystemException {
48          return getService().addCalEvent(calEvent);
49      }
50  
51      public static com.liferay.portlet.calendar.model.CalEvent createCalEvent(
52          long eventId) {
53          return getService().createCalEvent(eventId);
54      }
55  
56      public static void deleteCalEvent(long eventId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService().deleteCalEvent(eventId);
60      }
61  
62      public static void deleteCalEvent(
63          com.liferay.portlet.calendar.model.CalEvent calEvent)
64          throws com.liferay.portal.SystemException {
65          getService().deleteCalEvent(calEvent);
66      }
67  
68      public static java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
70          throws com.liferay.portal.SystemException {
71          return getService().dynamicQuery(dynamicQuery);
72      }
73  
74      public static java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      public static com.liferay.portlet.calendar.model.CalEvent getCalEvent(
81          long eventId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getCalEvent(eventId);
85      }
86  
87      public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
88          int start, int end) throws com.liferay.portal.SystemException {
89          return getService().getCalEvents(start, end);
90      }
91  
92      public static int getCalEventsCount()
93          throws com.liferay.portal.SystemException {
94          return getService().getCalEventsCount();
95      }
96  
97      public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
98          com.liferay.portlet.calendar.model.CalEvent calEvent)
99          throws com.liferay.portal.SystemException {
100         return getService().updateCalEvent(calEvent);
101     }
102 
103     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
104         long userId, long plid, java.lang.String title,
105         java.lang.String description, int startDateMonth, int startDateDay,
106         int startDateYear, int startDateHour, int startDateMinute,
107         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
108         int durationMinute, boolean allDay, boolean timeZoneSensitive,
109         java.lang.String type, boolean repeating,
110         com.liferay.portal.kernel.cal.TZSRecurrence recurrence,
111         java.lang.String remindBy, int firstReminder, int secondReminder,
112         boolean addCommunityPermissions, boolean addGuestPermissions)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException {
115         return getService()
116                    .addEvent(userId, plid, title, description, startDateMonth,
117             startDateDay, startDateYear, startDateHour, startDateMinute,
118             endDateMonth, endDateDay, endDateYear, durationHour,
119             durationMinute, allDay, timeZoneSensitive, type, repeating,
120             recurrence, remindBy, firstReminder, secondReminder,
121             addCommunityPermissions, addGuestPermissions);
122     }
123 
124     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
125         java.lang.String uuid, long userId, long plid, java.lang.String title,
126         java.lang.String description, int startDateMonth, int startDateDay,
127         int startDateYear, int startDateHour, int startDateMinute,
128         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
129         int durationMinute, boolean allDay, boolean timeZoneSensitive,
130         java.lang.String type, boolean repeating,
131         com.liferay.portal.kernel.cal.TZSRecurrence recurrence,
132         java.lang.String remindBy, int firstReminder, int secondReminder,
133         boolean addCommunityPermissions, boolean addGuestPermissions)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException {
136         return getService()
137                    .addEvent(uuid, userId, plid, title, description,
138             startDateMonth, startDateDay, startDateYear, startDateHour,
139             startDateMinute, endDateMonth, endDateDay, endDateYear,
140             durationHour, durationMinute, allDay, timeZoneSensitive, type,
141             repeating, recurrence, remindBy, firstReminder, secondReminder,
142             addCommunityPermissions, addGuestPermissions);
143     }
144 
145     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
146         long userId, long plid, java.lang.String title,
147         java.lang.String description, int startDateMonth, int startDateDay,
148         int startDateYear, int startDateHour, int startDateMinute,
149         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
150         int durationMinute, boolean allDay, boolean timeZoneSensitive,
151         java.lang.String type, boolean repeating,
152         com.liferay.portal.kernel.cal.TZSRecurrence recurrence,
153         java.lang.String remindBy, int firstReminder, int secondReminder,
154         java.lang.String[] communityPermissions,
155         java.lang.String[] guestPermissions)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException {
158         return getService()
159                    .addEvent(userId, plid, title, description, startDateMonth,
160             startDateDay, startDateYear, startDateHour, startDateMinute,
161             endDateMonth, endDateDay, endDateYear, durationHour,
162             durationMinute, allDay, timeZoneSensitive, type, repeating,
163             recurrence, remindBy, firstReminder, secondReminder,
164             communityPermissions, guestPermissions);
165     }
166 
167     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
168         java.lang.String uuid, long userId, long plid, java.lang.String title,
169         java.lang.String description, int startDateMonth, int startDateDay,
170         int startDateYear, int startDateHour, int startDateMinute,
171         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
172         int durationMinute, boolean allDay, boolean timeZoneSensitive,
173         java.lang.String type, boolean repeating,
174         com.liferay.portal.kernel.cal.TZSRecurrence recurrence,
175         java.lang.String remindBy, int firstReminder, int secondReminder,
176         java.lang.Boolean addCommunityPermissions,
177         java.lang.Boolean addGuestPermissions,
178         java.lang.String[] communityPermissions,
179         java.lang.String[] guestPermissions)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException {
182         return getService()
183                    .addEvent(uuid, userId, plid, title, description,
184             startDateMonth, startDateDay, startDateYear, startDateHour,
185             startDateMinute, endDateMonth, endDateDay, endDateYear,
186             durationHour, durationMinute, allDay, timeZoneSensitive, type,
187             repeating, recurrence, remindBy, firstReminder, secondReminder,
188             addCommunityPermissions, addGuestPermissions, communityPermissions,
189             guestPermissions);
190     }
191 
192     public static void addEventResources(long eventId,
193         boolean addCommunityPermissions, boolean addGuestPermissions)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException {
196         getService()
197             .addEventResources(eventId, addCommunityPermissions,
198             addGuestPermissions);
199     }
200 
201     public static void addEventResources(
202         com.liferay.portlet.calendar.model.CalEvent event,
203         boolean addCommunityPermissions, boolean addGuestPermissions)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         getService()
207             .addEventResources(event, addCommunityPermissions,
208             addGuestPermissions);
209     }
210 
211     public static void addEventResources(long eventId,
212         java.lang.String[] communityPermissions,
213         java.lang.String[] guestPermissions)
214         throws com.liferay.portal.PortalException,
215             com.liferay.portal.SystemException {
216         getService()
217             .addEventResources(eventId, communityPermissions, guestPermissions);
218     }
219 
220     public static void addEventResources(
221         com.liferay.portlet.calendar.model.CalEvent event,
222         java.lang.String[] communityPermissions,
223         java.lang.String[] guestPermissions)
224         throws com.liferay.portal.PortalException,
225             com.liferay.portal.SystemException {
226         getService()
227             .addEventResources(event, communityPermissions, guestPermissions);
228     }
229 
230     public static void checkEvents()
231         throws com.liferay.portal.PortalException,
232             com.liferay.portal.SystemException {
233         getService().checkEvents();
234     }
235 
236     public static void deleteEvent(long eventId)
237         throws com.liferay.portal.PortalException,
238             com.liferay.portal.SystemException {
239         getService().deleteEvent(eventId);
240     }
241 
242     public static void deleteEvent(
243         com.liferay.portlet.calendar.model.CalEvent event)
244         throws com.liferay.portal.PortalException,
245             com.liferay.portal.SystemException {
246         getService().deleteEvent(event);
247     }
248 
249     public static void deleteEvents(long groupId)
250         throws com.liferay.portal.PortalException,
251             com.liferay.portal.SystemException {
252         getService().deleteEvents(groupId);
253     }
254 
255     public static java.io.File exportEvent(long userId, long eventId)
256         throws com.liferay.portal.PortalException,
257             com.liferay.portal.SystemException {
258         return getService().exportEvent(userId, eventId);
259     }
260 
261     public static java.io.File exportGroupEvents(long userId, long plid,
262         java.lang.String fileName)
263         throws com.liferay.portal.PortalException,
264             com.liferay.portal.SystemException {
265         return getService().exportGroupEvents(userId, plid, fileName);
266     }
267 
268     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
269         long eventId)
270         throws com.liferay.portal.PortalException,
271             com.liferay.portal.SystemException {
272         return getService().getEvent(eventId);
273     }
274 
275     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
276         long groupId, java.lang.String type, int start, int end)
277         throws com.liferay.portal.SystemException {
278         return getService().getEvents(groupId, type, start, end);
279     }
280 
281     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
282         long groupId, java.util.Calendar cal)
283         throws com.liferay.portal.SystemException {
284         return getService().getEvents(groupId, cal);
285     }
286 
287     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
288         long groupId, java.util.Calendar cal, java.lang.String type)
289         throws com.liferay.portal.SystemException {
290         return getService().getEvents(groupId, cal, type);
291     }
292 
293     public static int getEventsCount(long groupId, java.lang.String type)
294         throws com.liferay.portal.SystemException {
295         return getService().getEventsCount(groupId, type);
296     }
297 
298     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
299         long groupId) throws com.liferay.portal.SystemException {
300         return getService().getRepeatingEvents(groupId);
301     }
302 
303     public static boolean hasEvents(long groupId, java.util.Calendar cal)
304         throws com.liferay.portal.SystemException {
305         return getService().hasEvents(groupId, cal);
306     }
307 
308     public static boolean hasEvents(long groupId, java.util.Calendar cal,
309         java.lang.String type) throws com.liferay.portal.SystemException {
310         return getService().hasEvents(groupId, cal, type);
311     }
312 
313     public static void importICal4j(long userId, long plid, java.io.File file)
314         throws com.liferay.portal.PortalException,
315             com.liferay.portal.SystemException {
316         getService().importICal4j(userId, plid, file);
317     }
318 
319     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
320         long userId, long eventId, java.lang.String title,
321         java.lang.String description, int startDateMonth, int startDateDay,
322         int startDateYear, int startDateHour, int startDateMinute,
323         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
324         int durationMinute, boolean allDay, boolean timeZoneSensitive,
325         java.lang.String type, boolean repeating,
326         com.liferay.portal.kernel.cal.TZSRecurrence recurrence,
327         java.lang.String remindBy, int firstReminder, int secondReminder)
328         throws com.liferay.portal.PortalException,
329             com.liferay.portal.SystemException {
330         return getService()
331                    .updateEvent(userId, eventId, title, description,
332             startDateMonth, startDateDay, startDateYear, startDateHour,
333             startDateMinute, endDateMonth, endDateDay, endDateYear,
334             durationHour, durationMinute, allDay, timeZoneSensitive, type,
335             repeating, recurrence, remindBy, firstReminder, secondReminder);
336     }
337 
338     public static CalEventLocalService getService() {
339         if (_service == null) {
340             throw new RuntimeException("CalEventLocalService is not set");
341         }
342 
343         return _service;
344     }
345 
346     public void setService(CalEventLocalService service) {
347         _service = service;
348     }
349 
350     private static CalEventLocalService _service;
351 }