001    /**
002     * Copyright (c) 2000-2013 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    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * 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.
022     *
023     * <p>
024     * 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.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see CalEventService
029     * @see com.liferay.portlet.calendar.service.base.CalEventServiceBaseImpl
030     * @see com.liferay.portlet.calendar.service.impl.CalEventServiceImpl
031     * @generated
032     */
033    public class CalEventServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * 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.
038             */
039    
040            /**
041            * Returns the Spring bean ID for this bean.
042            *
043            * @return the Spring bean ID for this bean
044            */
045            public static java.lang.String getBeanIdentifier() {
046                    return getService().getBeanIdentifier();
047            }
048    
049            /**
050            * Sets the Spring bean ID for this bean.
051            *
052            * @param beanIdentifier the Spring bean ID for this bean
053            */
054            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055                    getService().setBeanIdentifier(beanIdentifier);
056            }
057    
058            public static com.liferay.portlet.calendar.model.CalEvent addEvent(
059                    java.lang.String title, java.lang.String description,
060                    java.lang.String location, int startDateMonth, int startDateDay,
061                    int startDateYear, int startDateHour, int startDateMinute,
062                    int durationHour, int durationMinute, boolean allDay,
063                    boolean timeZoneSensitive, java.lang.String type, boolean repeating,
064                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
065                    int firstReminder, int secondReminder,
066                    com.liferay.portal.service.ServiceContext serviceContext)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException {
069                    return getService()
070                                       .addEvent(title, description, location, startDateMonth,
071                            startDateDay, startDateYear, startDateHour, startDateMinute,
072                            durationHour, durationMinute, allDay, timeZoneSensitive, type,
073                            repeating, recurrence, remindBy, firstReminder, secondReminder,
074                            serviceContext);
075            }
076    
077            /**
078            * @deprecated {@link #addEvent(String, String, String, int, int, int, int,
079            int, int, int, boolean, boolean, String, boolean,
080            TZSRecurrence, int, int, int, ServiceContext)}
081            */
082            public static com.liferay.portlet.calendar.model.CalEvent addEvent(
083                    java.lang.String title, java.lang.String description,
084                    java.lang.String location, int startDateMonth, int startDateDay,
085                    int startDateYear, int startDateHour, int startDateMinute,
086                    int endDateMonth, int endDateDay, int endDateYear, int durationHour,
087                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
088                    java.lang.String type, boolean repeating,
089                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
090                    int firstReminder, int secondReminder,
091                    com.liferay.portal.service.ServiceContext serviceContext)
092                    throws com.liferay.portal.kernel.exception.PortalException,
093                            com.liferay.portal.kernel.exception.SystemException {
094                    return getService()
095                                       .addEvent(title, description, location, startDateMonth,
096                            startDateDay, startDateYear, startDateHour, startDateMinute,
097                            endDateMonth, endDateDay, endDateYear, durationHour,
098                            durationMinute, allDay, timeZoneSensitive, type, repeating,
099                            recurrence, remindBy, firstReminder, secondReminder, serviceContext);
100            }
101    
102            public static void deleteEvent(long eventId)
103                    throws com.liferay.portal.kernel.exception.PortalException,
104                            com.liferay.portal.kernel.exception.SystemException {
105                    getService().deleteEvent(eventId);
106            }
107    
108            public static java.io.File exportEvent(long eventId)
109                    throws com.liferay.portal.kernel.exception.PortalException,
110                            com.liferay.portal.kernel.exception.SystemException {
111                    return getService().exportEvent(eventId);
112            }
113    
114            public static java.io.File exportGroupEvents(long groupId,
115                    java.lang.String fileName)
116                    throws com.liferay.portal.kernel.exception.PortalException,
117                            com.liferay.portal.kernel.exception.SystemException {
118                    return getService().exportGroupEvents(groupId, fileName);
119            }
120    
121            public static com.liferay.portlet.calendar.model.CalEvent getEvent(
122                    long eventId)
123                    throws com.liferay.portal.kernel.exception.PortalException,
124                            com.liferay.portal.kernel.exception.SystemException {
125                    return getService().getEvent(eventId);
126            }
127    
128            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
129                    long groupId, java.util.Calendar cal, java.lang.String type)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException {
132                    return getService().getEvents(groupId, cal, type);
133            }
134    
135            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
136                    long groupId, java.util.Calendar cal, java.lang.String[] types)
137                    throws com.liferay.portal.kernel.exception.PortalException,
138                            com.liferay.portal.kernel.exception.SystemException {
139                    return getService().getEvents(groupId, cal, types);
140            }
141    
142            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
143                    long groupId, java.lang.String type, int start, int end)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return getService().getEvents(groupId, type, start, end);
146            }
147    
148            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
149                    long groupId, java.lang.String[] types, int start, int end)
150                    throws com.liferay.portal.kernel.exception.SystemException {
151                    return getService().getEvents(groupId, types, start, end);
152            }
153    
154            public static int getEventsCount(long groupId, java.lang.String type)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return getService().getEventsCount(groupId, type);
157            }
158    
159            public static int getEventsCount(long groupId, java.lang.String[] types)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getService().getEventsCount(groupId, types);
162            }
163    
164            public static boolean hasEvents(long groupId, java.util.Calendar cal)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    return getService().hasEvents(groupId, cal);
168            }
169    
170            public static boolean hasEvents(long groupId, java.util.Calendar cal,
171                    java.lang.String type)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException {
174                    return getService().hasEvents(groupId, cal, type);
175            }
176    
177            public static boolean hasEvents(long groupId, java.util.Calendar cal,
178                    java.lang.String[] types)
179                    throws com.liferay.portal.kernel.exception.PortalException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return getService().hasEvents(groupId, cal, types);
182            }
183    
184            public static void importICal4j(long groupId,
185                    java.io.InputStream inputStream)
186                    throws com.liferay.portal.kernel.exception.PortalException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    getService().importICal4j(groupId, inputStream);
189            }
190    
191            public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
192                    long eventId, java.lang.String title, java.lang.String description,
193                    java.lang.String location, int startDateMonth, int startDateDay,
194                    int startDateYear, int startDateHour, int startDateMinute,
195                    int durationHour, int durationMinute, boolean allDay,
196                    boolean timeZoneSensitive, java.lang.String type, boolean repeating,
197                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
198                    int firstReminder, int secondReminder,
199                    com.liferay.portal.service.ServiceContext serviceContext)
200                    throws com.liferay.portal.kernel.exception.PortalException,
201                            com.liferay.portal.kernel.exception.SystemException {
202                    return getService()
203                                       .updateEvent(eventId, title, description, location,
204                            startDateMonth, startDateDay, startDateYear, startDateHour,
205                            startDateMinute, durationHour, durationMinute, allDay,
206                            timeZoneSensitive, type, repeating, recurrence, remindBy,
207                            firstReminder, secondReminder, serviceContext);
208            }
209    
210            /**
211            * @deprecated {@link #updateEvent(long, String, String, String, int, int,
212            int, int, int, int, int, boolean, boolean, String, boolean,
213            TZSRecurrence, int, int, int, ServiceContext)}
214            */
215            public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
216                    long eventId, java.lang.String title, java.lang.String description,
217                    java.lang.String location, int startDateMonth, int startDateDay,
218                    int startDateYear, int startDateHour, int startDateMinute,
219                    int endDateMonth, int endDateDay, int endDateYear, int durationHour,
220                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
221                    java.lang.String type, boolean repeating,
222                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
223                    int firstReminder, int secondReminder,
224                    com.liferay.portal.service.ServiceContext serviceContext)
225                    throws com.liferay.portal.kernel.exception.PortalException,
226                            com.liferay.portal.kernel.exception.SystemException {
227                    return getService()
228                                       .updateEvent(eventId, title, description, location,
229                            startDateMonth, startDateDay, startDateYear, startDateHour,
230                            startDateMinute, endDateMonth, endDateDay, endDateYear,
231                            durationHour, durationMinute, allDay, timeZoneSensitive, type,
232                            repeating, recurrence, remindBy, firstReminder, secondReminder,
233                            serviceContext);
234            }
235    
236            public static CalEventService getService() {
237                    if (_service == null) {
238                            _service = (CalEventService)PortalBeanLocatorUtil.locate(CalEventService.class.getName());
239    
240                            ReferenceRegistry.registerReference(CalEventServiceUtil.class,
241                                    "_service");
242                    }
243    
244                    return _service;
245            }
246    
247            /**
248             * @deprecated
249             */
250            public void setService(CalEventService service) {
251            }
252    
253            private static CalEventService _service;
254    }