Liferay 6.0.5

com.liferay.portlet.calendar.service
Class CalEventLocalServiceUtil

java.lang.Object
  extended by com.liferay.portlet.calendar.service.CalEventLocalServiceUtil

public class CalEventLocalServiceUtil
extends Object

The utility for the cal event local service. This utility wraps CalEventLocalServiceImpl and is the primary access point for service operations in application layer code running on the local server.

Never modify this class directly. Add custom service methods to CalEventLocalServiceImpl and rerun ServiceBuilder to regenerate this class.

This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.

See Also:
CalEventLocalService, CalEventLocalServiceBaseImpl, CalEventLocalServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Constructor Summary
CalEventLocalServiceUtil()
           
 
Method Summary
static CalEvent addCalEvent(CalEvent calEvent)
          Adds the cal event to the database.
static CalEvent addEvent(long userId, String title, 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, String type, boolean repeating, TZSRecurrence recurrence, int remindBy, int firstReminder, int secondReminder, ServiceContext serviceContext)
           
static void addEventResources(CalEvent event, boolean addCommunityPermissions, boolean addGuestPermissions)
           
static void addEventResources(CalEvent event, String[] communityPermissions, String[] guestPermissions)
           
static void addEventResources(long eventId, boolean addCommunityPermissions, boolean addGuestPermissions)
           
static void addEventResources(long eventId, String[] communityPermissions, String[] guestPermissions)
           
static void checkEvents()
           
static CalEvent createCalEvent(long eventId)
          Creates a new cal event with the primary key.
static void deleteCalEvent(CalEvent calEvent)
          Deletes the cal event from the database.
static void deleteCalEvent(long eventId)
          Deletes the cal event with the primary key from the database.
static void deleteEvent(CalEvent event)
           
static void deleteEvent(long eventId)
           
static void deleteEvents(long groupId)
           
static List dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
          Performs a dynamic query on the database and returns an ordered range of the matching rows.
static long dynamicQueryCount(DynamicQuery dynamicQuery)
          Counts the number of rows that match the dynamic query.
static File exportEvent(long userId, long eventId)
           
static File exportGroupEvents(long userId, long groupId, String fileName)
           
static CalEvent getCalEvent(long eventId)
          Gets the cal event with the primary key.
static CalEvent getCalEventByUuidAndGroupId(String uuid, long groupId)
          Gets the cal event with the UUID and group id.
static List<CalEvent> getCalEvents(int start, int end)
          Gets a range of all the cal events.
static int getCalEventsCount()
          Gets the number of cal events.
static List<CalEvent> getCompanyEvents(long companyId, int start, int end)
           
static int getCompanyEventsCount(long companyId)
           
static CalEvent getEvent(long eventId)
           
static List<CalEvent> getEvents(long groupId, Calendar cal)
           
static List<CalEvent> getEvents(long groupId, Calendar cal, String type)
           
static List<CalEvent> getEvents(long groupId, String type, int start, int end)
           
static int getEventsCount(long groupId, String type)
           
static List<CalEvent> getNoAssetEvents()
           
static List<CalEvent> getRepeatingEvents(long groupId)
           
static CalEventLocalService getService()
           
static boolean hasEvents(long groupId, Calendar cal)
           
static boolean hasEvents(long groupId, Calendar cal, String type)
           
static void importICal4j(long userId, long groupId, File file)
           
 void setService(CalEventLocalService service)
           
static void updateAsset(long userId, CalEvent event, long[] assetCategoryIds, String[] assetTagNames)
           
static CalEvent updateCalEvent(CalEvent calEvent)
          Updates the cal event in the database.
static CalEvent updateCalEvent(CalEvent calEvent, boolean merge)
          Updates the cal event in the database.
static CalEvent updateEvent(long userId, long eventId, String title, 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, String type, boolean repeating, TZSRecurrence recurrence, int remindBy, int firstReminder, int secondReminder, ServiceContext serviceContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalEventLocalServiceUtil

public CalEventLocalServiceUtil()
Method Detail

addCalEvent

public static CalEvent addCalEvent(CalEvent calEvent)
                            throws SystemException
Adds the cal event to the database. Also notifies the appropriate model listeners.

Parameters:
calEvent - the cal event to add
Returns:
the cal event that was added
Throws:
SystemException - if a system exception occurred

createCalEvent

public static CalEvent createCalEvent(long eventId)
Creates a new cal event with the primary key. Does not add the cal event to the database.

Parameters:
eventId - the primary key for the new cal event
Returns:
the new cal event

deleteCalEvent

public static void deleteCalEvent(long eventId)
                           throws PortalException,
                                  SystemException
Deletes the cal event with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
eventId - the primary key of the cal event to delete
Throws:
PortalException - if a cal event with the primary key could not be found
SystemException - if a system exception occurred

deleteCalEvent

public static void deleteCalEvent(CalEvent calEvent)
                           throws SystemException
Deletes the cal event from the database. Also notifies the appropriate model listeners.

Parameters:
calEvent - the cal event to delete
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery)
                         throws SystemException
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query to search with
Returns:
the matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery,
                                int start,
                                int end)
                         throws SystemException
Performs a dynamic query on the database and returns a range of the matching rows.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
dynamicQuery - the dynamic query to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (not inclusive)
Returns:
the range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery,
                                int start,
                                int end,
                                OrderByComparator orderByComparator)
                         throws SystemException
Performs a dynamic query on the database and returns an ordered range of the matching rows.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
dynamicQuery - the dynamic query to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery)
                              throws SystemException
Counts the number of rows that match the dynamic query.

Parameters:
dynamicQuery - the dynamic query to search with
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

getCalEvent

public static CalEvent getCalEvent(long eventId)
                            throws PortalException,
                                   SystemException
Gets the cal event with the primary key.

Parameters:
eventId - the primary key of the cal event to get
Returns:
the cal event
Throws:
PortalException - if a cal event with the primary key could not be found
SystemException - if a system exception occurred

getCalEventByUuidAndGroupId

public static CalEvent getCalEventByUuidAndGroupId(String uuid,
                                                   long groupId)
                                            throws PortalException,
                                                   SystemException
Gets the cal event with the UUID and group id.

Parameters:
uuid - the UUID of cal event to get
groupId - the group id of the cal event to get
Returns:
the cal event
Throws:
PortalException - if a cal event with the UUID and group id could not be found
SystemException - if a system exception occurred

getCalEvents

public static List<CalEvent> getCalEvents(int start,
                                          int end)
                                   throws SystemException
Gets a range of all the cal events.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
start - the lower bound of the range of cal events to return
end - the upper bound of the range of cal events to return (not inclusive)
Returns:
the range of cal events
Throws:
SystemException - if a system exception occurred

getCalEventsCount

public static int getCalEventsCount()
                             throws SystemException
Gets the number of cal events.

Returns:
the number of cal events
Throws:
SystemException - if a system exception occurred

updateCalEvent

public static CalEvent updateCalEvent(CalEvent calEvent)
                               throws SystemException
Updates the cal event in the database. Also notifies the appropriate model listeners.

Parameters:
calEvent - the cal event to update
Returns:
the cal event that was updated
Throws:
SystemException - if a system exception occurred

updateCalEvent

public static CalEvent updateCalEvent(CalEvent calEvent,
                                      boolean merge)
                               throws SystemException
Updates the cal event in the database. Also notifies the appropriate model listeners.

Parameters:
calEvent - the cal event to update
merge - whether to merge the cal event with the current session. See BatchSession.update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean) for an explanation.
Returns:
the cal event that was updated
Throws:
SystemException - if a system exception occurred

addEvent

public static CalEvent addEvent(long userId,
                                String title,
                                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,
                                String type,
                                boolean repeating,
                                TZSRecurrence recurrence,
                                int remindBy,
                                int firstReminder,
                                int secondReminder,
                                ServiceContext serviceContext)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

addEventResources

public static void addEventResources(CalEvent event,
                                     boolean addCommunityPermissions,
                                     boolean addGuestPermissions)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

addEventResources

public static void addEventResources(CalEvent event,
                                     String[] communityPermissions,
                                     String[] guestPermissions)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

addEventResources

public static void addEventResources(long eventId,
                                     boolean addCommunityPermissions,
                                     boolean addGuestPermissions)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

addEventResources

public static void addEventResources(long eventId,
                                     String[] communityPermissions,
                                     String[] guestPermissions)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

checkEvents

public static void checkEvents()
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

deleteEvent

public static void deleteEvent(CalEvent event)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

deleteEvent

public static void deleteEvent(long eventId)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

deleteEvents

public static void deleteEvents(long groupId)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

exportEvent

public static File exportEvent(long userId,
                               long eventId)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

exportGroupEvents

public static File exportGroupEvents(long userId,
                                     long groupId,
                                     String fileName)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

getCompanyEvents

public static List<CalEvent> getCompanyEvents(long companyId,
                                              int start,
                                              int end)
                                       throws SystemException
Throws:
SystemException

getCompanyEventsCount

public static int getCompanyEventsCount(long companyId)
                                 throws SystemException
Throws:
SystemException

getEvent

public static CalEvent getEvent(long eventId)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

getEvents

public static List<CalEvent> getEvents(long groupId,
                                       Calendar cal)
                                throws SystemException
Throws:
SystemException

getEvents

public static List<CalEvent> getEvents(long groupId,
                                       Calendar cal,
                                       String type)
                                throws SystemException
Throws:
SystemException

getEvents

public static List<CalEvent> getEvents(long groupId,
                                       String type,
                                       int start,
                                       int end)
                                throws SystemException
Throws:
SystemException

getEventsCount

public static int getEventsCount(long groupId,
                                 String type)
                          throws SystemException
Throws:
SystemException

getNoAssetEvents

public static List<CalEvent> getNoAssetEvents()
                                       throws SystemException
Throws:
SystemException

getRepeatingEvents

public static List<CalEvent> getRepeatingEvents(long groupId)
                                         throws SystemException
Throws:
SystemException

hasEvents

public static boolean hasEvents(long groupId,
                                Calendar cal)
                         throws SystemException
Throws:
SystemException

hasEvents

public static boolean hasEvents(long groupId,
                                Calendar cal,
                                String type)
                         throws SystemException
Throws:
SystemException

importICal4j

public static void importICal4j(long userId,
                                long groupId,
                                File file)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

updateAsset

public static void updateAsset(long userId,
                               CalEvent event,
                               long[] assetCategoryIds,
                               String[] assetTagNames)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

updateEvent

public static CalEvent updateEvent(long userId,
                                   long eventId,
                                   String title,
                                   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,
                                   String type,
                                   boolean repeating,
                                   TZSRecurrence recurrence,
                                   int remindBy,
                                   int firstReminder,
                                   int secondReminder,
                                   ServiceContext serviceContext)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getService

public static CalEventLocalService getService()

setService

public void setService(CalEventLocalService service)

Liferay 6.0.5