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
assetEntryFinder, assetEntryLocalService, assetEntryPersistence, assetEntryService, assetTagFinder, assetTagLocalService, assetTagPersistence, assetTagService, calEventFinder, calEventLocalService, calEventPersistence, calEventService, companyLocalService, companyPersistence, companyService, counterLocalService, counterService, expandoValueLocalService, expandoValuePersistence, expandoValueService, groupFinder, groupLocalService, groupPersistence, groupService, mailService, portletPreferencesFinder, portletPreferencesLocalService, portletPreferencesPersistence, portletPreferencesService, resourceFinder, resourceLocalService, resourcePersistence, resourceService, socialActivityFinder, socialActivityLocalService, socialActivityPersistence, userFinder, userLocalService, userPersistence, userService
 
Constructor Summary
CalEventLocalServiceImpl()
           
 
Method Summary
 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)
           
 java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(long companyId, int start, int end)
           
 int getCompanyEventsCount(long companyId)
           
 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)
           
 java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents()
           
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)
           
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)
           
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)
           
 void updateAsset(long userId, com.liferay.portlet.calendar.model.CalEvent event, long[] assetCategoryIds, java.lang.String[] assetTagNames)
           
 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, getAssetEntryFinder, getAssetEntryLocalService, getAssetEntryPersistence, getAssetEntryService, getAssetTagFinder, getAssetTagLocalService, getAssetTagPersistence, getAssetTagService, getCalEvent, getCalEventFinder, getCalEventLocalService, getCalEventPersistence, getCalEvents, getCalEventsCount, getCalEventService, getCompanyLocalService, getCompanyPersistence, getCompanyService, getCounterLocalService, getCounterService, getExpandoValueLocalService, getExpandoValuePersistence, getExpandoValueService, getGroupFinder, getGroupLocalService, getGroupPersistence, getGroupService, getMailService, getPortletPreferencesFinder, getPortletPreferencesLocalService, getPortletPreferencesPersistence, getPortletPreferencesService, getResourceFinder, getResourceLocalService, getResourcePersistence, getResourceService, getSocialActivityFinder, getSocialActivityLocalService, getSocialActivityPersistence, getUserFinder, getUserLocalService, getUserPersistence, getUserService, runSQL, setAssetEntryFinder, setAssetEntryLocalService, setAssetEntryPersistence, setAssetEntryService, setAssetTagFinder, setAssetTagLocalService, setAssetTagPersistence, setAssetTagService, setCalEventFinder, setCalEventLocalService, setCalEventPersistence, setCalEventService, setCompanyLocalService, setCompanyPersistence, setCompanyService, setCounterLocalService, setCounterService, setExpandoValueLocalService, setExpandoValuePersistence, setExpandoValueService, setGroupFinder, setGroupLocalService, setGroupPersistence, setGroupService, setMailService, setPortletPreferencesFinder, setPortletPreferencesLocalService, setPortletPreferencesPersistence, setPortletPreferencesService, setResourceFinder, setResourceLocalService, setResourcePersistence, setResourceService, setSocialActivityFinder, setSocialActivityLocalService, setSocialActivityPersistence, 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(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.kernel.exception.PortalException,
                                                            com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException

addEventResources

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

addEventResources

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

addEventResources

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

addEventResources

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

checkEvents

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

deleteEvent

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

deleteEvent

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

deleteEvents

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

exportEvent

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

exportGroupEvents

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

getCompanyEvents

public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getCompanyEvents(long companyId,
                                                                                    int start,
                                                                                    int end)
                                                                             throws com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.SystemException

getCompanyEventsCount

public int getCompanyEventsCount(long companyId)
                          throws com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.SystemException

getEvent

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

getEvents

public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getEvents(long groupId,
                                                                             java.util.Calendar cal)
                                                                      throws com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.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.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.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.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.SystemException

getEventsCount

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

getNoAssetEvents

public java.util.List<com.liferay.portlet.calendar.model.CalEvent> getNoAssetEvents()
                                                                             throws com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.SystemException

getRepeatingEvents

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

hasEvents

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

hasEvents

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

importICal4j

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

updateAsset

public void updateAsset(long userId,
                        com.liferay.portlet.calendar.model.CalEvent event,
                        long[] assetCategoryIds,
                        java.lang.String[] assetTagNames)
                 throws com.liferay.portal.kernel.exception.PortalException,
                        com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.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.kernel.exception.PortalException,
                                                               com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException

exportICal4j

protected java.io.File exportICal4j(net.fortuna.ical4j.model.Calendar cal,
                                    java.lang.String fileName)
                             throws com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.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.kernel.exception.PortalException,
                            com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException

isICal4jDateOnly

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

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.kernel.exception.PortalException,
                                                           com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.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.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException