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