001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.calendar.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link CalEventLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       CalEventLocalService
030     * @generated
031     */
032    public class CalEventLocalServiceUtil {
033            public static com.liferay.portlet.calendar.model.CalEvent addCalEvent(
034                    com.liferay.portlet.calendar.model.CalEvent calEvent)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addCalEvent(calEvent);
037            }
038    
039            public static com.liferay.portlet.calendar.model.CalEvent createCalEvent(
040                    long eventId) {
041                    return getService().createCalEvent(eventId);
042            }
043    
044            public static void deleteCalEvent(long eventId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteCalEvent(eventId);
048            }
049    
050            public static void deleteCalEvent(
051                    com.liferay.portlet.calendar.model.CalEvent calEvent)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteCalEvent(calEvent);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.calendar.model.CalEvent getCalEvent(
087                    long eventId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getCalEvent(eventId);
091            }
092    
093            public static com.liferay.portlet.calendar.model.CalEvent getCalEventByUuidAndGroupId(
094                    java.lang.String uuid, long groupId)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    return getService().getCalEventByUuidAndGroupId(uuid, groupId);
098            }
099    
100            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
101                    int start, int end)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return getService().getCalEvents(start, end);
104            }
105    
106            public static int getCalEventsCount()
107                    throws com.liferay.portal.kernel.exception.SystemException {
108                    return getService().getCalEventsCount();
109            }
110    
111            public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
112                    com.liferay.portlet.calendar.model.CalEvent calEvent)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updateCalEvent(calEvent);
115            }
116    
117            public static com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
118                    com.liferay.portlet.calendar.model.CalEvent calEvent, boolean merge)
119                    throws com.liferay.portal.kernel.exception.SystemException {
120                    return getService().updateCalEvent(calEvent, merge);
121            }
122    
123            public static com.liferay.portlet.calendar.model.CalEvent addEvent(
124                    long userId, java.lang.String title, java.lang.String description,
125                    int startDateMonth, int startDateDay, int startDateYear,
126                    int startDateHour, int startDateMinute, int endDateMonth,
127                    int endDateDay, int endDateYear, int durationHour, int durationMinute,
128                    boolean allDay, boolean timeZoneSensitive, java.lang.String type,
129                    boolean repeating,
130                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
131                    int firstReminder, int secondReminder,
132                    com.liferay.portal.service.ServiceContext serviceContext)
133                    throws com.liferay.portal.kernel.exception.PortalException,
134                            com.liferay.portal.kernel.exception.SystemException {
135                    return getService()
136                                       .addEvent(userId, title, description, startDateMonth,
137                            startDateDay, startDateYear, startDateHour, startDateMinute,
138                            endDateMonth, endDateDay, endDateYear, durationHour,
139                            durationMinute, allDay, timeZoneSensitive, type, repeating,
140                            recurrence, remindBy, firstReminder, secondReminder, serviceContext);
141            }
142    
143            public static void addEventResources(
144                    com.liferay.portlet.calendar.model.CalEvent event,
145                    boolean addCommunityPermissions, boolean addGuestPermissions)
146                    throws com.liferay.portal.kernel.exception.PortalException,
147                            com.liferay.portal.kernel.exception.SystemException {
148                    getService()
149                            .addEventResources(event, addCommunityPermissions,
150                            addGuestPermissions);
151            }
152    
153            public static void addEventResources(
154                    com.liferay.portlet.calendar.model.CalEvent event,
155                    java.lang.String[] communityPermissions,
156                    java.lang.String[] guestPermissions)
157                    throws com.liferay.portal.kernel.exception.PortalException,
158                            com.liferay.portal.kernel.exception.SystemException {
159                    getService()
160                            .addEventResources(event, communityPermissions, guestPermissions);
161            }
162    
163            public static void addEventResources(long eventId,
164                    boolean addCommunityPermissions, boolean addGuestPermissions)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    getService()
168                            .addEventResources(eventId, addCommunityPermissions,
169                            addGuestPermissions);
170            }
171    
172            public static void addEventResources(long eventId,
173                    java.lang.String[] communityPermissions,
174                    java.lang.String[] guestPermissions)
175                    throws com.liferay.portal.kernel.exception.PortalException,
176                            com.liferay.portal.kernel.exception.SystemException {
177                    getService()
178                            .addEventResources(eventId, communityPermissions, guestPermissions);
179            }
180    
181            public static void checkEvents()
182                    throws com.liferay.portal.kernel.exception.PortalException,
183                            com.liferay.portal.kernel.exception.SystemException {
184                    getService().checkEvents();
185            }
186    
187            public static void deleteEvent(
188                    com.liferay.portlet.calendar.model.CalEvent event)
189                    throws com.liferay.portal.kernel.exception.PortalException,
190                            com.liferay.portal.kernel.exception.SystemException {
191                    getService().deleteEvent(event);
192            }
193    
194            public static void deleteEvent(long eventId)
195                    throws com.liferay.portal.kernel.exception.PortalException,
196                            com.liferay.portal.kernel.exception.SystemException {
197                    getService().deleteEvent(eventId);
198            }
199    
200            public static void deleteEvents(long groupId)
201                    throws com.liferay.portal.kernel.exception.PortalException,
202                            com.liferay.portal.kernel.exception.SystemException {
203                    getService().deleteEvents(groupId);
204            }
205    
206            public static java.io.File exportEvent(long userId, long eventId)
207                    throws com.liferay.portal.kernel.exception.PortalException,
208                            com.liferay.portal.kernel.exception.SystemException {
209                    return getService().exportEvent(userId, eventId);
210            }
211    
212            public static java.io.File exportGroupEvents(long userId, long groupId,
213                    java.lang.String fileName)
214                    throws com.liferay.portal.kernel.exception.PortalException,
215                            com.liferay.portal.kernel.exception.SystemException {
216                    return getService().exportGroupEvents(userId, groupId, fileName);
217            }
218    
219            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(
220                    long companyId, int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getService().getCompanyEvents(companyId, start, end);
223            }
224    
225            public static int getCompanyEventsCount(long companyId)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getService().getCompanyEventsCount(companyId);
228            }
229    
230            public static com.liferay.portlet.calendar.model.CalEvent getEvent(
231                    long eventId)
232                    throws com.liferay.portal.kernel.exception.PortalException,
233                            com.liferay.portal.kernel.exception.SystemException {
234                    return getService().getEvent(eventId);
235            }
236    
237            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
238                    long groupId, java.util.Calendar cal)
239                    throws com.liferay.portal.kernel.exception.SystemException {
240                    return getService().getEvents(groupId, cal);
241            }
242    
243            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
244                    long groupId, java.util.Calendar cal, java.lang.String type)
245                    throws com.liferay.portal.kernel.exception.SystemException {
246                    return getService().getEvents(groupId, cal, type);
247            }
248    
249            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
250                    long groupId, java.lang.String type, int start, int end)
251                    throws com.liferay.portal.kernel.exception.SystemException {
252                    return getService().getEvents(groupId, type, start, end);
253            }
254    
255            public static int getEventsCount(long groupId, java.lang.String type)
256                    throws com.liferay.portal.kernel.exception.SystemException {
257                    return getService().getEventsCount(groupId, type);
258            }
259    
260            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents()
261                    throws com.liferay.portal.kernel.exception.SystemException {
262                    return getService().getNoAssetEvents();
263            }
264    
265            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
266                    long groupId)
267                    throws com.liferay.portal.kernel.exception.SystemException {
268                    return getService().getRepeatingEvents(groupId);
269            }
270    
271            public static boolean hasEvents(long groupId, java.util.Calendar cal)
272                    throws com.liferay.portal.kernel.exception.SystemException {
273                    return getService().hasEvents(groupId, cal);
274            }
275    
276            public static boolean hasEvents(long groupId, java.util.Calendar cal,
277                    java.lang.String type)
278                    throws com.liferay.portal.kernel.exception.SystemException {
279                    return getService().hasEvents(groupId, cal, type);
280            }
281    
282            public static void importICal4j(long userId, long groupId, java.io.File file)
283                    throws com.liferay.portal.kernel.exception.PortalException,
284                            com.liferay.portal.kernel.exception.SystemException {
285                    getService().importICal4j(userId, groupId, file);
286            }
287    
288            public static void updateAsset(long userId,
289                    com.liferay.portlet.calendar.model.CalEvent event,
290                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
291                    throws com.liferay.portal.kernel.exception.PortalException,
292                            com.liferay.portal.kernel.exception.SystemException {
293                    getService().updateAsset(userId, event, assetCategoryIds, assetTagNames);
294            }
295    
296            public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
297                    long userId, long eventId, java.lang.String title,
298                    java.lang.String description, int startDateMonth, int startDateDay,
299                    int startDateYear, int startDateHour, int startDateMinute,
300                    int endDateMonth, int endDateDay, int endDateYear, int durationHour,
301                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
302                    java.lang.String type, boolean repeating,
303                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
304                    int firstReminder, int secondReminder,
305                    com.liferay.portal.service.ServiceContext serviceContext)
306                    throws com.liferay.portal.kernel.exception.PortalException,
307                            com.liferay.portal.kernel.exception.SystemException {
308                    return getService()
309                                       .updateEvent(userId, eventId, title, description,
310                            startDateMonth, startDateDay, startDateYear, startDateHour,
311                            startDateMinute, endDateMonth, endDateDay, endDateYear,
312                            durationHour, durationMinute, allDay, timeZoneSensitive, type,
313                            repeating, recurrence, remindBy, firstReminder, secondReminder,
314                            serviceContext);
315            }
316    
317            public static CalEventLocalService getService() {
318                    if (_service == null) {
319                            _service = (CalEventLocalService)PortalBeanLocatorUtil.locate(CalEventLocalService.class.getName());
320                    }
321    
322                    return _service;
323            }
324    
325            public void setService(CalEventLocalService service) {
326                    _service = service;
327            }
328    
329            private static CalEventLocalService _service;
330    }