001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.service.BaseLocalService;
026    import com.liferay.portal.service.PersistedModelLocalService;
027    
028    /**
029     * Provides the local service interface for CalEvent. Methods of this
030     * service will not have security checks based on the propagated JAAS
031     * credentials because this service can only be accessed from within the same
032     * VM.
033     *
034     * @author Brian Wing Shun Chan
035     * @see CalEventLocalServiceUtil
036     * @see com.liferay.portlet.calendar.service.base.CalEventLocalServiceBaseImpl
037     * @see com.liferay.portlet.calendar.service.impl.CalEventLocalServiceImpl
038     * @generated
039     */
040    @ProviderType
041    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
042            PortalException.class, SystemException.class})
043    public interface CalEventLocalService extends BaseLocalService,
044            PersistedModelLocalService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * Never modify or reference this interface directly. Always use {@link CalEventLocalServiceUtil} to access the cal event local service. Add custom service methods to {@link com.liferay.portlet.calendar.service.impl.CalEventLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
049             */
050    
051            /**
052            * Adds the cal event to the database. Also notifies the appropriate model listeners.
053            *
054            * @param calEvent the cal event
055            * @return the cal event that was added
056            */
057            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
058            public com.liferay.portlet.calendar.model.CalEvent addCalEvent(
059                    com.liferay.portlet.calendar.model.CalEvent calEvent);
060    
061            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
062            public com.liferay.portlet.calendar.model.CalEvent addEvent(long userId,
063                    java.lang.String title, java.lang.String description,
064                    java.lang.String location, int startDateMonth, int startDateDay,
065                    int startDateYear, int startDateHour, int startDateMinute,
066                    int durationHour, int durationMinute, boolean allDay,
067                    boolean timeZoneSensitive, java.lang.String type, boolean repeating,
068                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
069                    int firstReminder, int secondReminder,
070                    com.liferay.portal.service.ServiceContext serviceContext)
071                    throws PortalException;
072    
073            /**
074            * @deprecated As of 6.2.0, replaced by {@link #addEvent(long, String,
075            String, String, int, int, int, int, int, int, int, boolean,
076            boolean, String, boolean, TZSRecurrence, int, int, int,
077            ServiceContext)}
078            */
079            @java.lang.Deprecated
080            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
081            public com.liferay.portlet.calendar.model.CalEvent addEvent(long userId,
082                    java.lang.String title, java.lang.String description,
083                    java.lang.String location, int startDateMonth, int startDateDay,
084                    int startDateYear, int startDateHour, int startDateMinute,
085                    int endDateMonth, int endDateDay, int endDateYear, int durationHour,
086                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
087                    java.lang.String type, boolean repeating,
088                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
089                    int firstReminder, int secondReminder,
090                    com.liferay.portal.service.ServiceContext serviceContext)
091                    throws PortalException;
092    
093            public void addEventResources(
094                    com.liferay.portlet.calendar.model.CalEvent event,
095                    boolean addGroupPermissions, boolean addGuestPermissions)
096                    throws PortalException;
097    
098            public void addEventResources(
099                    com.liferay.portlet.calendar.model.CalEvent event,
100                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
101                    throws PortalException;
102    
103            public void addEventResources(long eventId, boolean addGroupPermissions,
104                    boolean addGuestPermissions) throws PortalException;
105    
106            public void addEventResources(long eventId,
107                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
108                    throws PortalException;
109    
110            public void checkEvents();
111    
112            /**
113            * Creates a new cal event with the primary key. Does not add the cal event to the database.
114            *
115            * @param eventId the primary key for the new cal event
116            * @return the new cal event
117            */
118            public com.liferay.portlet.calendar.model.CalEvent createCalEvent(
119                    long eventId);
120    
121            /**
122            * Deletes the cal event from the database. Also notifies the appropriate model listeners.
123            *
124            * @param calEvent the cal event
125            * @return the cal event that was removed
126            */
127            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
128            public com.liferay.portlet.calendar.model.CalEvent deleteCalEvent(
129                    com.liferay.portlet.calendar.model.CalEvent calEvent);
130    
131            /**
132            * Deletes the cal event with the primary key from the database. Also notifies the appropriate model listeners.
133            *
134            * @param eventId the primary key of the cal event
135            * @return the cal event that was removed
136            * @throws PortalException if a cal event with the primary key could not be found
137            */
138            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
139            public com.liferay.portlet.calendar.model.CalEvent deleteCalEvent(
140                    long eventId) throws PortalException;
141    
142            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
143            public com.liferay.portlet.calendar.model.CalEvent deleteEvent(
144                    com.liferay.portlet.calendar.model.CalEvent event)
145                    throws PortalException;
146    
147            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
148            public com.liferay.portlet.calendar.model.CalEvent deleteEvent(long eventId)
149                    throws PortalException;
150    
151            public void deleteEvents(long groupId) throws PortalException;
152    
153            /**
154            * @throws PortalException
155            */
156            @Override
157            public com.liferay.portal.model.PersistedModel deletePersistedModel(
158                    com.liferay.portal.model.PersistedModel persistedModel)
159                    throws PortalException;
160    
161            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
162    
163            /**
164            * Performs a dynamic query on the database and returns the matching rows.
165            *
166            * @param dynamicQuery the dynamic query
167            * @return the matching rows
168            */
169            public <T> java.util.List<T> dynamicQuery(
170                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
171    
172            /**
173            * Performs a dynamic query on the database and returns a range of the matching rows.
174            *
175            * <p>
176            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.calendar.model.impl.CalEventModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
177            * </p>
178            *
179            * @param dynamicQuery the dynamic query
180            * @param start the lower bound of the range of model instances
181            * @param end the upper bound of the range of model instances (not inclusive)
182            * @return the range of matching rows
183            */
184            public <T> java.util.List<T> dynamicQuery(
185                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
186                    int end);
187    
188            /**
189            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
190            *
191            * <p>
192            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.calendar.model.impl.CalEventModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
193            * </p>
194            *
195            * @param dynamicQuery the dynamic query
196            * @param start the lower bound of the range of model instances
197            * @param end the upper bound of the range of model instances (not inclusive)
198            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
199            * @return the ordered range of matching rows
200            */
201            public <T> java.util.List<T> dynamicQuery(
202                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
203                    int end,
204                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
205    
206            /**
207            * Returns the number of rows matching the dynamic query.
208            *
209            * @param dynamicQuery the dynamic query
210            * @return the number of rows matching the dynamic query
211            */
212            public long dynamicQueryCount(
213                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
214    
215            /**
216            * Returns the number of rows matching the dynamic query.
217            *
218            * @param dynamicQuery the dynamic query
219            * @param projection the projection to apply to the query
220            * @return the number of rows matching the dynamic query
221            */
222            public long dynamicQueryCount(
223                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
224                    com.liferay.portal.kernel.dao.orm.Projection projection);
225    
226            public java.io.File exportEvent(long userId, long eventId)
227                    throws PortalException;
228    
229            public java.io.File exportEvents(long userId,
230                    java.util.List<com.liferay.portlet.calendar.model.CalEvent> events,
231                    java.lang.String fileName) throws PortalException;
232    
233            public java.io.File exportGroupEvents(long userId, long groupId,
234                    java.lang.String fileName) throws PortalException;
235    
236            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237            public com.liferay.portlet.calendar.model.CalEvent fetchCalEvent(
238                    long eventId);
239    
240            /**
241            * Returns the cal event matching the UUID and group.
242            *
243            * @param uuid the cal event's UUID
244            * @param groupId the primary key of the group
245            * @return the matching cal event, or <code>null</code> if a matching cal event could not be found
246            */
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public com.liferay.portlet.calendar.model.CalEvent fetchCalEventByUuidAndGroupId(
249                    java.lang.String uuid, long groupId);
250    
251            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
253    
254            /**
255            * Returns the Spring bean ID for this bean.
256            *
257            * @return the Spring bean ID for this bean
258            */
259            public java.lang.String getBeanIdentifier();
260    
261            /**
262            * Returns the cal event with the primary key.
263            *
264            * @param eventId the primary key of the cal event
265            * @return the cal event
266            * @throws PortalException if a cal event with the primary key could not be found
267            */
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public com.liferay.portlet.calendar.model.CalEvent getCalEvent(long eventId)
270                    throws PortalException;
271    
272            /**
273            * Returns the cal event matching the UUID and group.
274            *
275            * @param uuid the cal event's UUID
276            * @param groupId the primary key of the group
277            * @return the matching cal event
278            * @throws PortalException if a matching cal event could not be found
279            */
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public com.liferay.portlet.calendar.model.CalEvent getCalEventByUuidAndGroupId(
282                    java.lang.String uuid, long groupId) throws PortalException;
283    
284            /**
285            * Returns a range of all the cal events.
286            *
287            * <p>
288            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.calendar.model.impl.CalEventModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
289            * </p>
290            *
291            * @param start the lower bound of the range of cal events
292            * @param end the upper bound of the range of cal events (not inclusive)
293            * @return the range of cal events
294            */
295            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
297                    int start, int end);
298    
299            /**
300            * Returns all the cal events matching the UUID and company.
301            *
302            * @param uuid the UUID of the cal events
303            * @param companyId the primary key of the company
304            * @return the matching cal events, or an empty list if no matches were found
305            */
306            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEventsByUuidAndCompanyId(
308                    java.lang.String uuid, long companyId);
309    
310            /**
311            * Returns a range of cal events matching the UUID and company.
312            *
313            * @param uuid the UUID of the cal events
314            * @param companyId the primary key of the company
315            * @param start the lower bound of the range of cal events
316            * @param end the upper bound of the range of cal events (not inclusive)
317            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
318            * @return the range of matching cal events, or an empty list if no matches were found
319            */
320            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEventsByUuidAndCompanyId(
322                    java.lang.String uuid, long companyId, int start, int end,
323                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.calendar.model.CalEvent> orderByComparator);
324    
325            /**
326            * Returns the number of cal events.
327            *
328            * @return the number of cal events
329            */
330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
331            public int getCalEventsCount();
332    
333            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(
335                    long companyId, int start, int end);
336    
337            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338            public int getCompanyEventsCount(long companyId);
339    
340            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341            public com.liferay.portlet.calendar.model.CalEvent getEvent(long eventId)
342                    throws PortalException;
343    
344            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
345            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
346                    long groupId, java.util.Calendar cal);
347    
348            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
349            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
350                    long groupId, java.util.Calendar cal, java.lang.String type);
351    
352            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
354                    long groupId, java.util.Calendar cal, java.lang.String[] types);
355    
356            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
357            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
358                    long groupId, java.lang.String type, int start, int end);
359    
360            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
361            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
362                    long groupId, java.lang.String[] types, int start, int end);
363    
364            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
365            public int getEventsCount(long groupId, java.lang.String type);
366    
367            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
368            public int getEventsCount(long groupId, java.lang.String[] types);
369    
370            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
371            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
372                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
373    
374            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
375            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents();
376    
377            @Override
378            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
379            public com.liferay.portal.model.PersistedModel getPersistedModel(
380                    java.io.Serializable primaryKeyObj) throws PortalException;
381    
382            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
383            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
384                    long groupId);
385    
386            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
387            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
388                    long groupId, java.util.Calendar cal, java.lang.String[] types);
389    
390            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
391            public boolean hasEvents(long groupId, java.util.Calendar cal);
392    
393            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
394            public boolean hasEvents(long groupId, java.util.Calendar cal,
395                    java.lang.String type);
396    
397            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
398            public boolean hasEvents(long groupId, java.util.Calendar cal,
399                    java.lang.String[] types);
400    
401            public void importICal4j(long userId, long groupId,
402                    java.io.InputStream inputStream) throws PortalException;
403    
404            /**
405            * Sets the Spring bean ID for this bean.
406            *
407            * @param beanIdentifier the Spring bean ID for this bean
408            */
409            public void setBeanIdentifier(java.lang.String beanIdentifier);
410    
411            public void updateAsset(long userId,
412                    com.liferay.portlet.calendar.model.CalEvent event,
413                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
414                    long[] assetLinkEntryIds) throws PortalException;
415    
416            /**
417            * Updates the cal event in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
418            *
419            * @param calEvent the cal event
420            * @return the cal event that was updated
421            */
422            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
423            public com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
424                    com.liferay.portlet.calendar.model.CalEvent calEvent);
425    
426            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
427            public com.liferay.portlet.calendar.model.CalEvent updateEvent(
428                    long userId, long eventId, java.lang.String title,
429                    java.lang.String description, java.lang.String location,
430                    int startDateMonth, int startDateDay, int startDateYear,
431                    int startDateHour, int startDateMinute, int durationHour,
432                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
433                    java.lang.String type, boolean repeating,
434                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
435                    int firstReminder, int secondReminder,
436                    com.liferay.portal.service.ServiceContext serviceContext)
437                    throws PortalException;
438    
439            /**
440            * @deprecated As of 6.2.0, replaced by {@link #updateEvent(long, long,
441            String, String, String, int, int, int, int, int, int, int,
442            boolean, boolean, String, boolean, TZSRecurrence, int, int,
443            int, ServiceContext)}
444            */
445            @java.lang.Deprecated
446            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
447            public com.liferay.portlet.calendar.model.CalEvent updateEvent(
448                    long userId, long eventId, java.lang.String title,
449                    java.lang.String description, java.lang.String location,
450                    int startDateMonth, int startDateDay, int startDateYear,
451                    int startDateHour, int startDateMinute, int endDateMonth,
452                    int endDateDay, int endDateYear, int durationHour, int durationMinute,
453                    boolean allDay, boolean timeZoneSensitive, java.lang.String type,
454                    boolean repeating,
455                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
456                    int firstReminder, int secondReminder,
457                    com.liferay.portal.service.ServiceContext serviceContext)
458                    throws PortalException;
459    }