com.liferay.portlet.calendar.service.impl
Class CalEventLocalServiceImpl

java.lang.Object
  extended by com.liferay.portlet.calendar.service.base.CalEventLocalServiceBaseImpl
      extended by com.liferay.portlet.calendar.service.impl.CalEventLocalServiceImpl
All Implemented Interfaces:
com.liferay.portlet.calendar.service.CalEventLocalService

public class CalEventLocalServiceImpl
extends CalEventLocalServiceBaseImpl

View Source

Author:
Brian Wing Shun Chan, Bruno Farache, Samuel Kong, Ganesh Ram, Brett Swaim

Field Summary
 
Fields inherited from class com.liferay.portlet.calendar.service.base.CalEventLocalServiceBaseImpl
calEventFinder, calEventLocalService, calEventPersistence, calEventService, companyLocalService, companyPersistence, companyService, counterLocalService, counterService, expandoValueLocalService, expandoValuePersistence, expandoValueService, mailService, portletPreferencesFinder, portletPreferencesLocalService, portletPreferencesPersistence, portletPreferencesService, resourceFinder, resourceLocalService, resourcePersistence, resourceService, socialActivityFinder, socialActivityLocalService, socialActivityPersistence, tagsAssetFinder, tagsAssetLocalService, tagsAssetPersistence, tagsAssetService, tagsEntryFinder, tagsEntryLocalService, tagsEntryPersistence, tagsEntryService, userFinder, userLocalService, userPersistence, userService
 
Constructor Summary
CalEventLocalServiceImpl()
           
 
Method Summary
 com.liferay.portlet.calendar.model.CalEvent addEvent(long userId, java.lang.String title, java.lang.String description, int startDateMonth, int startDateDay, int startDateYear, int startDateHour, int startDateMinute, int endDateMonth, int endDateDay, int endDateYear, int durationHour, int durationMinute, boolean allDay, boolean timeZoneSensitive, java.lang.String type, boolean repeating, com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy, int firstReminder, int secondReminder, com.liferay.portal.service.ServiceContext serviceContext)
           
 com.liferay.portlet.calendar.model.CalEvent addEvent(java.lang.String uuid, long userId, java.lang.String title, java.lang.String description, int startDateMonth, int startDateDay, int startDateYear, int startDateHour, int startDateMinute, int endDateMonth, int endDateDay, int endDateYear, int durationHour, int durationMinute, boolean allDay, boolean timeZoneSensitive, java.lang.String type, boolean repeating, com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy, int firstReminder, int secondReminder, com.liferay.portal.service.ServiceContext serviceContext)
           
 void addEventResources(com.liferay.portlet.calendar.model.CalEvent event, boolean addCommunityPermissions, boolean addGuestPermissions)
           
 void addEventResources(com.liferay.portlet.calendar.model.CalEvent event, java.lang.String[] communityPermissions, java.lang.String[] guestPermissions)
           
 void addEventResources(long eventId, boolean addCommunityPermissions, boolean addGuestPermissions)
           
 void addEventResources(long eventId, java.lang.String[] communityPermissions, java.lang.String[] guestPermissions)
           
 void checkEvents()
           
 void deleteEvent(com.liferay.portlet.calendar.model.CalEvent event)
           
 void deleteEvent(long eventId)
           
 void deleteEvents(long groupId)
           
 java.io.File exportEvent(long userId, long eventId)
           
 java.io.File exportGroupEvents(long userId, long groupId, java.lang.String fileName)
           
protected  java.io.File exportICal4j(net.fortuna.ical4j.model.Calendar cal, java.lang.String fileName)
           
 com.liferay.portlet.calendar.model.CalEvent getEvent(long eventId)
           
 java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(long groupId, java.util.Calendar cal)
           
 java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(long groupId, java.util.Calendar cal, java.lang.String type)
           
 java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(long groupId, java.lang.String type, int start, int end)
           
 int getEventsCount(long groupId, java.lang.String type)
           
protected  java.util.Calendar getRecurrenceCal(java.util.Calendar cal, java.util.Calendar tzICal, com.liferay.portlet.calendar.model.CalEvent event)
           
 java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(long groupId)
           
 boolean hasEvents(long groupId, java.util.Calendar cal)
           
 boolean hasEvents(long groupId, java.util.Calendar cal, java.lang.String type)
           
 void importICal4j(long userId, long groupId, java.io.File file)
           
protected  void importICal4j(long userId, long groupId, net.fortuna.ical4j.model.component.VEvent event)
           
protected  boolean isICal4jDateOnly(net.fortuna.ical4j.model.property.DateProperty date)
           
 void reIndex(com.liferay.portlet.calendar.model.CalEvent event)
           
 void reIndex(long eventId)
           
 void reIndex(java.lang.String[] ids)
           
protected  void reIndexEvents(long companyId)
           
protected  void reIndexEvents(long companyId, int start, int end)
           
protected  void remindUser(com.liferay.portlet.calendar.model.CalEvent event, com.liferay.portal.model.User user, java.util.Calendar startDate)
           
protected  void remindUser(com.liferay.portlet.calendar.model.CalEvent event, com.liferay.portal.model.User user, java.util.Calendar startDate, java.util.Calendar now)
           
 com.liferay.portal.kernel.search.Hits search(long companyId, long groupId, long userId, long ownerUserId, java.lang.String keywords, int start, int end)
           
protected  java.util.Calendar toCalendar(net.fortuna.ical4j.model.property.DateProperty date, java.util.TimeZone timeZone, boolean timeZoneSensitive)
           
protected  int toCalendarWeekDay(net.fortuna.ical4j.model.WeekDay weekDay)
           
protected  net.fortuna.ical4j.model.Calendar toICalCalendar(long userId, java.util.List<com.liferay.portlet.calendar.model.CalEvent> events)
           
protected  net.fortuna.ical4j.model.Recur toICalRecurrence(com.liferay.portal.kernel.cal.TZSRecurrence recurrence)
           
protected  net.fortuna.ical4j.model.component.VEvent toICalVEvent(com.liferay.portlet.calendar.model.CalEvent event, java.util.TimeZone timeZone)
           
protected  net.fortuna.ical4j.model.WeekDay toICalWeekDay(int dayOfWeek)
           
protected  com.liferay.portal.kernel.cal.TZSRecurrence toRecurrence(net.fortuna.ical4j.model.property.RRule rRule, java.util.TimeZone timeZone, java.util.Calendar startDate)
           
 com.liferay.portlet.calendar.model.CalEvent updateEvent(long userId, long eventId, java.lang.String title, java.lang.String description, int startDateMonth, int startDateDay, int startDateYear, int startDateHour, int startDateMinute, int endDateMonth, int endDateDay, int endDateYear, int durationHour, int durationMinute, boolean allDay, boolean timeZoneSensitive, java.lang.String type, boolean repeating, com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy, int firstReminder, int secondReminder, com.liferay.portal.service.ServiceContext serviceContext)
           
protected  void validate(java.lang.String title, int startDateMonth, int startDateDay, int startDateYear, int endDateMonth, int endDateDay, int endDateYear, int durationHour, int durationMinute, boolean allDay, boolean repeating)
           
 
Methods inherited from class com.liferay.portlet.calendar.service.base.CalEventLocalServiceBaseImpl
addCalEvent, createCalEvent, deleteCalEvent, deleteCalEvent, dynamicQuery, dynamicQuery, getCalEvent, getCalEventFinder, getCalEventLocalService, getCalEventPersistence, getCalEvents, getCalEventsCount, getCalEventService, getCompanyLocalService, getCompanyPersistence, getCompanyService, getCounterLocalService, getCounterService, getExpandoValueLocalService, getExpandoValuePersistence, getExpandoValueService, getMailService, getPortletPreferencesFinder, getPortletPreferencesLocalService, getPortletPreferencesPersistence, getPortletPreferencesService, getResourceFinder, getResourceLocalService, getResourcePersistence, getResourceService, getSocialActivityFinder, getSocialActivityLocalService, getSocialActivityPersistence, getTagsAssetFinder, getTagsAssetLocalService, getTagsAssetPersistence, getTagsAssetService, getTagsEntryFinder, getTagsEntryLocalService, getTagsEntryPersistence, getTagsEntryService, getUserFinder, getUserLocalService, getUserPersistence, getUserService, runSQL, setCalEventFinder, setCalEventLocalService, setCalEventPersistence, setCalEventService, setCompanyLocalService, setCompanyPersistence, setCompanyService, setCounterLocalService, setCounterService, setExpandoValueLocalService, setExpandoValuePersistence, setExpandoValueService, setMailService, setPortletPreferencesFinder, setPortletPreferencesLocalService, setPortletPreferencesPersistence, setPortletPreferencesService, setResourceFinder, setResourceLocalService, setResourcePersistence, setResourceService, setSocialActivityFinder, setSocialActivityLocalService, setSocialActivityPersistence, setTagsAssetFinder, setTagsAssetLocalService, setTagsAssetPersistence, setTagsAssetService, setTagsEntryFinder, setTagsEntryLocalService, setTagsEntryPersistence, setTagsEntryService, setUserFinder, setUserLocalService, setUserPersistence, setUserService, updateCalEvent, updateCalEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalEventLocalServiceImpl

public CalEventLocalServiceImpl()
Method Detail

addEvent

public com.liferay.portlet.calendar.model.CalEvent addEvent(long userId,
                                                            java.lang.String title,
                                                            java.lang.String description,
                                                            int startDateMonth,
                                                            int startDateDay,
                                                            int startDateYear,
                                                            int startDateHour,
                                                            int startDateMinute,
                                                            int endDateMonth,
                                                            int endDateDay,
                                                            int endDateYear,
                                                            int durationHour,
                                                            int durationMinute,
                                                            boolean allDay,
                                                            boolean timeZoneSensitive,
                                                            java.lang.String type,
                                                            boolean repeating,
                                                            com.liferay.portal.kernel.cal.TZSRecurrence recurrence,
                                                            int remindBy,
                                                            int firstReminder,
                                                            int secondReminder,
                                                            com.liferay.portal.service.ServiceContext serviceContext)
                                                     throws com.liferay.portal.PortalException,
                                                            com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addEvent

public com.liferay.portlet.calendar.model.CalEvent addEvent(java.lang.String uuid,
                                                            long userId,
                                                            java.lang.String title,
                                                            java.lang.String description,
                                                            int startDateMonth,
                                                            int startDateDay,
                                                            int startDateYear,
                                                            int startDateHour,
                                                            int startDateMinute,
                                                            int endDateMonth,
                                                            int endDateDay,
                                                            int endDateYear,
                                                            int durationHour,
                                                            int durationMinute,
                                                            boolean allDay,
                                                            boolean timeZoneSensitive,
                                                            java.lang.String type,
                                                            boolean repeating,
                                                            com.liferay.portal.kernel.cal.TZSRecurrence recurrence,
                                                            int remindBy,
                                                            int firstReminder,
                                                            int secondReminder,
                                                            com.liferay.portal.service.ServiceContext serviceContext)
                                                     throws com.liferay.portal.PortalException,
                                                            com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addEventResources

public void addEventResources(long eventId,
                              boolean addCommunityPermissions,
                              boolean addGuestPermissions)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addEventResources

public void addEventResources(com.liferay.portlet.calendar.model.CalEvent event,
                              boolean addCommunityPermissions,
                              boolean addGuestPermissions)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addEventResources

public void addEventResources(long eventId,
                              java.lang.String[] communityPermissions,
                              java.lang.String[] guestPermissions)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addEventResources

public void addEventResources(com.liferay.portlet.calendar.model.CalEvent event,
                              java.lang.String[] communityPermissions,
                              java.lang.String[] guestPermissions)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

checkEvents

public void checkEvents()
                 throws com.liferay.portal.PortalException,
                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

deleteEvent

public void deleteEvent(long eventId)
                 throws com.liferay.portal.PortalException,
                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

deleteEvent

public void deleteEvent(com.liferay.portlet.calendar.model.CalEvent event)
                 throws com.liferay.portal.PortalException,
                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

deleteEvents

public void deleteEvents(long groupId)
                  throws com.liferay.portal.PortalException,
                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportEvent

public java.io.File exportEvent(long userId,
                                long eventId)
                         throws com.liferay.portal.PortalException,
                                com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportGroupEvents

public java.io.File exportGroupEvents(long userId,
                                      long groupId,
                                      java.lang.String fileName)
                               throws com.liferay.portal.PortalException,
                                      com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getEvent

public com.liferay.portlet.calendar.model.CalEvent getEvent(long eventId)
                                                     throws com.liferay.portal.PortalException,
                                                            com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getEvents

public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(long groupId,
                                                                             java.lang.String type,
                                                                             int start,
                                                                             int end)
                                                                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getEvents

public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(long groupId,
                                                                             java.util.Calendar cal)
                                                                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getEvents

public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(long groupId,
                                                                             java.util.Calendar cal,
                                                                             java.lang.String type)
                                                                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getEventsCount

public int getEventsCount(long groupId,
                          java.lang.String type)
                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getRepeatingEvents

public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getRepeatingEvents(long groupId)
                                                                               throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

hasEvents

public boolean hasEvents(long groupId,
                         java.util.Calendar cal)
                  throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

hasEvents

public boolean hasEvents(long groupId,
                         java.util.Calendar cal,
                         java.lang.String type)
                  throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

importICal4j

public void importICal4j(long userId,
                         long groupId,
                         java.io.File file)
                  throws com.liferay.portal.PortalException,
                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

reIndex

public void reIndex(long eventId)
             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

reIndex

public void reIndex(com.liferay.portlet.calendar.model.CalEvent event)
             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

reIndex

public void reIndex(java.lang.String[] ids)
             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

search

public com.liferay.portal.kernel.search.Hits search(long companyId,
                                                    long groupId,
                                                    long userId,
                                                    long ownerUserId,
                                                    java.lang.String keywords,
                                                    int start,
                                                    int end)
                                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

updateEvent

public com.liferay.portlet.calendar.model.CalEvent updateEvent(long userId,
                                                               long eventId,
                                                               java.lang.String title,
                                                               java.lang.String description,
                                                               int startDateMonth,
                                                               int startDateDay,
                                                               int startDateYear,
                                                               int startDateHour,
                                                               int startDateMinute,
                                                               int endDateMonth,
                                                               int endDateDay,
                                                               int endDateYear,
                                                               int durationHour,
                                                               int durationMinute,
                                                               boolean allDay,
                                                               boolean timeZoneSensitive,
                                                               java.lang.String type,
                                                               boolean repeating,
                                                               com.liferay.portal.kernel.cal.TZSRecurrence recurrence,
                                                               int remindBy,
                                                               int firstReminder,
                                                               int secondReminder,
                                                               com.liferay.portal.service.ServiceContext serviceContext)
                                                        throws com.liferay.portal.PortalException,
                                                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportICal4j

protected java.io.File exportICal4j(net.fortuna.ical4j.model.Calendar cal,
                                    java.lang.String fileName)
                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getRecurrenceCal

protected java.util.Calendar getRecurrenceCal(java.util.Calendar cal,
                                              java.util.Calendar tzICal,
                                              com.liferay.portlet.calendar.model.CalEvent event)

importICal4j

protected void importICal4j(long userId,
                            long groupId,
                            net.fortuna.ical4j.model.component.VEvent event)
                     throws com.liferay.portal.PortalException,
                            com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

isICal4jDateOnly

protected boolean isICal4jDateOnly(net.fortuna.ical4j.model.property.DateProperty date)

reIndexEvents

protected void reIndexEvents(long companyId)
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

reIndexEvents

protected void reIndexEvents(long companyId,
                             int start,
                             int end)
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

remindUser

protected void remindUser(com.liferay.portlet.calendar.model.CalEvent event,
                          com.liferay.portal.model.User user,
                          java.util.Calendar startDate)

remindUser

protected void remindUser(com.liferay.portlet.calendar.model.CalEvent event,
                          com.liferay.portal.model.User user,
                          java.util.Calendar startDate,
                          java.util.Calendar now)

toCalendar

protected java.util.Calendar toCalendar(net.fortuna.ical4j.model.property.DateProperty date,
                                        java.util.TimeZone timeZone,
                                        boolean timeZoneSensitive)

toCalendarWeekDay

protected int toCalendarWeekDay(net.fortuna.ical4j.model.WeekDay weekDay)

toICalCalendar

protected net.fortuna.ical4j.model.Calendar toICalCalendar(long userId,
                                                           java.util.List<com.liferay.portlet.calendar.model.CalEvent> events)
                                                    throws com.liferay.portal.PortalException,
                                                           com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

toICalRecurrence

protected net.fortuna.ical4j.model.Recur toICalRecurrence(com.liferay.portal.kernel.cal.TZSRecurrence recurrence)

toICalVEvent

protected net.fortuna.ical4j.model.component.VEvent toICalVEvent(com.liferay.portlet.calendar.model.CalEvent event,
                                                                 java.util.TimeZone timeZone)

toICalWeekDay

protected net.fortuna.ical4j.model.WeekDay toICalWeekDay(int dayOfWeek)

toRecurrence

protected com.liferay.portal.kernel.cal.TZSRecurrence toRecurrence(net.fortuna.ical4j.model.property.RRule rRule,
                                                                   java.util.TimeZone timeZone,
                                                                   java.util.Calendar startDate)

validate

protected void validate(java.lang.String title,
                        int startDateMonth,
                        int startDateDay,
                        int startDateYear,
                        int endDateMonth,
                        int endDateDay,
                        int endDateYear,
                        int durationHour,
                        int durationMinute,
                        boolean allDay,
                        boolean repeating)
                 throws com.liferay.portal.PortalException
Throws:
com.liferay.portal.PortalException