1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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   * {@link CalEventLocalService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       CalEventLocalService
44   * @generated
45   */
46  public class CalEventLocalServiceUtil {
47      public static com.liferay.portlet.calendar.model.CalEvent addCalEvent(
48          com.liferay.portlet.calendar.model.CalEvent calEvent)
49          throws com.liferay.portal.SystemException {
50          return getService().addCalEvent(calEvent);
51      }
52  
53      public static com.liferay.portlet.calendar.model.CalEvent createCalEvent(
54          long eventId) {
55          return getService().createCalEvent(eventId);
56      }
57  
58      public static void deleteCalEvent(long eventId)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException {
61          getService().deleteCalEvent(eventId);
62      }
63  
64      public static void deleteCalEvent(
65          com.liferay.portlet.calendar.model.CalEvent calEvent)
66          throws com.liferay.portal.SystemException {
67          getService().deleteCalEvent(calEvent);
68      }
69  
70      public static java.util.List<Object> dynamicQuery(
71          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
72          throws com.liferay.portal.SystemException {
73          return getService().dynamicQuery(dynamicQuery);
74      }
75  
76      public static java.util.List<Object> dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end) throws com.liferay.portal.SystemException {
79          return getService().dynamicQuery(dynamicQuery, start, end);
80      }
81  
82      public static com.liferay.portlet.calendar.model.CalEvent getCalEvent(
83          long eventId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          return getService().getCalEvent(eventId);
87      }
88  
89      public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
90          int start, int end) throws com.liferay.portal.SystemException {
91          return getService().getCalEvents(start, end);
92      }
93  
94      public static int getCalEventsCount()
95          throws com.liferay.portal.SystemException {
96          return getService().getCalEventsCount();
97      }
98  
99      public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
100         com.liferay.portlet.calendar.model.CalEvent calEvent)
101         throws com.liferay.portal.SystemException {
102         return getService().updateCalEvent(calEvent);
103     }
104 
105     public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
106         com.liferay.portlet.calendar.model.CalEvent calEvent, boolean merge)
107         throws com.liferay.portal.SystemException {
108         return getService().updateCalEvent(calEvent, merge);
109     }
110 
111     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
112         long userId, java.lang.String title, java.lang.String description,
113         int startDateMonth, int startDateDay, int startDateYear,
114         int startDateHour, int startDateMinute, int endDateMonth,
115         int endDateDay, int endDateYear, int durationHour, int durationMinute,
116         boolean allDay, boolean timeZoneSensitive, java.lang.String type,
117         boolean repeating,
118         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
119         int firstReminder, int secondReminder,
120         com.liferay.portal.service.ServiceContext serviceContext)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         return getService()
124                    .addEvent(userId, title, description, startDateMonth,
125             startDateDay, startDateYear, startDateHour, startDateMinute,
126             endDateMonth, endDateDay, endDateYear, durationHour,
127             durationMinute, allDay, timeZoneSensitive, type, repeating,
128             recurrence, remindBy, firstReminder, secondReminder, serviceContext);
129     }
130 
131     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
132         java.lang.String uuid, long userId, java.lang.String title,
133         java.lang.String description, int startDateMonth, int startDateDay,
134         int startDateYear, int startDateHour, int startDateMinute,
135         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
136         int durationMinute, boolean allDay, boolean timeZoneSensitive,
137         java.lang.String type, boolean repeating,
138         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
139         int firstReminder, int secondReminder,
140         com.liferay.portal.service.ServiceContext serviceContext)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException {
143         return getService()
144                    .addEvent(uuid, userId, title, description, startDateMonth,
145             startDateDay, startDateYear, startDateHour, startDateMinute,
146             endDateMonth, endDateDay, endDateYear, durationHour,
147             durationMinute, allDay, timeZoneSensitive, type, repeating,
148             recurrence, remindBy, firstReminder, secondReminder, serviceContext);
149     }
150 
151     public static void addEventResources(long eventId,
152         boolean addCommunityPermissions, boolean addGuestPermissions)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException {
155         getService()
156             .addEventResources(eventId, addCommunityPermissions,
157             addGuestPermissions);
158     }
159 
160     public static void addEventResources(
161         com.liferay.portlet.calendar.model.CalEvent event,
162         boolean addCommunityPermissions, boolean addGuestPermissions)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException {
165         getService()
166             .addEventResources(event, addCommunityPermissions,
167             addGuestPermissions);
168     }
169 
170     public static void addEventResources(long eventId,
171         java.lang.String[] communityPermissions,
172         java.lang.String[] guestPermissions)
173         throws com.liferay.portal.PortalException,
174             com.liferay.portal.SystemException {
175         getService()
176             .addEventResources(eventId, communityPermissions, guestPermissions);
177     }
178 
179     public static void addEventResources(
180         com.liferay.portlet.calendar.model.CalEvent event,
181         java.lang.String[] communityPermissions,
182         java.lang.String[] guestPermissions)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException {
185         getService()
186             .addEventResources(event, communityPermissions, guestPermissions);
187     }
188 
189     public static void checkEvents()
190         throws com.liferay.portal.PortalException,
191             com.liferay.portal.SystemException {
192         getService().checkEvents();
193     }
194 
195     public static void deleteEvent(long eventId)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException {
198         getService().deleteEvent(eventId);
199     }
200 
201     public static void deleteEvent(
202         com.liferay.portlet.calendar.model.CalEvent event)
203         throws com.liferay.portal.PortalException,
204             com.liferay.portal.SystemException {
205         getService().deleteEvent(event);
206     }
207 
208     public static void deleteEvents(long groupId)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException {
211         getService().deleteEvents(groupId);
212     }
213 
214     public static java.io.File exportEvent(long userId, long eventId)
215         throws com.liferay.portal.PortalException,
216             com.liferay.portal.SystemException {
217         return getService().exportEvent(userId, eventId);
218     }
219 
220     public static java.io.File exportGroupEvents(long userId, long groupId,
221         java.lang.String fileName)
222         throws com.liferay.portal.PortalException,
223             com.liferay.portal.SystemException {
224         return getService().exportGroupEvents(userId, groupId, fileName);
225     }
226 
227     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
228         long eventId)
229         throws com.liferay.portal.PortalException,
230             com.liferay.portal.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.lang.String type, int start, int end)
236         throws com.liferay.portal.SystemException {
237         return getService().getEvents(groupId, type, start, end);
238     }
239 
240     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
241         long groupId, java.util.Calendar cal)
242         throws com.liferay.portal.SystemException {
243         return getService().getEvents(groupId, cal);
244     }
245 
246     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
247         long groupId, java.util.Calendar cal, java.lang.String type)
248         throws com.liferay.portal.SystemException {
249         return getService().getEvents(groupId, cal, type);
250     }
251 
252     public static int getEventsCount(long groupId, java.lang.String type)
253         throws com.liferay.portal.SystemException {
254         return getService().getEventsCount(groupId, type);
255     }
256 
257     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
258         long groupId) throws com.liferay.portal.SystemException {
259         return getService().getRepeatingEvents(groupId);
260     }
261 
262     public static boolean hasEvents(long groupId, java.util.Calendar cal)
263         throws com.liferay.portal.SystemException {
264         return getService().hasEvents(groupId, cal);
265     }
266 
267     public static boolean hasEvents(long groupId, java.util.Calendar cal,
268         java.lang.String type) throws com.liferay.portal.SystemException {
269         return getService().hasEvents(groupId, cal, type);
270     }
271 
272     public static void importICal4j(long userId, long groupId, java.io.File file)
273         throws com.liferay.portal.PortalException,
274             com.liferay.portal.SystemException {
275         getService().importICal4j(userId, groupId, file);
276     }
277 
278     public static void reIndex(long eventId)
279         throws com.liferay.portal.SystemException {
280         getService().reIndex(eventId);
281     }
282 
283     public static void reIndex(
284         com.liferay.portlet.calendar.model.CalEvent event)
285         throws com.liferay.portal.SystemException {
286         getService().reIndex(event);
287     }
288 
289     public static void reIndex(java.lang.String[] ids)
290         throws com.liferay.portal.SystemException {
291         getService().reIndex(ids);
292     }
293 
294     public static com.liferay.portal.kernel.search.Hits search(long companyId,
295         long groupId, long userId, long ownerUserId, java.lang.String keywords,
296         int start, int end) throws com.liferay.portal.SystemException {
297         return getService()
298                    .search(companyId, groupId, userId, ownerUserId, keywords,
299             start, end);
300     }
301 
302     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
303         long userId, long eventId, java.lang.String title,
304         java.lang.String description, int startDateMonth, int startDateDay,
305         int startDateYear, int startDateHour, int startDateMinute,
306         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
307         int durationMinute, boolean allDay, boolean timeZoneSensitive,
308         java.lang.String type, boolean repeating,
309         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
310         int firstReminder, int secondReminder,
311         com.liferay.portal.service.ServiceContext serviceContext)
312         throws com.liferay.portal.PortalException,
313             com.liferay.portal.SystemException {
314         return getService()
315                    .updateEvent(userId, eventId, title, description,
316             startDateMonth, startDateDay, startDateYear, startDateHour,
317             startDateMinute, endDateMonth, endDateDay, endDateYear,
318             durationHour, durationMinute, allDay, timeZoneSensitive, type,
319             repeating, recurrence, remindBy, firstReminder, secondReminder,
320             serviceContext);
321     }
322 
323     public static CalEventLocalService getService() {
324         if (_service == null) {
325             throw new RuntimeException("CalEventLocalService is not set");
326         }
327 
328         return _service;
329     }
330 
331     public void setService(CalEventLocalService service) {
332         _service = service;
333     }
334 
335     private static CalEventLocalService _service;
336 }