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="CalEventServiceUtil.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 CalEventService} 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       CalEventService
37   * @generated
38   */
39  public class CalEventServiceUtil {
40      public static com.liferay.portlet.calendar.model.CalEvent addEvent(
41          java.lang.String title, java.lang.String description,
42          int startDateMonth, int startDateDay, int startDateYear,
43          int startDateHour, int startDateMinute, int endDateMonth,
44          int endDateDay, int endDateYear, int durationHour, int durationMinute,
45          boolean allDay, boolean timeZoneSensitive, java.lang.String type,
46          boolean repeating,
47          com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
48          int firstReminder, int secondReminder,
49          com.liferay.portal.service.ServiceContext serviceContext)
50          throws com.liferay.portal.kernel.exception.PortalException,
51              com.liferay.portal.kernel.exception.SystemException {
52          return getService()
53                     .addEvent(title, description, startDateMonth, startDateDay,
54              startDateYear, startDateHour, startDateMinute, endDateMonth,
55              endDateDay, endDateYear, durationHour, durationMinute, allDay,
56              timeZoneSensitive, type, repeating, recurrence, remindBy,
57              firstReminder, secondReminder, serviceContext);
58      }
59  
60      public static void deleteEvent(long eventId)
61          throws com.liferay.portal.kernel.exception.PortalException,
62              com.liferay.portal.kernel.exception.SystemException {
63          getService().deleteEvent(eventId);
64      }
65  
66      public static java.io.File exportEvent(long eventId)
67          throws com.liferay.portal.kernel.exception.PortalException,
68              com.liferay.portal.kernel.exception.SystemException {
69          return getService().exportEvent(eventId);
70      }
71  
72      public static java.io.File exportGroupEvents(long groupId,
73          java.lang.String fileName)
74          throws com.liferay.portal.kernel.exception.PortalException,
75              com.liferay.portal.kernel.exception.SystemException {
76          return getService().exportGroupEvents(groupId, fileName);
77      }
78  
79      public static com.liferay.portlet.calendar.model.CalEvent getEvent(
80          long eventId)
81          throws com.liferay.portal.kernel.exception.PortalException,
82              com.liferay.portal.kernel.exception.SystemException {
83          return getService().getEvent(eventId);
84      }
85  
86      public static void importICal4j(long groupId, java.io.File file)
87          throws com.liferay.portal.kernel.exception.PortalException,
88              com.liferay.portal.kernel.exception.SystemException {
89          getService().importICal4j(groupId, file);
90      }
91  
92      public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
93          long eventId, java.lang.String title, java.lang.String description,
94          int startDateMonth, int startDateDay, int startDateYear,
95          int startDateHour, int startDateMinute, int endDateMonth,
96          int endDateDay, int endDateYear, int durationHour, int durationMinute,
97          boolean allDay, boolean timeZoneSensitive, java.lang.String type,
98          boolean repeating,
99          com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
100         int firstReminder, int secondReminder,
101         com.liferay.portal.service.ServiceContext serviceContext)
102         throws com.liferay.portal.kernel.exception.PortalException,
103             com.liferay.portal.kernel.exception.SystemException {
104         return getService()
105                    .updateEvent(eventId, title, description, startDateMonth,
106             startDateDay, startDateYear, startDateHour, startDateMinute,
107             endDateMonth, endDateDay, endDateYear, durationHour,
108             durationMinute, allDay, timeZoneSensitive, type, repeating,
109             recurrence, remindBy, firstReminder, secondReminder, serviceContext);
110     }
111 
112     public static CalEventService getService() {
113         if (_service == null) {
114             _service = (CalEventService)PortalBeanLocatorUtil.locate(CalEventService.class.getName());
115         }
116 
117         return _service;
118     }
119 
120     public void setService(CalEventService service) {
121         _service = service;
122     }
123 
124     private static CalEventService _service;
125 }