1
22
23 package com.liferay.portlet.calendar.service;
24
25
26
46 public class CalEventServiceUtil {
47 public static com.liferay.portlet.calendar.model.CalEvent addEvent(
48 java.lang.String title, java.lang.String description,
49 int startDateMonth, int startDateDay, int startDateYear,
50 int startDateHour, int startDateMinute, int endDateMonth,
51 int endDateDay, int endDateYear, int durationHour, int durationMinute,
52 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
53 boolean repeating,
54 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
55 int firstReminder, int secondReminder,
56 com.liferay.portal.service.ServiceContext serviceContext)
57 throws com.liferay.portal.PortalException,
58 com.liferay.portal.SystemException {
59 return getService()
60 .addEvent(title, description, startDateMonth, startDateDay,
61 startDateYear, startDateHour, startDateMinute, endDateMonth,
62 endDateDay, endDateYear, durationHour, durationMinute, allDay,
63 timeZoneSensitive, type, repeating, recurrence, remindBy,
64 firstReminder, secondReminder, serviceContext);
65 }
66
67 public static void deleteEvent(long eventId)
68 throws com.liferay.portal.PortalException,
69 com.liferay.portal.SystemException {
70 getService().deleteEvent(eventId);
71 }
72
73 public static java.io.File exportEvent(long eventId)
74 throws com.liferay.portal.PortalException,
75 com.liferay.portal.SystemException {
76 return getService().exportEvent(eventId);
77 }
78
79 public static java.io.File exportGroupEvents(long groupId,
80 java.lang.String fileName)
81 throws com.liferay.portal.PortalException,
82 com.liferay.portal.SystemException {
83 return getService().exportGroupEvents(groupId, fileName);
84 }
85
86 public static com.liferay.portlet.calendar.model.CalEvent getEvent(
87 long eventId)
88 throws com.liferay.portal.PortalException,
89 com.liferay.portal.SystemException {
90 return getService().getEvent(eventId);
91 }
92
93 public static void importICal4j(long groupId, java.io.File file)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 getService().importICal4j(groupId, file);
97 }
98
99 public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
100 long eventId, java.lang.String title, java.lang.String description,
101 int startDateMonth, int startDateDay, int startDateYear,
102 int startDateHour, int startDateMinute, int endDateMonth,
103 int endDateDay, int endDateYear, int durationHour, int durationMinute,
104 boolean allDay, boolean timeZoneSensitive, java.lang.String type,
105 boolean repeating,
106 com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
107 int firstReminder, int secondReminder,
108 com.liferay.portal.service.ServiceContext serviceContext)
109 throws com.liferay.portal.PortalException,
110 com.liferay.portal.SystemException {
111 return getService()
112 .updateEvent(eventId, title, description, startDateMonth,
113 startDateDay, startDateYear, startDateHour, startDateMinute,
114 endDateMonth, endDateDay, endDateYear, durationHour,
115 durationMinute, allDay, timeZoneSensitive, type, repeating,
116 recurrence, remindBy, firstReminder, secondReminder, serviceContext);
117 }
118
119 public static CalEventService getService() {
120 if (_service == null) {
121 throw new RuntimeException("CalEventService is not set");
122 }
123
124 return _service;
125 }
126
127 public void setService(CalEventService service) {
128 _service = service;
129 }
130
131 private static CalEventService _service;
132 }