001
014
015 package com.liferay.portlet.calendar.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.cal.TZSRecurrence;
020 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
021 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
022 import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
023 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
024 import com.liferay.portal.kernel.dao.orm.Projection;
025 import com.liferay.portal.kernel.exception.PortalException;
026 import com.liferay.portal.kernel.exception.SystemException;
027 import com.liferay.portal.kernel.search.Indexable;
028 import com.liferay.portal.kernel.search.IndexableType;
029 import com.liferay.portal.kernel.transaction.Isolation;
030 import com.liferay.portal.kernel.transaction.Propagation;
031 import com.liferay.portal.kernel.transaction.Transactional;
032 import com.liferay.portal.kernel.util.OrderByComparator;
033 import com.liferay.portal.model.PersistedModel;
034 import com.liferay.portal.service.BaseLocalService;
035 import com.liferay.portal.service.PersistedModelLocalService;
036 import com.liferay.portal.service.ServiceContext;
037 import com.liferay.portal.service.permission.ModelPermissions;
038
039 import com.liferay.portlet.calendar.model.CalEvent;
040 import com.liferay.portlet.exportimport.lar.PortletDataContext;
041
042 import java.io.File;
043 import java.io.InputStream;
044 import java.io.Serializable;
045
046 import java.util.Calendar;
047 import java.util.List;
048
049
062 @Deprecated
063 @ProviderType
064 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
065 PortalException.class, SystemException.class})
066 public interface CalEventLocalService extends BaseLocalService,
067 PersistedModelLocalService {
068
073
074
080 @Indexable(type = IndexableType.REINDEX)
081 public CalEvent addCalEvent(CalEvent calEvent);
082
083 @Indexable(type = IndexableType.REINDEX)
084 public CalEvent addEvent(long userId, java.lang.String title,
085 java.lang.String description, java.lang.String location,
086 int startDateMonth, int startDateDay, int startDateYear,
087 int startDateHour, int startDateMinute, int durationHour,
088 int durationMinute, boolean allDay, boolean timeZoneSensitive,
089 java.lang.String type, boolean repeating, TZSRecurrence recurrence,
090 int remindBy, int firstReminder, int secondReminder,
091 ServiceContext serviceContext) throws PortalException;
092
093 public void addEventResources(CalEvent event, boolean addGroupPermissions,
094 boolean addGuestPermissions) throws PortalException;
095
096 public void addEventResources(CalEvent event,
097 ModelPermissions modelPermissions) throws PortalException;
098
099 public void addEventResources(long eventId, boolean addGroupPermissions,
100 boolean addGuestPermissions) throws PortalException;
101
102 public void addEventResources(long eventId,
103 ModelPermissions modelPermissions) throws PortalException;
104
105 public void checkEvents();
106
107
113 public CalEvent createCalEvent(long eventId);
114
115
121 @Indexable(type = IndexableType.DELETE)
122 public CalEvent deleteCalEvent(CalEvent calEvent);
123
124
131 @Indexable(type = IndexableType.DELETE)
132 public CalEvent deleteCalEvent(long eventId) throws PortalException;
133
134 @Indexable(type = IndexableType.DELETE)
135 public CalEvent deleteEvent(CalEvent event) throws PortalException;
136
137 @Indexable(type = IndexableType.DELETE)
138 public CalEvent deleteEvent(long eventId) throws PortalException;
139
140 public void deleteEvents(long groupId) throws PortalException;
141
142
145 @Override
146 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
147 throws PortalException;
148
149 public DynamicQuery dynamicQuery();
150
151
157 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
158
159
171 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
172 int end);
173
174
187 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
188 int end, OrderByComparator<T> orderByComparator);
189
190
196 public long dynamicQueryCount(DynamicQuery dynamicQuery);
197
198
205 public long dynamicQueryCount(DynamicQuery dynamicQuery,
206 Projection projection);
207
208 public File exportEvent(long userId, long eventId)
209 throws PortalException;
210
211 public File exportEvents(long userId, List<CalEvent> events,
212 java.lang.String fileName) throws PortalException;
213
214 public File exportGroupEvents(long userId, long groupId,
215 java.lang.String fileName) throws PortalException;
216
217 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218 public CalEvent fetchCalEvent(long eventId);
219
220
227 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228 public CalEvent fetchCalEventByUuidAndGroupId(java.lang.String uuid,
229 long groupId);
230
231 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232 public ActionableDynamicQuery getActionableDynamicQuery();
233
234
241 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242 public CalEvent getCalEvent(long eventId) throws PortalException;
243
244
252 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253 public CalEvent getCalEventByUuidAndGroupId(java.lang.String uuid,
254 long groupId) throws PortalException;
255
256
267 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268 public List<CalEvent> getCalEvents(int start, int end);
269
270
277 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
278 public List<CalEvent> getCalEventsByUuidAndCompanyId(
279 java.lang.String uuid, long companyId);
280
281
291 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292 public List<CalEvent> getCalEventsByUuidAndCompanyId(
293 java.lang.String uuid, long companyId, int start, int end,
294 OrderByComparator<CalEvent> orderByComparator);
295
296
301 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302 public int getCalEventsCount();
303
304 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305 public List<CalEvent> getCompanyEvents(long companyId, int start, int end);
306
307 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308 public int getCompanyEventsCount(long companyId);
309
310 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311 public CalEvent getEvent(long eventId) throws PortalException;
312
313 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314 public List<CalEvent> getEvents(long groupId, Calendar cal);
315
316 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
317 public List<CalEvent> getEvents(long groupId, Calendar cal,
318 java.lang.String type);
319
320 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321 public List<CalEvent> getEvents(long groupId, Calendar cal,
322 java.lang.String[] types);
323
324 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325 public List<CalEvent> getEvents(long groupId, java.lang.String type,
326 int start, int end);
327
328 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
329 public List<CalEvent> getEvents(long groupId, java.lang.String[] types,
330 int start, int end);
331
332 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
333 public int getEventsCount(long groupId, java.lang.String type);
334
335 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336 public int getEventsCount(long groupId, java.lang.String[] types);
337
338 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
339 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
340 PortletDataContext portletDataContext);
341
342 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
343 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
344
345 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
346 public List<CalEvent> getNoAssetEvents();
347
348
353 public java.lang.String getOSGiServiceIdentifier();
354
355 @Override
356 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
357 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
358 throws PortalException;
359
360 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
361 public List<CalEvent> getRepeatingEvents(long groupId);
362
363 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
364 public List<CalEvent> getRepeatingEvents(long groupId, Calendar cal,
365 java.lang.String[] types);
366
367 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
368 public boolean hasEvents(long groupId, Calendar cal);
369
370 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
371 public boolean hasEvents(long groupId, Calendar cal, java.lang.String type);
372
373 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
374 public boolean hasEvents(long groupId, Calendar cal,
375 java.lang.String[] types);
376
377 public void importICal4j(long userId, long groupId, InputStream inputStream)
378 throws PortalException;
379
380 public void updateAsset(long userId, CalEvent event,
381 long[] assetCategoryIds, java.lang.String[] assetTagNames,
382 long[] assetLinkEntryIds) throws PortalException;
383
384
390 @Indexable(type = IndexableType.REINDEX)
391 public CalEvent updateCalEvent(CalEvent calEvent);
392
393 @Indexable(type = IndexableType.REINDEX)
394 public CalEvent updateEvent(long userId, long eventId,
395 java.lang.String title, java.lang.String description,
396 java.lang.String location, int startDateMonth, int startDateDay,
397 int startDateYear, int startDateHour, int startDateMinute,
398 int durationHour, int durationMinute, boolean allDay,
399 boolean timeZoneSensitive, java.lang.String type, boolean repeating,
400 TZSRecurrence recurrence, int remindBy, int firstReminder,
401 int secondReminder, ServiceContext serviceContext)
402 throws PortalException;
403 }