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  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="CalEventLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link CalEventLocalService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       CalEventLocalService
45   * @generated
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 updateCalEvent(
107         com.liferay.portlet.calendar.model.CalEvent calEvent, boolean merge)
108         throws com.liferay.portal.SystemException {
109         return getService().updateCalEvent(calEvent, merge);
110     }
111 
112     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
113         long userId, java.lang.String title, java.lang.String description,
114         int startDateMonth, int startDateDay, int startDateYear,
115         int startDateHour, int startDateMinute, int endDateMonth,
116         int endDateDay, int endDateYear, int durationHour, int durationMinute,
117         boolean allDay, boolean timeZoneSensitive, java.lang.String type,
118         boolean repeating,
119         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
120         int firstReminder, int secondReminder,
121         com.liferay.portal.service.ServiceContext serviceContext)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException {
124         return getService()
125                    .addEvent(userId, title, description, startDateMonth,
126             startDateDay, startDateYear, startDateHour, startDateMinute,
127             endDateMonth, endDateDay, endDateYear, durationHour,
128             durationMinute, allDay, timeZoneSensitive, type, repeating,
129             recurrence, remindBy, firstReminder, secondReminder, serviceContext);
130     }
131 
132     public static com.liferay.portlet.calendar.model.CalEvent addEvent(
133         java.lang.String uuid, long userId, 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,
141         com.liferay.portal.service.ServiceContext serviceContext)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException {
144         return getService()
145                    .addEvent(uuid, userId, title, description, startDateMonth,
146             startDateDay, startDateYear, startDateHour, startDateMinute,
147             endDateMonth, endDateDay, endDateYear, durationHour,
148             durationMinute, allDay, timeZoneSensitive, type, repeating,
149             recurrence, remindBy, firstReminder, secondReminder, serviceContext);
150     }
151 
152     public static void addEventResources(
153         com.liferay.portlet.calendar.model.CalEvent event,
154         boolean addCommunityPermissions, boolean addGuestPermissions)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         getService()
158             .addEventResources(event, addCommunityPermissions,
159             addGuestPermissions);
160     }
161 
162     public static void addEventResources(
163         com.liferay.portlet.calendar.model.CalEvent event,
164         java.lang.String[] communityPermissions,
165         java.lang.String[] guestPermissions)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         getService()
169             .addEventResources(event, communityPermissions, guestPermissions);
170     }
171 
172     public static void addEventResources(long eventId,
173         boolean addCommunityPermissions, boolean addGuestPermissions)
174         throws com.liferay.portal.PortalException,
175             com.liferay.portal.SystemException {
176         getService()
177             .addEventResources(eventId, addCommunityPermissions,
178             addGuestPermissions);
179     }
180 
181     public static void addEventResources(long eventId,
182         java.lang.String[] communityPermissions,
183         java.lang.String[] guestPermissions)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException {
186         getService()
187             .addEventResources(eventId, communityPermissions, guestPermissions);
188     }
189 
190     public static void checkEvents()
191         throws com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException {
193         getService().checkEvents();
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 deleteEvent(long eventId)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         getService().deleteEvent(eventId);
207     }
208 
209     public static void deleteEvents(long groupId)
210         throws com.liferay.portal.PortalException,
211             com.liferay.portal.SystemException {
212         getService().deleteEvents(groupId);
213     }
214 
215     public static java.io.File exportEvent(long userId, long eventId)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException {
218         return getService().exportEvent(userId, eventId);
219     }
220 
221     public static java.io.File exportGroupEvents(long userId, long groupId,
222         java.lang.String fileName)
223         throws com.liferay.portal.PortalException,
224             com.liferay.portal.SystemException {
225         return getService().exportGroupEvents(userId, groupId, fileName);
226     }
227 
228     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
229         long eventId)
230         throws com.liferay.portal.PortalException,
231             com.liferay.portal.SystemException {
232         return getService().getEvent(eventId);
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 java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
248         long groupId, java.lang.String type, int start, int end)
249         throws com.liferay.portal.SystemException {
250         return getService().getEvents(groupId, type, start, end);
251     }
252 
253     public static int getEventsCount(long groupId, java.lang.String type)
254         throws com.liferay.portal.SystemException {
255         return getService().getEventsCount(groupId, type);
256     }
257 
258     public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
259         long groupId) throws com.liferay.portal.SystemException {
260         return getService().getRepeatingEvents(groupId);
261     }
262 
263     public static boolean hasEvents(long groupId, java.util.Calendar cal)
264         throws com.liferay.portal.SystemException {
265         return getService().hasEvents(groupId, cal);
266     }
267 
268     public static boolean hasEvents(long groupId, java.util.Calendar cal,
269         java.lang.String type) throws com.liferay.portal.SystemException {
270         return getService().hasEvents(groupId, cal, type);
271     }
272 
273     public static void importICal4j(long userId, long groupId, java.io.File file)
274         throws com.liferay.portal.PortalException,
275             com.liferay.portal.SystemException {
276         getService().importICal4j(userId, groupId, file);
277     }
278 
279     public static void reIndex(
280         com.liferay.portlet.calendar.model.CalEvent event)
281         throws com.liferay.portal.SystemException {
282         getService().reIndex(event);
283     }
284 
285     public static void reIndex(long eventId)
286         throws com.liferay.portal.SystemException {
287         getService().reIndex(eventId);
288     }
289 
290     public static void reIndex(java.lang.String[] ids)
291         throws com.liferay.portal.SystemException {
292         getService().reIndex(ids);
293     }
294 
295     public static com.liferay.portal.kernel.search.Hits search(long companyId,
296         long groupId, long userId, long ownerUserId, java.lang.String keywords,
297         int start, int end) throws com.liferay.portal.SystemException {
298         return getService()
299                    .search(companyId, groupId, userId, ownerUserId, keywords,
300             start, end);
301     }
302 
303     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
304         long userId, long eventId, java.lang.String title,
305         java.lang.String description, int startDateMonth, int startDateDay,
306         int startDateYear, int startDateHour, int startDateMinute,
307         int endDateMonth, int endDateDay, int endDateYear, int durationHour,
308         int durationMinute, boolean allDay, boolean timeZoneSensitive,
309         java.lang.String type, boolean repeating,
310         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
311         int firstReminder, int secondReminder,
312         com.liferay.portal.service.ServiceContext serviceContext)
313         throws com.liferay.portal.PortalException,
314             com.liferay.portal.SystemException {
315         return getService()
316                    .updateEvent(userId, eventId, title, description,
317             startDateMonth, startDateDay, startDateYear, startDateHour,
318             startDateMinute, endDateMonth, endDateDay, endDateYear,
319             durationHour, durationMinute, allDay, timeZoneSensitive, type,
320             repeating, recurrence, remindBy, firstReminder, secondReminder,
321             serviceContext);
322     }
323 
324     public static CalEventLocalService getService() {
325         if (_service == null) {
326             _service = (CalEventLocalService)PortalBeanLocatorUtil.locate(CalEventLocalService.class.getName());
327         }
328 
329         return _service;
330     }
331 
332     public void setService(CalEventLocalService service) {
333         _service = service;
334     }
335 
336     private static CalEventLocalService _service;
337 }