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