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, long plid, java.lang.String title,
113         java.lang.String description, int startDateMonth, int startDateDay,
114         int startDateYear, int startDateHour, int startDateMinute,
115         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
116         int durationMinute, boolean allDay, boolean timeZoneSensitive,
117         java.lang.String type, boolean repeating,
118         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
119         int firstReminder, int secondReminder, boolean addCommunityPermissions,
120         boolean addGuestPermissions)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         return getService()
124                    .addEvent(userId, plid, title, description, startDateMonth,
125             startDateDay, startDateYear, startDateHour, startDateMinute,
126             endDateMonth, endDateDay, endDateYear, durationHour,
127             durationMinute, allDay, timeZoneSensitive, type, repeating,
128             recurrence, remindBy, firstReminder, secondReminder,
129             addCommunityPermissions, addGuestPermissions);
130     }
131 
132     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
133         java.lang.String uuid, long userId, long plid, java.lang.String title,
134         java.lang.String description, int startDateMonth, int startDateDay,
135         int startDateYear, int startDateHour, int startDateMinute,
136         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
137         int durationMinute, boolean allDay, boolean timeZoneSensitive,
138         java.lang.String type, boolean repeating,
139         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
140         int firstReminder, int secondReminder, boolean addCommunityPermissions,
141         boolean addGuestPermissions)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException {
144         return getService()
145                    .addEvent(uuid, userId, plid, title, description,
146             startDateMonth, startDateDay, startDateYear, startDateHour,
147             startDateMinute, endDateMonth, endDateDay, endDateYear,
148             durationHour, durationMinute, allDay, timeZoneSensitive, type,
149             repeating, recurrence, remindBy, firstReminder, secondReminder,
150             addCommunityPermissions, addGuestPermissions);
151     }
152 
153     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
154         long userId, long plid, java.lang.String title,
155         java.lang.String description, int startDateMonth, int startDateDay,
156         int startDateYear, int startDateHour, int startDateMinute,
157         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
158         int durationMinute, boolean allDay, boolean timeZoneSensitive,
159         java.lang.String type, boolean repeating,
160         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
161         int firstReminder, int secondReminder,
162         java.lang.String[] communityPermissions,
163         java.lang.String[] guestPermissions)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException {
166         return getService()
167                    .addEvent(userId, plid, title, description, startDateMonth,
168             startDateDay, startDateYear, startDateHour, startDateMinute,
169             endDateMonth, endDateDay, endDateYear, durationHour,
170             durationMinute, allDay, timeZoneSensitive, type, repeating,
171             recurrence, remindBy, firstReminder, secondReminder,
172             communityPermissions, guestPermissions);
173     }
174 
175     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
176         java.lang.String uuid, long userId, long plid, java.lang.String title,
177         java.lang.String description, int startDateMonth, int startDateDay,
178         int startDateYear, int startDateHour, int startDateMinute,
179         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
180         int durationMinute, boolean allDay, boolean timeZoneSensitive,
181         java.lang.String type, boolean repeating,
182         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
183         int firstReminder, int secondReminder,
184         java.lang.Boolean addCommunityPermissions,
185         java.lang.Boolean addGuestPermissions,
186         java.lang.String[] communityPermissions,
187         java.lang.String[] guestPermissions)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException {
190         return getService()
191                    .addEvent(uuid, userId, plid, title, description,
192             startDateMonth, startDateDay, startDateYear, startDateHour,
193             startDateMinute, endDateMonth, endDateDay, endDateYear,
194             durationHour, durationMinute, allDay, timeZoneSensitive, type,
195             repeating, recurrence, remindBy, firstReminder, secondReminder,
196             addCommunityPermissions, addGuestPermissions, communityPermissions,
197             guestPermissions);
198     }
199 
200     public static void addEventResources(long eventId,
201         boolean addCommunityPermissions, boolean addGuestPermissions)
202         throws com.liferay.portal.PortalException,
203             com.liferay.portal.SystemException {
204         getService()
205             .addEventResources(eventId, addCommunityPermissions,
206             addGuestPermissions);
207     }
208 
209     public static void addEventResources(
210         com.liferay.portlet.calendar.model.CalEvent event,
211         boolean addCommunityPermissions, boolean addGuestPermissions)
212         throws com.liferay.portal.PortalException,
213             com.liferay.portal.SystemException {
214         getService()
215             .addEventResources(event, addCommunityPermissions,
216             addGuestPermissions);
217     }
218 
219     public static void addEventResources(long eventId,
220         java.lang.String[] communityPermissions,
221         java.lang.String[] guestPermissions)
222         throws com.liferay.portal.PortalException,
223             com.liferay.portal.SystemException {
224         getService()
225             .addEventResources(eventId, communityPermissions, guestPermissions);
226     }
227 
228     public static void addEventResources(
229         com.liferay.portlet.calendar.model.CalEvent event,
230         java.lang.String[] communityPermissions,
231         java.lang.String[] guestPermissions)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException {
234         getService()
235             .addEventResources(event, communityPermissions, guestPermissions);
236     }
237 
238     public static void checkEvents()
239         throws com.liferay.portal.PortalException,
240             com.liferay.portal.SystemException {
241         getService().checkEvents();
242     }
243 
244     public static void deleteEvent(long eventId)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException {
247         getService().deleteEvent(eventId);
248     }
249 
250     public static void deleteEvent(
251         com.liferay.portlet.calendar.model.CalEvent event)
252         throws com.liferay.portal.PortalException,
253             com.liferay.portal.SystemException {
254         getService().deleteEvent(event);
255     }
256 
257     public static void deleteEvents(long groupId)
258         throws com.liferay.portal.PortalException,
259             com.liferay.portal.SystemException {
260         getService().deleteEvents(groupId);
261     }
262 
263     public static java.io.File exportEvent(long userId, long eventId)
264         throws com.liferay.portal.PortalException,
265             com.liferay.portal.SystemException {
266         return getService().exportEvent(userId, eventId);
267     }
268 
269     public static java.io.File exportGroupEvents(long userId, long plid,
270         java.lang.String fileName)
271         throws com.liferay.portal.PortalException,
272             com.liferay.portal.SystemException {
273         return getService().exportGroupEvents(userId, plid, fileName);
274     }
275 
276     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
277         long eventId)
278         throws com.liferay.portal.PortalException,
279             com.liferay.portal.SystemException {
280         return getService().getEvent(eventId);
281     }
282 
283     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
284         long groupId, java.lang.String type, int start, int end)
285         throws com.liferay.portal.SystemException {
286         return getService().getEvents(groupId, type, start, end);
287     }
288 
289     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
290         long groupId, java.util.Calendar cal)
291         throws com.liferay.portal.SystemException {
292         return getService().getEvents(groupId, cal);
293     }
294 
295     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
296         long groupId, java.util.Calendar cal, java.lang.String type)
297         throws com.liferay.portal.SystemException {
298         return getService().getEvents(groupId, cal, type);
299     }
300 
301     public static int getEventsCount(long groupId, java.lang.String type)
302         throws com.liferay.portal.SystemException {
303         return getService().getEventsCount(groupId, type);
304     }
305 
306     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
307         long groupId) throws com.liferay.portal.SystemException {
308         return getService().getRepeatingEvents(groupId);
309     }
310 
311     public static boolean hasEvents(long groupId, java.util.Calendar cal)
312         throws com.liferay.portal.SystemException {
313         return getService().hasEvents(groupId, cal);
314     }
315 
316     public static boolean hasEvents(long groupId, java.util.Calendar cal,
317         java.lang.String type) throws com.liferay.portal.SystemException {
318         return getService().hasEvents(groupId, cal, type);
319     }
320 
321     public static void importICal4j(long userId, long plid, java.io.File file)
322         throws com.liferay.portal.PortalException,
323             com.liferay.portal.SystemException {
324         getService().importICal4j(userId, plid, file);
325     }
326 
327     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
328         long userId, long eventId, java.lang.String title,
329         java.lang.String description, int startDateMonth, int startDateDay,
330         int startDateYear, int startDateHour, int startDateMinute,
331         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
332         int durationMinute, boolean allDay, boolean timeZoneSensitive,
333         java.lang.String type, boolean repeating,
334         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
335         int firstReminder, int secondReminder)
336         throws com.liferay.portal.PortalException,
337             com.liferay.portal.SystemException {
338         return getService()
339                    .updateEvent(userId, eventId, title, description,
340             startDateMonth, startDateDay, startDateYear, startDateHour,
341             startDateMinute, endDateMonth, endDateDay, endDateYear,
342             durationHour, durationMinute, allDay, timeZoneSensitive, type,
343             repeating, recurrence, remindBy, firstReminder, secondReminder);
344     }
345 
346     public static CalEventLocalService getService() {
347         if (_service == null) {
348             throw new RuntimeException("CalEventLocalService is not set");
349         }
350 
351         return _service;
352     }
353 
354     public void setService(CalEventLocalService service) {
355         _service = service;
356     }
357 
358     private static CalEventLocalService _service;
359 }