1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.calendar.service;
24  
25  
26  /**
27   * <a href="CalEventServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * {@link CalEventService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       CalEventService
44   * @generated
45   */
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 }