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