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