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 com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.PortalException;
092    
093            public void addEventResources(
094                    com.liferay.portlet.calendar.model.CalEvent event,
095                    boolean addGroupPermissions, boolean addGuestPermissions)
096                    throws com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.PortalException;
102    
103            public void addEventResources(long eventId, boolean addGroupPermissions,
104                    boolean addGuestPermissions)
105                    throws com.liferay.portal.kernel.exception.PortalException;
106    
107            public void addEventResources(long eventId,
108                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
109                    throws com.liferay.portal.kernel.exception.PortalException;
110    
111            public void checkEvents();
112    
113            /**
114            * Creates a new cal event with the primary key. Does not add the cal event to the database.
115            *
116            * @param eventId the primary key for the new cal event
117            * @return the new cal event
118            */
119            public com.liferay.portlet.calendar.model.CalEvent createCalEvent(
120                    long eventId);
121    
122            /**
123            * Deletes the cal event from the database. Also notifies the appropriate model listeners.
124            *
125            * @param calEvent the cal event
126            * @return the cal event that was removed
127            */
128            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
129            public com.liferay.portlet.calendar.model.CalEvent deleteCalEvent(
130                    com.liferay.portlet.calendar.model.CalEvent calEvent);
131    
132            /**
133            * Deletes the cal event with the primary key from the database. Also notifies the appropriate model listeners.
134            *
135            * @param eventId the primary key of the cal event
136            * @return the cal event that was removed
137            * @throws PortalException if a cal event with the primary key could not be found
138            */
139            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
140            public com.liferay.portlet.calendar.model.CalEvent deleteCalEvent(
141                    long eventId)
142                    throws com.liferay.portal.kernel.exception.PortalException;
143    
144            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
145            public com.liferay.portlet.calendar.model.CalEvent deleteEvent(
146                    com.liferay.portlet.calendar.model.CalEvent event)
147                    throws com.liferay.portal.kernel.exception.PortalException;
148    
149            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
150            public com.liferay.portlet.calendar.model.CalEvent deleteEvent(long eventId)
151                    throws com.liferay.portal.kernel.exception.PortalException;
152    
153            public void deleteEvents(long groupId)
154                    throws com.liferay.portal.kernel.exception.PortalException;
155    
156            /**
157            * @throws PortalException
158            */
159            @Override
160            public com.liferay.portal.model.PersistedModel deletePersistedModel(
161                    com.liferay.portal.model.PersistedModel persistedModel)
162                    throws com.liferay.portal.kernel.exception.PortalException;
163    
164            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
165    
166            /**
167            * Performs a dynamic query on the database and returns the matching rows.
168            *
169            * @param dynamicQuery the dynamic query
170            * @return the matching rows
171            */
172            public <T> java.util.List<T> dynamicQuery(
173                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
174    
175            /**
176            * Performs a dynamic query on the database and returns a range of the matching rows.
177            *
178            * <p>
179            * 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.
180            * </p>
181            *
182            * @param dynamicQuery the dynamic query
183            * @param start the lower bound of the range of model instances
184            * @param end the upper bound of the range of model instances (not inclusive)
185            * @return the range of matching rows
186            */
187            public <T> java.util.List<T> dynamicQuery(
188                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
189                    int end);
190    
191            /**
192            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
193            *
194            * <p>
195            * 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.
196            * </p>
197            *
198            * @param dynamicQuery the dynamic query
199            * @param start the lower bound of the range of model instances
200            * @param end the upper bound of the range of model instances (not inclusive)
201            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
202            * @return the ordered range of matching rows
203            */
204            public <T> java.util.List<T> dynamicQuery(
205                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
206                    int end,
207                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
208    
209            /**
210            * Returns the number of rows matching the dynamic query.
211            *
212            * @param dynamicQuery the dynamic query
213            * @return the number of rows matching the dynamic query
214            */
215            public long dynamicQueryCount(
216                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
217    
218            /**
219            * Returns the number of rows matching the dynamic query.
220            *
221            * @param dynamicQuery the dynamic query
222            * @param projection the projection to apply to the query
223            * @return the number of rows matching the dynamic query
224            */
225            public long dynamicQueryCount(
226                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
227                    com.liferay.portal.kernel.dao.orm.Projection projection);
228    
229            public java.io.File exportEvent(long userId, long eventId)
230                    throws com.liferay.portal.kernel.exception.PortalException;
231    
232            public java.io.File exportEvents(long userId,
233                    java.util.List<com.liferay.portlet.calendar.model.CalEvent> events,
234                    java.lang.String fileName)
235                    throws com.liferay.portal.kernel.exception.PortalException;
236    
237            public java.io.File exportGroupEvents(long userId, long groupId,
238                    java.lang.String fileName)
239                    throws com.liferay.portal.kernel.exception.PortalException;
240    
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public com.liferay.portlet.calendar.model.CalEvent fetchCalEvent(
243                    long eventId);
244    
245            /**
246            * Returns the cal event matching the UUID and group.
247            *
248            * @param uuid the cal event's UUID
249            * @param groupId the primary key of the group
250            * @return the matching cal event, or <code>null</code> if a matching cal event could not be found
251            */
252            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253            public com.liferay.portlet.calendar.model.CalEvent fetchCalEventByUuidAndGroupId(
254                    java.lang.String uuid, long groupId);
255    
256            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
258    
259            /**
260            * Returns the Spring bean ID for this bean.
261            *
262            * @return the Spring bean ID for this bean
263            */
264            public java.lang.String getBeanIdentifier();
265    
266            /**
267            * Returns the cal event with the primary key.
268            *
269            * @param eventId the primary key of the cal event
270            * @return the cal event
271            * @throws PortalException if a cal event with the primary key could not be found
272            */
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public com.liferay.portlet.calendar.model.CalEvent getCalEvent(long eventId)
275                    throws com.liferay.portal.kernel.exception.PortalException;
276    
277            /**
278            * Returns the cal event matching the UUID and group.
279            *
280            * @param uuid the cal event's UUID
281            * @param groupId the primary key of the group
282            * @return the matching cal event
283            * @throws PortalException if a matching cal event could not be found
284            */
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public com.liferay.portlet.calendar.model.CalEvent getCalEventByUuidAndGroupId(
287                    java.lang.String uuid, long groupId)
288                    throws com.liferay.portal.kernel.exception.PortalException;
289    
290            /**
291            * Returns a range of all the cal events.
292            *
293            * <p>
294            * 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.
295            * </p>
296            *
297            * @param start the lower bound of the range of cal events
298            * @param end the upper bound of the range of cal events (not inclusive)
299            * @return the range of cal events
300            */
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
303                    int start, int end);
304    
305            /**
306            * Returns all the cal events matching the UUID and company.
307            *
308            * @param uuid the UUID of the cal events
309            * @param companyId the primary key of the company
310            * @return the matching cal events, or an empty list if no matches were found
311            */
312            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEventsByUuidAndCompanyId(
314                    java.lang.String uuid, long companyId);
315    
316            /**
317            * Returns a range of cal events matching the UUID and company.
318            *
319            * @param uuid the UUID of the cal events
320            * @param companyId the primary key of the company
321            * @param start the lower bound of the range of cal events
322            * @param end the upper bound of the range of cal events (not inclusive)
323            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
324            * @return the range of matching cal events, or an empty list if no matches were found
325            */
326            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
327            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEventsByUuidAndCompanyId(
328                    java.lang.String uuid, long companyId, int start, int end,
329                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.calendar.model.CalEvent> orderByComparator);
330    
331            /**
332            * Returns the number of cal events.
333            *
334            * @return the number of cal events
335            */
336            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
337            public int getCalEventsCount();
338    
339            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(
341                    long companyId, int start, int end);
342    
343            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344            public int getCompanyEventsCount(long companyId);
345    
346            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
347            public com.liferay.portlet.calendar.model.CalEvent getEvent(long eventId)
348                    throws com.liferay.portal.kernel.exception.PortalException;
349    
350            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
351            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
352                    long groupId, java.util.Calendar cal);
353    
354            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
355            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
356                    long groupId, java.util.Calendar cal, java.lang.String type);
357    
358            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
359            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
360                    long groupId, java.util.Calendar cal, java.lang.String[] types);
361    
362            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
363            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
364                    long groupId, java.lang.String type, int start, int end);
365    
366            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
367            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
368                    long groupId, java.lang.String[] types, int start, int end);
369    
370            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
371            public int getEventsCount(long groupId, java.lang.String type);
372    
373            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
374            public int getEventsCount(long groupId, java.lang.String[] types);
375    
376            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
377            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
378                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
379    
380            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
381            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents();
382    
383            @Override
384            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
385            public com.liferay.portal.model.PersistedModel getPersistedModel(
386                    java.io.Serializable primaryKeyObj)
387                    throws com.liferay.portal.kernel.exception.PortalException;
388    
389            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
390            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
391                    long groupId);
392    
393            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
394            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
395                    long groupId, java.util.Calendar cal, java.lang.String[] types);
396    
397            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
398            public boolean hasEvents(long groupId, java.util.Calendar cal);
399    
400            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
401            public boolean hasEvents(long groupId, java.util.Calendar cal,
402                    java.lang.String type);
403    
404            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
405            public boolean hasEvents(long groupId, java.util.Calendar cal,
406                    java.lang.String[] types);
407    
408            public void importICal4j(long userId, long groupId,
409                    java.io.InputStream inputStream)
410                    throws com.liferay.portal.kernel.exception.PortalException;
411    
412            /**
413            * Sets the Spring bean ID for this bean.
414            *
415            * @param beanIdentifier the Spring bean ID for this bean
416            */
417            public void setBeanIdentifier(java.lang.String beanIdentifier);
418    
419            public void updateAsset(long userId,
420                    com.liferay.portlet.calendar.model.CalEvent event,
421                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
422                    long[] assetLinkEntryIds)
423                    throws com.liferay.portal.kernel.exception.PortalException;
424    
425            /**
426            * Updates the cal event in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
427            *
428            * @param calEvent the cal event
429            * @return the cal event that was updated
430            */
431            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
432            public com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
433                    com.liferay.portlet.calendar.model.CalEvent calEvent);
434    
435            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
436            public com.liferay.portlet.calendar.model.CalEvent updateEvent(
437                    long userId, long eventId, java.lang.String title,
438                    java.lang.String description, java.lang.String location,
439                    int startDateMonth, int startDateDay, int startDateYear,
440                    int startDateHour, int startDateMinute, int durationHour,
441                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
442                    java.lang.String type, boolean repeating,
443                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
444                    int firstReminder, int secondReminder,
445                    com.liferay.portal.service.ServiceContext serviceContext)
446                    throws com.liferay.portal.kernel.exception.PortalException;
447    
448            /**
449            * @deprecated As of 6.2.0, replaced by {@link #updateEvent(long, long,
450            String, String, String, int, int, int, int, int, int, int,
451            boolean, boolean, String, boolean, TZSRecurrence, int, int,
452            int, ServiceContext)}
453            */
454            @java.lang.Deprecated
455            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
456            public com.liferay.portlet.calendar.model.CalEvent updateEvent(
457                    long userId, long eventId, java.lang.String title,
458                    java.lang.String description, java.lang.String location,
459                    int startDateMonth, int startDateDay, int startDateYear,
460                    int startDateHour, int startDateMinute, int endDateMonth,
461                    int endDateDay, int endDateYear, int durationHour, int durationMinute,
462                    boolean allDay, boolean timeZoneSensitive, java.lang.String type,
463                    boolean repeating,
464                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
465                    int firstReminder, int secondReminder,
466                    com.liferay.portal.service.ServiceContext serviceContext)
467                    throws com.liferay.portal.kernel.exception.PortalException;
468    }