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 Spring bean ID for this bean.
258            *
259            * @return the Spring bean ID for this bean
260            */
261            public java.lang.String getBeanIdentifier();
262    
263            /**
264            * Returns the cal event with the primary key.
265            *
266            * @param eventId the primary key of the cal event
267            * @return the cal event
268            * @throws PortalException if a cal event with the primary key could not be found
269            */
270            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271            public com.liferay.portlet.calendar.model.CalEvent getCalEvent(long eventId)
272                    throws PortalException;
273    
274            /**
275            * Returns the cal event matching the UUID and group.
276            *
277            * @param uuid the cal event's UUID
278            * @param groupId the primary key of the group
279            * @return the matching cal event
280            * @throws PortalException if a matching cal event could not be found
281            */
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public com.liferay.portlet.calendar.model.CalEvent getCalEventByUuidAndGroupId(
284                    java.lang.String uuid, long groupId) throws PortalException;
285    
286            /**
287            * Returns a range of all the cal events.
288            *
289            * <p>
290            * 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.
291            * </p>
292            *
293            * @param start the lower bound of the range of cal events
294            * @param end the upper bound of the range of cal events (not inclusive)
295            * @return the range of cal events
296            */
297            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEvents(
299                    int start, int end);
300    
301            /**
302            * Returns all the cal events matching the UUID and company.
303            *
304            * @param uuid the UUID of the cal events
305            * @param companyId the primary key of the company
306            * @return the matching cal events, or an empty list if no matches were found
307            */
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEventsByUuidAndCompanyId(
310                    java.lang.String uuid, long companyId);
311    
312            /**
313            * Returns a range of cal events matching the UUID and company.
314            *
315            * @param uuid the UUID of the cal events
316            * @param companyId the primary key of the company
317            * @param start the lower bound of the range of cal events
318            * @param end the upper bound of the range of cal events (not inclusive)
319            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
320            * @return the range of matching cal events, or an empty list if no matches were found
321            */
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCalEventsByUuidAndCompanyId(
324                    java.lang.String uuid, long companyId, int start, int end,
325                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.calendar.model.CalEvent> orderByComparator);
326    
327            /**
328            * Returns the number of cal events.
329            *
330            * @return the number of cal events
331            */
332            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
333            public int getCalEventsCount();
334    
335            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(
337                    long companyId, int start, int end);
338    
339            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340            public int getCompanyEventsCount(long companyId);
341    
342            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
343            public com.liferay.portlet.calendar.model.CalEvent getEvent(long eventId)
344                    throws PortalException;
345    
346            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
347            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
348                    long groupId, java.util.Calendar cal);
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, java.lang.String type);
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[] types);
357    
358            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
359            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(
360                    long groupId, java.lang.String type, int start, int end);
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[] types, int start, int end);
365    
366            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
367            public int getEventsCount(long groupId, java.lang.String type);
368    
369            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
370            public int getEventsCount(long groupId, java.lang.String[] types);
371    
372            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
373            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
374                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
375    
376            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
377            public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents();
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            /**
407            * Sets the Spring bean ID for this bean.
408            *
409            * @param beanIdentifier the Spring bean ID for this bean
410            */
411            public void setBeanIdentifier(java.lang.String beanIdentifier);
412    
413            public void updateAsset(long userId,
414                    com.liferay.portlet.calendar.model.CalEvent event,
415                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
416                    long[] assetLinkEntryIds) throws PortalException;
417    
418            /**
419            * Updates the cal event in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
420            *
421            * @param calEvent the cal event
422            * @return the cal event that was updated
423            */
424            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
425            public com.liferay.portlet.calendar.model.CalEvent updateCalEvent(
426                    com.liferay.portlet.calendar.model.CalEvent calEvent);
427    
428            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
429            public com.liferay.portlet.calendar.model.CalEvent updateEvent(
430                    long userId, long eventId, java.lang.String title,
431                    java.lang.String description, java.lang.String location,
432                    int startDateMonth, int startDateDay, int startDateYear,
433                    int startDateHour, int startDateMinute, int durationHour,
434                    int durationMinute, boolean allDay, boolean timeZoneSensitive,
435                    java.lang.String type, boolean repeating,
436                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
437                    int firstReminder, int secondReminder,
438                    com.liferay.portal.service.ServiceContext serviceContext)
439                    throws PortalException;
440    
441            /**
442            * @deprecated As of 6.2.0, replaced by {@link #updateEvent(long, long,
443            String, String, String, int, int, int, int, int, int, int,
444            boolean, boolean, String, boolean, TZSRecurrence, int, int,
445            int, ServiceContext)}
446            */
447            @java.lang.Deprecated
448            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
449            public com.liferay.portlet.calendar.model.CalEvent updateEvent(
450                    long userId, long eventId, java.lang.String title,
451                    java.lang.String description, java.lang.String location,
452                    int startDateMonth, int startDateDay, int startDateYear,
453                    int startDateHour, int startDateMinute, int endDateMonth,
454                    int endDateDay, int endDateYear, int durationHour, int durationMinute,
455                    boolean allDay, boolean timeZoneSensitive, java.lang.String type,
456                    boolean repeating,
457                    com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
458                    int firstReminder, int secondReminder,
459                    com.liferay.portal.service.ServiceContext serviceContext)
460                    throws PortalException;
461    }