001    /**
002     * Copyright (c) 2000-2012 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 exportEvents(
115                    java.util.List<com.liferay.portlet.calendar.model.CalEvent> events,
116                    java.lang.String fileName)
117                    throws com.liferay.portal.kernel.exception.PortalException,
118                            com.liferay.portal.kernel.exception.SystemException {
119                    return getService().exportEvents(events, fileName);
120            }
121    
122            public static java.io.File exportGroupEvents(long groupId,
123                    java.lang.String fileName)
124                    throws com.liferay.portal.kernel.exception.PortalException,
125                            com.liferay.portal.kernel.exception.SystemException {
126                    return getService().exportGroupEvents(groupId, fileName);
127            }
128    
129            public static com.liferay.portlet.calendar.model.CalEvent getEvent(
130                    long eventId)
131                    throws com.liferay.portal.kernel.exception.PortalException,
132                            com.liferay.portal.kernel.exception.SystemException {
133                    return getService().getEvent(eventId);
134            }
135    
136            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
137                    long groupId, java.util.Calendar cal, java.lang.String type)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    return getService().getEvents(groupId, cal, type);
141            }
142    
143            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
144                    long groupId, java.util.Calendar cal, java.lang.String[] types)
145                    throws com.liferay.portal.kernel.exception.PortalException,
146                            com.liferay.portal.kernel.exception.SystemException {
147                    return getService().getEvents(groupId, cal, types);
148            }
149    
150            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
151                    long groupId, java.lang.String type, int start, int end)
152                    throws com.liferay.portal.kernel.exception.SystemException {
153                    return getService().getEvents(groupId, type, start, end);
154            }
155    
156            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
157                    long groupId, java.lang.String[] types, int start, int end)
158                    throws com.liferay.portal.kernel.exception.SystemException {
159                    return getService().getEvents(groupId, types, start, end);
160            }
161    
162            public static int getEventsCount(long groupId, java.lang.String type)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getService().getEventsCount(groupId, type);
165            }
166    
167            public static int getEventsCount(long groupId, java.lang.String[] types)
168                    throws com.liferay.portal.kernel.exception.SystemException {
169                    return getService().getEventsCount(groupId, types);
170            }
171    
172            public static boolean hasEvents(long groupId, java.util.Calendar cal)
173                    throws com.liferay.portal.kernel.exception.PortalException,
174                            com.liferay.portal.kernel.exception.SystemException {
175                    return getService().hasEvents(groupId, cal);
176            }
177    
178            public static boolean hasEvents(long groupId, java.util.Calendar cal,
179                    java.lang.String type)
180                    throws com.liferay.portal.kernel.exception.PortalException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return getService().hasEvents(groupId, cal, type);
183            }
184    
185            public static boolean hasEvents(long groupId, java.util.Calendar cal,
186                    java.lang.String[] types)
187                    throws com.liferay.portal.kernel.exception.PortalException,
188                            com.liferay.portal.kernel.exception.SystemException {
189                    return getService().hasEvents(groupId, cal, types);
190            }
191    
192            public static void importICal4j(long groupId,
193                    java.io.InputStream inputStream)
194                    throws com.liferay.portal.kernel.exception.PortalException,
195                            com.liferay.portal.kernel.exception.SystemException {
196                    getService().importICal4j(groupId, inputStream);
197            }
198    
199            public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
200                    long eventId, java.lang.String title, java.lang.String description,
201                    java.lang.String location, int startDateMonth, int startDateDay,
202                    int startDateYear, int startDateHour, int startDateMinute,
203                    int durationHour, int durationMinute, boolean allDay,
204                    boolean timeZoneSensitive, java.lang.String type, boolean repeating,
205                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
206                    int firstReminder, int secondReminder,
207                    com.liferay.portal.service.ServiceContext serviceContext)
208                    throws com.liferay.portal.kernel.exception.PortalException,
209                            com.liferay.portal.kernel.exception.SystemException {
210                    return getService()
211                                       .updateEvent(eventId, title, description, location,
212                            startDateMonth, startDateDay, startDateYear, startDateHour,
213                            startDateMinute, durationHour, durationMinute, allDay,
214                            timeZoneSensitive, type, repeating, recurrence, remindBy,
215                            firstReminder, secondReminder, serviceContext);
216            }
217    
218            /**
219            * @deprecated {@link #updateEvent(long, String, String, String, int, int,
220            int, int, int, int, int, boolean, boolean, String, boolean,
221            TZSRecurrence, int, int, int, ServiceContext)}
222            */
223            public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
224                    long eventId, java.lang.String title, java.lang.String description,
225                    java.lang.String location, int startDateMonth, int startDateDay,
226                    int startDateYear, int startDateHour, int startDateMinute,
227                    int endDateMonth, int endDateDay, int endDateYear, int durationHour,
228                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
229                    java.lang.String type, boolean repeating,
230                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
231                    int firstReminder, int secondReminder,
232                    com.liferay.portal.service.ServiceContext serviceContext)
233                    throws com.liferay.portal.kernel.exception.PortalException,
234                            com.liferay.portal.kernel.exception.SystemException {
235                    return getService()
236                                       .updateEvent(eventId, title, description, location,
237                            startDateMonth, startDateDay, startDateYear, startDateHour,
238                            startDateMinute, endDateMonth, endDateDay, endDateYear,
239                            durationHour, durationMinute, allDay, timeZoneSensitive, type,
240                            repeating, recurrence, remindBy, firstReminder, secondReminder,
241                            serviceContext);
242            }
243    
244            public static CalEventService getService() {
245                    if (_service == null) {
246                            _service = (CalEventService)PortalBeanLocatorUtil.locate(CalEventService.class.getName());
247    
248                            ReferenceRegistry.registerReference(CalEventServiceUtil.class,
249                                    "_service");
250                    }
251    
252                    return _service;
253            }
254    
255            /**
256             * @deprecated
257             */
258            public void setService(CalEventService service) {
259            }
260    
261            private static CalEventService _service;
262    }