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 that match the dynamic query.
211            *
212            * @param dynamicQuery the dynamic query
213            * @return the number of rows that match 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 that match 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 that match 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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEventsByUuidAndCompanyId(
307                    java.lang.String uuid, long companyId);
308    
309            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEventsByUuidAndCompanyId(
311                    java.lang.String uuid, long companyId, int start, int end,
312                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.calendar.model.CalEvent> orderByComparator);
313    
314            /**
315            * Returns the number of cal events.
316            *
317            * @return the number of cal events
318            */
319            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
320            public int getCalEventsCount();
321    
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(
324                    long companyId, int start, int end);
325    
326            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
327            public int getCompanyEventsCount(long companyId);
328    
329            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330            public com.liferay.portlet.calendar.model.CalEvent getEvent(long eventId)
331                    throws com.liferay.portal.kernel.exception.PortalException;
332    
333            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
335                    long groupId, java.util.Calendar cal);
336    
337            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
339                    long groupId, java.util.Calendar cal, java.lang.String type);
340    
341            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
342            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
343                    long groupId, java.util.Calendar cal, java.lang.String[] types);
344    
345            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
346            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
347                    long groupId, java.lang.String type, int start, int end);
348    
349            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
350            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
351                    long groupId, java.lang.String[] types, int start, int end);
352    
353            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
354            public int getEventsCount(long groupId, java.lang.String type);
355    
356            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
357            public int getEventsCount(long groupId, java.lang.String[] types);
358    
359            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
360            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
361                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
362    
363            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
364            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents();
365    
366            @Override
367            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
368            public com.liferay.portal.model.PersistedModel getPersistedModel(
369                    java.io.Serializable primaryKeyObj)
370                    throws com.liferay.portal.kernel.exception.PortalException;
371    
372            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
373            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
374                    long groupId);
375    
376            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
377            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(
378                    long groupId, java.util.Calendar cal, java.lang.String[] types);
379    
380            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
381            public boolean hasEvents(long groupId, java.util.Calendar cal);
382    
383            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
384            public boolean hasEvents(long groupId, java.util.Calendar cal,
385                    java.lang.String type);
386    
387            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
388            public boolean hasEvents(long groupId, java.util.Calendar cal,
389                    java.lang.String[] types);
390    
391            public void importICal4j(long userId, long groupId,
392                    java.io.InputStream inputStream)
393                    throws com.liferay.portal.kernel.exception.PortalException;
394    
395            /**
396            * Sets the Spring bean ID for this bean.
397            *
398            * @param beanIdentifier the Spring bean ID for this bean
399            */
400            public void setBeanIdentifier(java.lang.String beanIdentifier);
401    
402            public void updateAsset(long userId,
403                    com.liferay.portlet.calendar.model.CalEvent event,
404                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
405                    long[] assetLinkEntryIds)
406                    throws com.liferay.portal.kernel.exception.PortalException;
407    
408            /**
409            * Updates the cal event in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
410            *
411            * @param calEvent the cal event
412            * @return the cal event that was updated
413            */
414            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
415            public com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
416                    com.liferay.portlet.calendar.model.CalEvent calEvent);
417    
418            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
419            public com.liferay.portlet.calendar.model.CalEvent updateEvent(
420                    long userId, long eventId, java.lang.String title,
421                    java.lang.String description, java.lang.String location,
422                    int startDateMonth, int startDateDay, int startDateYear,
423                    int startDateHour, int startDateMinute, int durationHour,
424                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
425                    java.lang.String type, boolean repeating,
426                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
427                    int firstReminder, int secondReminder,
428                    com.liferay.portal.service.ServiceContext serviceContext)
429                    throws com.liferay.portal.kernel.exception.PortalException;
430    
431            /**
432            * @deprecated As of 6.2.0, replaced by {@link #updateEvent(long, long,
433            String, String, String, int, int, int, int, int, int, int,
434            boolean, boolean, String, boolean, TZSRecurrence, int, int,
435            int, ServiceContext)}
436            */
437            @java.lang.Deprecated
438            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
439            public com.liferay.portlet.calendar.model.CalEvent updateEvent(
440                    long userId, long eventId, java.lang.String title,
441                    java.lang.String description, java.lang.String location,
442                    int startDateMonth, int startDateDay, int startDateYear,
443                    int startDateHour, int startDateMinute, int endDateMonth,
444                    int endDateDay, int endDateYear, int durationHour, int durationMinute,
445                    boolean allDay, boolean timeZoneSensitive, java.lang.String type,
446                    boolean repeating,
447                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
448                    int firstReminder, int secondReminder,
449                    com.liferay.portal.service.ServiceContext serviceContext)
450                    throws com.liferay.portal.kernel.exception.PortalException;
451    }