1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.calendar.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="CalEventLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link CalEventLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       CalEventLocalService
37   * @generated
38   */
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      @SuppressWarnings("unchecked")
64      public static java.util.List dynamicQuery(
65          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66          throws com.liferay.portal.kernel.exception.SystemException {
67          return getService().dynamicQuery(dynamicQuery);
68      }
69  
70      @SuppressWarnings("unchecked")
71      public static java.util.List dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73          int end) throws com.liferay.portal.kernel.exception.SystemException {
74          return getService().dynamicQuery(dynamicQuery, start, end);
75      }
76  
77      @SuppressWarnings("unchecked")
78      public static java.util.List dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80          int end,
81          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82          throws com.liferay.portal.kernel.exception.SystemException {
83          return getService()
84                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85      }
86  
87      public static long dynamicQueryCount(
88          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().dynamicQueryCount(dynamicQuery);
91      }
92  
93      public static com.liferay.portlet.calendar.model.CalEvent getCalEvent(
94          long eventId)
95          throws com.liferay.portal.kernel.exception.PortalException,
96              com.liferay.portal.kernel.exception.SystemException {
97          return getService().getCalEvent(eventId);
98      }
99  
100     public static com.liferay.portlet.calendar.model.CalEvent getCalEventByUuidAndGroupId(
101         java.lang.String uuid, long groupId)
102         throws com.liferay.portal.kernel.exception.PortalException,
103             com.liferay.portal.kernel.exception.SystemException {
104         return getService().getCalEventByUuidAndGroupId(uuid, groupId);
105     }
106 
107     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
108         int start, int end)
109         throws com.liferay.portal.kernel.exception.SystemException {
110         return getService().getCalEvents(start, end);
111     }
112 
113     public static int getCalEventsCount()
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getService().getCalEventsCount();
116     }
117 
118     public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
119         com.liferay.portlet.calendar.model.CalEvent calEvent)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getService().updateCalEvent(calEvent);
122     }
123 
124     public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
125         com.liferay.portlet.calendar.model.CalEvent calEvent, boolean merge)
126         throws com.liferay.portal.kernel.exception.SystemException {
127         return getService().updateCalEvent(calEvent, merge);
128     }
129 
130     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
131         java.lang.String uuid, long userId, java.lang.String title,
132         java.lang.String description, int startDateMonth, int startDateDay,
133         int startDateYear, int startDateHour, int startDateMinute,
134         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
135         int durationMinute, boolean allDay, boolean timeZoneSensitive,
136         java.lang.String type, boolean repeating,
137         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
138         int firstReminder, int secondReminder,
139         com.liferay.portal.service.ServiceContext serviceContext)
140         throws com.liferay.portal.kernel.exception.PortalException,
141             com.liferay.portal.kernel.exception.SystemException {
142         return getService()
143                    .addEvent(uuid, userId, title, description, startDateMonth,
144             startDateDay, startDateYear, startDateHour, startDateMinute,
145             endDateMonth, endDateDay, endDateYear, durationHour,
146             durationMinute, allDay, timeZoneSensitive, type, repeating,
147             recurrence, remindBy, firstReminder, secondReminder, serviceContext);
148     }
149 
150     public static void addEventResources(
151         com.liferay.portlet.calendar.model.CalEvent event,
152         boolean addCommunityPermissions, boolean addGuestPermissions)
153         throws com.liferay.portal.kernel.exception.PortalException,
154             com.liferay.portal.kernel.exception.SystemException {
155         getService()
156             .addEventResources(event, addCommunityPermissions,
157             addGuestPermissions);
158     }
159 
160     public static void addEventResources(
161         com.liferay.portlet.calendar.model.CalEvent event,
162         java.lang.String[] communityPermissions,
163         java.lang.String[] guestPermissions)
164         throws com.liferay.portal.kernel.exception.PortalException,
165             com.liferay.portal.kernel.exception.SystemException {
166         getService()
167             .addEventResources(event, communityPermissions, guestPermissions);
168     }
169 
170     public static void addEventResources(long eventId,
171         boolean addCommunityPermissions, boolean addGuestPermissions)
172         throws com.liferay.portal.kernel.exception.PortalException,
173             com.liferay.portal.kernel.exception.SystemException {
174         getService()
175             .addEventResources(eventId, addCommunityPermissions,
176             addGuestPermissions);
177     }
178 
179     public static void addEventResources(long eventId,
180         java.lang.String[] communityPermissions,
181         java.lang.String[] guestPermissions)
182         throws com.liferay.portal.kernel.exception.PortalException,
183             com.liferay.portal.kernel.exception.SystemException {
184         getService()
185             .addEventResources(eventId, communityPermissions, guestPermissions);
186     }
187 
188     public static void checkEvents()
189         throws com.liferay.portal.kernel.exception.PortalException,
190             com.liferay.portal.kernel.exception.SystemException {
191         getService().checkEvents();
192     }
193 
194     public static void deleteEvent(
195         com.liferay.portlet.calendar.model.CalEvent event)
196         throws com.liferay.portal.kernel.exception.PortalException,
197             com.liferay.portal.kernel.exception.SystemException {
198         getService().deleteEvent(event);
199     }
200 
201     public static void deleteEvent(long eventId)
202         throws com.liferay.portal.kernel.exception.PortalException,
203             com.liferay.portal.kernel.exception.SystemException {
204         getService().deleteEvent(eventId);
205     }
206 
207     public static void deleteEvents(long groupId)
208         throws com.liferay.portal.kernel.exception.PortalException,
209             com.liferay.portal.kernel.exception.SystemException {
210         getService().deleteEvents(groupId);
211     }
212 
213     public static java.io.File exportEvent(long userId, long eventId)
214         throws com.liferay.portal.kernel.exception.PortalException,
215             com.liferay.portal.kernel.exception.SystemException {
216         return getService().exportEvent(userId, eventId);
217     }
218 
219     public static java.io.File exportGroupEvents(long userId, long groupId,
220         java.lang.String fileName)
221         throws com.liferay.portal.kernel.exception.PortalException,
222             com.liferay.portal.kernel.exception.SystemException {
223         return getService().exportGroupEvents(userId, groupId, fileName);
224     }
225 
226     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(
227         long companyId, int start, int end)
228         throws com.liferay.portal.kernel.exception.SystemException {
229         return getService().getCompanyEvents(companyId, start, end);
230     }
231 
232     public static int getCompanyEventsCount(long companyId)
233         throws com.liferay.portal.kernel.exception.SystemException {
234         return getService().getCompanyEventsCount(companyId);
235     }
236 
237     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
238         long eventId)
239         throws com.liferay.portal.kernel.exception.PortalException,
240             com.liferay.portal.kernel.exception.SystemException {
241         return getService().getEvent(eventId);
242     }
243 
244     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
245         long groupId, java.util.Calendar cal)
246         throws com.liferay.portal.kernel.exception.SystemException {
247         return getService().getEvents(groupId, cal);
248     }
249 
250     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
251         long groupId, java.util.Calendar cal, java.lang.String type)
252         throws com.liferay.portal.kernel.exception.SystemException {
253         return getService().getEvents(groupId, cal, type);
254     }
255 
256     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
257         long groupId, java.lang.String type, int start, int end)
258         throws com.liferay.portal.kernel.exception.SystemException {
259         return getService().getEvents(groupId, type, start, end);
260     }
261 
262     public static int getEventsCount(long groupId, java.lang.String type)
263         throws com.liferay.portal.kernel.exception.SystemException {
264         return getService().getEventsCount(groupId, type);
265     }
266 
267     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents()
268         throws com.liferay.portal.kernel.exception.SystemException {
269         return getService().getNoAssetEvents();
270     }
271 
272     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
273         long groupId)
274         throws com.liferay.portal.kernel.exception.SystemException {
275         return getService().getRepeatingEvents(groupId);
276     }
277 
278     public static boolean hasEvents(long groupId, java.util.Calendar cal)
279         throws com.liferay.portal.kernel.exception.SystemException {
280         return getService().hasEvents(groupId, cal);
281     }
282 
283     public static boolean hasEvents(long groupId, java.util.Calendar cal,
284         java.lang.String type)
285         throws com.liferay.portal.kernel.exception.SystemException {
286         return getService().hasEvents(groupId, cal, type);
287     }
288 
289     public static void importICal4j(long userId, long groupId, java.io.File file)
290         throws com.liferay.portal.kernel.exception.PortalException,
291             com.liferay.portal.kernel.exception.SystemException {
292         getService().importICal4j(userId, groupId, file);
293     }
294 
295     public static void updateAsset(long userId,
296         com.liferay.portlet.calendar.model.CalEvent event,
297         long[] assetCategoryIds, java.lang.String[] assetTagNames)
298         throws com.liferay.portal.kernel.exception.PortalException,
299             com.liferay.portal.kernel.exception.SystemException {
300         getService().updateAsset(userId, event, assetCategoryIds, assetTagNames);
301     }
302 
303     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
304         long userId, long eventId, java.lang.String title,
305         java.lang.String description, int startDateMonth, int startDateDay,
306         int startDateYear, int startDateHour, int startDateMinute,
307         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
308         int durationMinute, boolean allDay, boolean timeZoneSensitive,
309         java.lang.String type, boolean repeating,
310         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
311         int firstReminder, int secondReminder,
312         com.liferay.portal.service.ServiceContext serviceContext)
313         throws com.liferay.portal.kernel.exception.PortalException,
314             com.liferay.portal.kernel.exception.SystemException {
315         return getService()
316                    .updateEvent(userId, eventId, title, description,
317             startDateMonth, startDateDay, startDateYear, startDateHour,
318             startDateMinute, endDateMonth, endDateDay, endDateYear,
319             durationHour, durationMinute, allDay, timeZoneSensitive, type,
320             repeating, recurrence, remindBy, firstReminder, secondReminder,
321             serviceContext);
322     }
323 
324     public static CalEventLocalService getService() {
325         if (_service == null) {
326             _service = (CalEventLocalService)PortalBeanLocatorUtil.locate(CalEventLocalService.class.getName());
327         }
328 
329         return _service;
330     }
331 
332     public void setService(CalEventLocalService service) {
333         _service = service;
334     }
335 
336     private static CalEventLocalService _service;
337 }