1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <code>com.liferay.portlet.calendar.service.CalEventLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.calendar.service.CalEventLocalService
45   *
46   */
47  public class CalEventLocalServiceUtil {
48      public static com.liferay.portlet.calendar.model.CalEvent addCalEvent(
49          com.liferay.portlet.calendar.model.CalEvent calEvent)
50          throws com.liferay.portal.SystemException {
51          return getService().addCalEvent(calEvent);
52      }
53  
54      public static com.liferay.portlet.calendar.model.CalEvent createCalEvent(
55          long eventId) {
56          return getService().createCalEvent(eventId);
57      }
58  
59      public static void deleteCalEvent(long eventId)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          getService().deleteCalEvent(eventId);
63      }
64  
65      public static void deleteCalEvent(
66          com.liferay.portlet.calendar.model.CalEvent calEvent)
67          throws com.liferay.portal.SystemException {
68          getService().deleteCalEvent(calEvent);
69      }
70  
71      public static java.util.List<Object> dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
73          throws com.liferay.portal.SystemException {
74          return getService().dynamicQuery(dynamicQuery);
75      }
76  
77      public static java.util.List<Object> dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end) throws com.liferay.portal.SystemException {
80          return getService().dynamicQuery(dynamicQuery, start, end);
81      }
82  
83      public static com.liferay.portlet.calendar.model.CalEvent getCalEvent(
84          long eventId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getCalEvent(eventId);
88      }
89  
90      public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
91          int start, int end) throws com.liferay.portal.SystemException {
92          return getService().getCalEvents(start, end);
93      }
94  
95      public static int getCalEventsCount()
96          throws com.liferay.portal.SystemException {
97          return getService().getCalEventsCount();
98      }
99  
100     public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
101         com.liferay.portlet.calendar.model.CalEvent calEvent)
102         throws com.liferay.portal.SystemException {
103         return getService().updateCalEvent(calEvent);
104     }
105 
106     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
107         long userId, java.lang.String title, java.lang.String description,
108         int startDateMonth, int startDateDay, int startDateYear,
109         int startDateHour, int startDateMinute, int endDateMonth,
110         int endDateDay, int endDateYear, int durationHour, int durationMinute,
111         boolean allDay, boolean timeZoneSensitive, java.lang.String type,
112         boolean repeating,
113         com.liferay.portal.kernel.cal.TZSRecurrence recurrence,
114         java.lang.String remindBy, int firstReminder, int secondReminder,
115         com.liferay.portal.service.ServiceContext serviceContext)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException {
118         return getService()
119                    .addEvent(userId, title, description, startDateMonth,
120             startDateDay, startDateYear, startDateHour, startDateMinute,
121             endDateMonth, endDateDay, endDateYear, durationHour,
122             durationMinute, allDay, timeZoneSensitive, type, repeating,
123             recurrence, remindBy, firstReminder, secondReminder, serviceContext);
124     }
125 
126     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
127         java.lang.String uuid, long userId, java.lang.String title,
128         java.lang.String description, int startDateMonth, int startDateDay,
129         int startDateYear, int startDateHour, int startDateMinute,
130         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
131         int durationMinute, boolean allDay, boolean timeZoneSensitive,
132         java.lang.String type, boolean repeating,
133         com.liferay.portal.kernel.cal.TZSRecurrence recurrence,
134         java.lang.String remindBy, int firstReminder, int secondReminder,
135         com.liferay.portal.service.ServiceContext serviceContext)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException {
138         return getService()
139                    .addEvent(uuid, userId, title, description, startDateMonth,
140             startDateDay, startDateYear, startDateHour, startDateMinute,
141             endDateMonth, endDateDay, endDateYear, durationHour,
142             durationMinute, allDay, timeZoneSensitive, type, repeating,
143             recurrence, remindBy, firstReminder, secondReminder, serviceContext);
144     }
145 
146     public static void addEventResources(long eventId,
147         boolean addCommunityPermissions, boolean addGuestPermissions)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException {
150         getService()
151             .addEventResources(eventId, addCommunityPermissions,
152             addGuestPermissions);
153     }
154 
155     public static void addEventResources(
156         com.liferay.portlet.calendar.model.CalEvent event,
157         boolean addCommunityPermissions, boolean addGuestPermissions)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException {
160         getService()
161             .addEventResources(event, addCommunityPermissions,
162             addGuestPermissions);
163     }
164 
165     public static void addEventResources(long eventId,
166         java.lang.String[] communityPermissions,
167         java.lang.String[] guestPermissions)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException {
170         getService()
171             .addEventResources(eventId, communityPermissions, guestPermissions);
172     }
173 
174     public static void addEventResources(
175         com.liferay.portlet.calendar.model.CalEvent event,
176         java.lang.String[] communityPermissions,
177         java.lang.String[] guestPermissions)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException {
180         getService()
181             .addEventResources(event, communityPermissions, guestPermissions);
182     }
183 
184     public static void checkEvents()
185         throws com.liferay.portal.PortalException,
186             com.liferay.portal.SystemException {
187         getService().checkEvents();
188     }
189 
190     public static void deleteEvent(long eventId)
191         throws com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException {
193         getService().deleteEvent(eventId);
194     }
195 
196     public static void deleteEvent(
197         com.liferay.portlet.calendar.model.CalEvent event)
198         throws com.liferay.portal.PortalException,
199             com.liferay.portal.SystemException {
200         getService().deleteEvent(event);
201     }
202 
203     public static void deleteEvents(long groupId)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         getService().deleteEvents(groupId);
207     }
208 
209     public static java.io.File exportEvent(long userId, long eventId)
210         throws com.liferay.portal.PortalException,
211             com.liferay.portal.SystemException {
212         return getService().exportEvent(userId, eventId);
213     }
214 
215     public static java.io.File exportGroupEvents(long userId, long groupId,
216         java.lang.String fileName)
217         throws com.liferay.portal.PortalException,
218             com.liferay.portal.SystemException {
219         return getService().exportGroupEvents(userId, groupId, fileName);
220     }
221 
222     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
223         long eventId)
224         throws com.liferay.portal.PortalException,
225             com.liferay.portal.SystemException {
226         return getService().getEvent(eventId);
227     }
228 
229     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
230         long groupId, java.lang.String type, int start, int end)
231         throws com.liferay.portal.SystemException {
232         return getService().getEvents(groupId, type, start, end);
233     }
234 
235     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
236         long groupId, java.util.Calendar cal)
237         throws com.liferay.portal.SystemException {
238         return getService().getEvents(groupId, cal);
239     }
240 
241     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
242         long groupId, java.util.Calendar cal, java.lang.String type)
243         throws com.liferay.portal.SystemException {
244         return getService().getEvents(groupId, cal, type);
245     }
246 
247     public static int getEventsCount(long groupId, java.lang.String type)
248         throws com.liferay.portal.SystemException {
249         return getService().getEventsCount(groupId, type);
250     }
251 
252     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
253         long groupId) throws com.liferay.portal.SystemException {
254         return getService().getRepeatingEvents(groupId);
255     }
256 
257     public static boolean hasEvents(long groupId, java.util.Calendar cal)
258         throws com.liferay.portal.SystemException {
259         return getService().hasEvents(groupId, cal);
260     }
261 
262     public static boolean hasEvents(long groupId, java.util.Calendar cal,
263         java.lang.String type) throws com.liferay.portal.SystemException {
264         return getService().hasEvents(groupId, cal, type);
265     }
266 
267     public static void importICal4j(long userId, long groupId, java.io.File file)
268         throws com.liferay.portal.PortalException,
269             com.liferay.portal.SystemException {
270         getService().importICal4j(userId, groupId, file);
271     }
272 
273     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
274         long userId, long eventId, java.lang.String title,
275         java.lang.String description, int startDateMonth, int startDateDay,
276         int startDateYear, int startDateHour, int startDateMinute,
277         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
278         int durationMinute, boolean allDay, boolean timeZoneSensitive,
279         java.lang.String type, boolean repeating,
280         com.liferay.portal.kernel.cal.TZSRecurrence recurrence,
281         java.lang.String remindBy, int firstReminder, int secondReminder)
282         throws com.liferay.portal.PortalException,
283             com.liferay.portal.SystemException {
284         return getService()
285                    .updateEvent(userId, eventId, title, description,
286             startDateMonth, startDateDay, startDateYear, startDateHour,
287             startDateMinute, endDateMonth, endDateDay, endDateYear,
288             durationHour, durationMinute, allDay, timeZoneSensitive, type,
289             repeating, recurrence, remindBy, firstReminder, secondReminder);
290     }
291 
292     public static CalEventLocalService getService() {
293         if (_service == null) {
294             throw new RuntimeException("CalEventLocalService is not set");
295         }
296 
297         return _service;
298     }
299 
300     public void setService(CalEventLocalService service) {
301         _service = service;
302     }
303 
304     private static CalEventLocalService _service;
305 }