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     * The utility for the cal event remote service. This utility wraps {@link com.liferay.portlet.calendar.service.impl.CalEventServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.calendar.service.impl.CalEventServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see CalEventService
032     * @see com.liferay.portlet.calendar.service.base.CalEventServiceBaseImpl
033     * @see com.liferay.portlet.calendar.service.impl.CalEventServiceImpl
034     * @generated
035     */
036    public class CalEventServiceUtil {
037            public static com.liferay.portlet.calendar.model.CalEvent addEvent(
038                    java.lang.String title, java.lang.String description,
039                    int startDateMonth, int startDateDay, int startDateYear,
040                    int startDateHour, int startDateMinute, int endDateMonth,
041                    int endDateDay, int endDateYear, int durationHour, int durationMinute,
042                    boolean allDay, boolean timeZoneSensitive, java.lang.String type,
043                    boolean repeating,
044                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
045                    int firstReminder, int secondReminder,
046                    com.liferay.portal.service.ServiceContext serviceContext)
047                    throws com.liferay.portal.kernel.exception.PortalException,
048                            com.liferay.portal.kernel.exception.SystemException {
049                    return getService()
050                                       .addEvent(title, description, startDateMonth, startDateDay,
051                            startDateYear, startDateHour, startDateMinute, endDateMonth,
052                            endDateDay, endDateYear, durationHour, durationMinute, allDay,
053                            timeZoneSensitive, type, repeating, recurrence, remindBy,
054                            firstReminder, secondReminder, serviceContext);
055            }
056    
057            public static void deleteEvent(long eventId)
058                    throws com.liferay.portal.kernel.exception.PortalException,
059                            com.liferay.portal.kernel.exception.SystemException {
060                    getService().deleteEvent(eventId);
061            }
062    
063            public static java.io.File exportEvent(long eventId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    return getService().exportEvent(eventId);
067            }
068    
069            public static java.io.File exportGroupEvents(long groupId,
070                    java.lang.String fileName)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    return getService().exportGroupEvents(groupId, fileName);
074            }
075    
076            public static com.liferay.portlet.calendar.model.CalEvent getEvent(
077                    long eventId)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    return getService().getEvent(eventId);
081            }
082    
083            public static void importICal4j(long groupId, java.io.File file)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException {
086                    getService().importICal4j(groupId, file);
087            }
088    
089            public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
090                    long eventId, java.lang.String title, java.lang.String description,
091                    int startDateMonth, int startDateDay, int startDateYear,
092                    int startDateHour, int startDateMinute, int endDateMonth,
093                    int endDateDay, int endDateYear, int durationHour, int durationMinute,
094                    boolean allDay, boolean timeZoneSensitive, java.lang.String type,
095                    boolean repeating,
096                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
097                    int firstReminder, int secondReminder,
098                    com.liferay.portal.service.ServiceContext serviceContext)
099                    throws com.liferay.portal.kernel.exception.PortalException,
100                            com.liferay.portal.kernel.exception.SystemException {
101                    return getService()
102                                       .updateEvent(eventId, title, description, startDateMonth,
103                            startDateDay, startDateYear, startDateHour, startDateMinute,
104                            endDateMonth, endDateDay, endDateYear, durationHour,
105                            durationMinute, allDay, timeZoneSensitive, type, repeating,
106                            recurrence, remindBy, firstReminder, secondReminder, serviceContext);
107            }
108    
109            public static CalEventService getService() {
110                    if (_service == null) {
111                            _service = (CalEventService)PortalBeanLocatorUtil.locate(CalEventService.class.getName());
112                    }
113    
114                    return _service;
115            }
116    
117            public void setService(CalEventService service) {
118                    _service = service;
119            }
120    
121            private static CalEventService _service;
122    }