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 CalEventService} 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       CalEventService
030     * @generated
031     */
032    public class CalEventServiceUtil {
033            public static com.liferay.portlet.calendar.model.CalEvent addEvent(
034                    java.lang.String title, java.lang.String description,
035                    int startDateMonth, int startDateDay, int startDateYear,
036                    int startDateHour, int startDateMinute, int endDateMonth,
037                    int endDateDay, int endDateYear, int durationHour, int durationMinute,
038                    boolean allDay, boolean timeZoneSensitive, java.lang.String type,
039                    boolean repeating,
040                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
041                    int firstReminder, int secondReminder,
042                    com.liferay.portal.service.ServiceContext serviceContext)
043                    throws com.liferay.portal.kernel.exception.PortalException,
044                            com.liferay.portal.kernel.exception.SystemException {
045                    return getService()
046                                       .addEvent(title, description, startDateMonth, startDateDay,
047                            startDateYear, startDateHour, startDateMinute, endDateMonth,
048                            endDateDay, endDateYear, durationHour, durationMinute, allDay,
049                            timeZoneSensitive, type, repeating, recurrence, remindBy,
050                            firstReminder, secondReminder, serviceContext);
051            }
052    
053            public static void deleteEvent(long eventId)
054                    throws com.liferay.portal.kernel.exception.PortalException,
055                            com.liferay.portal.kernel.exception.SystemException {
056                    getService().deleteEvent(eventId);
057            }
058    
059            public static java.io.File exportEvent(long eventId)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService().exportEvent(eventId);
063            }
064    
065            public static java.io.File exportGroupEvents(long groupId,
066                    java.lang.String fileName)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException {
069                    return getService().exportGroupEvents(groupId, fileName);
070            }
071    
072            public static com.liferay.portlet.calendar.model.CalEvent getEvent(
073                    long eventId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().getEvent(eventId);
077            }
078    
079            public static void importICal4j(long groupId, java.io.File file)
080                    throws com.liferay.portal.kernel.exception.PortalException,
081                            com.liferay.portal.kernel.exception.SystemException {
082                    getService().importICal4j(groupId, file);
083            }
084    
085            public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
086                    long eventId, java.lang.String title, java.lang.String description,
087                    int startDateMonth, int startDateDay, int startDateYear,
088                    int startDateHour, int startDateMinute, int endDateMonth,
089                    int endDateDay, int endDateYear, int durationHour, int durationMinute,
090                    boolean allDay, boolean timeZoneSensitive, java.lang.String type,
091                    boolean repeating,
092                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
093                    int firstReminder, int secondReminder,
094                    com.liferay.portal.service.ServiceContext serviceContext)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    return getService()
098                                       .updateEvent(eventId, title, description, startDateMonth,
099                            startDateDay, startDateYear, startDateHour, startDateMinute,
100                            endDateMonth, endDateDay, endDateYear, durationHour,
101                            durationMinute, allDay, timeZoneSensitive, type, repeating,
102                            recurrence, remindBy, firstReminder, secondReminder, serviceContext);
103            }
104    
105            public static CalEventService getService() {
106                    if (_service == null) {
107                            _service = (CalEventService)PortalBeanLocatorUtil.locate(CalEventService.class.getName());
108                    }
109    
110                    return _service;
111            }
112    
113            public void setService(CalEventService service) {
114                    _service = service;
115            }
116    
117            private static CalEventService _service;
118    }