001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 endDateMonth, int endDateDay, int endDateYear, int durationHour,
063                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
064                    java.lang.String type, boolean repeating,
065                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
066                    int firstReminder, int secondReminder,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    return getService()
071                                       .addEvent(title, description, location, startDateMonth,
072                            startDateDay, startDateYear, startDateHour, startDateMinute,
073                            endDateMonth, endDateDay, endDateYear, durationHour,
074                            durationMinute, allDay, timeZoneSensitive, type, repeating,
075                            recurrence, remindBy, firstReminder, secondReminder, serviceContext);
076            }
077    
078            public static void deleteEvent(long eventId)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException {
081                    getService().deleteEvent(eventId);
082            }
083    
084            public static java.io.File exportEvent(long eventId)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    return getService().exportEvent(eventId);
088            }
089    
090            public static java.io.File exportGroupEvents(long groupId,
091                    java.lang.String fileName)
092                    throws com.liferay.portal.kernel.exception.PortalException,
093                            com.liferay.portal.kernel.exception.SystemException {
094                    return getService().exportGroupEvents(groupId, fileName);
095            }
096    
097            public static com.liferay.portlet.calendar.model.CalEvent getEvent(
098                    long eventId)
099                    throws com.liferay.portal.kernel.exception.PortalException,
100                            com.liferay.portal.kernel.exception.SystemException {
101                    return getService().getEvent(eventId);
102            }
103    
104            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
105                    long groupId, java.util.Calendar cal, java.lang.String type)
106                    throws com.liferay.portal.kernel.exception.PortalException,
107                            com.liferay.portal.kernel.exception.SystemException {
108                    return getService().getEvents(groupId, cal, type);
109            }
110    
111            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
112                    long groupId, java.util.Calendar cal, java.lang.String[] types)
113                    throws com.liferay.portal.kernel.exception.PortalException,
114                            com.liferay.portal.kernel.exception.SystemException {
115                    return getService().getEvents(groupId, cal, types);
116            }
117    
118            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
119                    long groupId, java.lang.String type, int start, int end)
120                    throws com.liferay.portal.kernel.exception.SystemException {
121                    return getService().getEvents(groupId, type, start, end);
122            }
123    
124            public static java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
125                    long groupId, java.lang.String[] types, int start, int end)
126                    throws com.liferay.portal.kernel.exception.SystemException {
127                    return getService().getEvents(groupId, types, start, end);
128            }
129    
130            public static int getEventsCount(long groupId, java.lang.String type)
131                    throws com.liferay.portal.kernel.exception.SystemException {
132                    return getService().getEventsCount(groupId, type);
133            }
134    
135            public static int getEventsCount(long groupId, java.lang.String[] types)
136                    throws com.liferay.portal.kernel.exception.SystemException {
137                    return getService().getEventsCount(groupId, types);
138            }
139    
140            public static boolean hasEvents(long groupId, java.util.Calendar cal)
141                    throws com.liferay.portal.kernel.exception.PortalException,
142                            com.liferay.portal.kernel.exception.SystemException {
143                    return getService().hasEvents(groupId, cal);
144            }
145    
146            public static boolean hasEvents(long groupId, java.util.Calendar cal,
147                    java.lang.String type)
148                    throws com.liferay.portal.kernel.exception.PortalException,
149                            com.liferay.portal.kernel.exception.SystemException {
150                    return getService().hasEvents(groupId, cal, type);
151            }
152    
153            public static boolean hasEvents(long groupId, java.util.Calendar cal,
154                    java.lang.String[] types)
155                    throws com.liferay.portal.kernel.exception.PortalException,
156                            com.liferay.portal.kernel.exception.SystemException {
157                    return getService().hasEvents(groupId, cal, types);
158            }
159    
160            public static void importICal4j(long groupId,
161                    java.io.InputStream inputStream)
162                    throws com.liferay.portal.kernel.exception.PortalException,
163                            com.liferay.portal.kernel.exception.SystemException {
164                    getService().importICal4j(groupId, inputStream);
165            }
166    
167            public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
168                    long eventId, java.lang.String title, java.lang.String description,
169                    java.lang.String location, int startDateMonth, int startDateDay,
170                    int startDateYear, int startDateHour, int startDateMinute,
171                    int endDateMonth, int endDateDay, int endDateYear, int durationHour,
172                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
173                    java.lang.String type, boolean repeating,
174                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
175                    int firstReminder, int secondReminder,
176                    com.liferay.portal.service.ServiceContext serviceContext)
177                    throws com.liferay.portal.kernel.exception.PortalException,
178                            com.liferay.portal.kernel.exception.SystemException {
179                    return getService()
180                                       .updateEvent(eventId, title, description, location,
181                            startDateMonth, startDateDay, startDateYear, startDateHour,
182                            startDateMinute, endDateMonth, endDateDay, endDateYear,
183                            durationHour, durationMinute, allDay, timeZoneSensitive, type,
184                            repeating, recurrence, remindBy, firstReminder, secondReminder,
185                            serviceContext);
186            }
187    
188            public static CalEventService getService() {
189                    if (_service == null) {
190                            _service = (CalEventService)PortalBeanLocatorUtil.locate(CalEventService.class.getName());
191    
192                            ReferenceRegistry.registerReference(CalEventServiceUtil.class,
193                                    "_service");
194                    }
195    
196                    return _service;
197            }
198    
199            /**
200             * @deprecated
201             */
202            public void setService(CalEventService service) {
203            }
204    
205            private static CalEventService _service;
206    }