1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.calendar.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="CalEventServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link CalEventService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       CalEventService
37   * @generated
38   */
39  public class CalEventServiceUtil {
40      public static com.liferay.portlet.calendar.model.CalEvent addEvent(
41          long plid, java.lang.String title, java.lang.String description,
42          int startDateMonth, int startDateDay, int startDateYear,
43          int startDateHour, int startDateMinute, int endDateMonth,
44          int endDateDay, int endDateYear, int durationHour, int durationMinute,
45          boolean allDay, boolean timeZoneSensitive, java.lang.String type,
46          boolean repeating,
47          com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
48          int firstReminder, int secondReminder, boolean addCommunityPermissions,
49          boolean addGuestPermissions)
50          throws com.liferay.portal.PortalException,
51              com.liferay.portal.SystemException, java.rmi.RemoteException {
52          return getService()
53                     .addEvent(plid, title, description, startDateMonth,
54              startDateDay, startDateYear, startDateHour, startDateMinute,
55              endDateMonth, endDateDay, endDateYear, durationHour,
56              durationMinute, allDay, timeZoneSensitive, type, repeating,
57              recurrence, remindBy, firstReminder, secondReminder,
58              addCommunityPermissions, addGuestPermissions);
59      }
60  
61      public static com.liferay.portlet.calendar.model.CalEvent addEvent(
62          long plid, java.lang.String title, java.lang.String description,
63          int startDateMonth, int startDateDay, int startDateYear,
64          int startDateHour, int startDateMinute, int endDateMonth,
65          int endDateDay, int endDateYear, int durationHour, int durationMinute,
66          boolean allDay, boolean timeZoneSensitive, java.lang.String type,
67          boolean repeating,
68          com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
69          int firstReminder, int secondReminder,
70          java.lang.String[] communityPermissions,
71          java.lang.String[] guestPermissions)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException, java.rmi.RemoteException {
74          return getService()
75                     .addEvent(plid, title, description, startDateMonth,
76              startDateDay, startDateYear, startDateHour, startDateMinute,
77              endDateMonth, endDateDay, endDateYear, durationHour,
78              durationMinute, allDay, timeZoneSensitive, type, repeating,
79              recurrence, remindBy, firstReminder, secondReminder,
80              communityPermissions, guestPermissions);
81      }
82  
83      public static void deleteEvent(long eventId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException, java.rmi.RemoteException {
86          getService().deleteEvent(eventId);
87      }
88  
89      public static java.io.File exportEvent(long eventId)
90          throws com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException, java.rmi.RemoteException {
92          return getService().exportEvent(eventId);
93      }
94  
95      public static java.io.File exportGroupEvents(long plid,
96          java.lang.String fileName)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException, java.rmi.RemoteException {
99          return getService().exportGroupEvents(plid, fileName);
100     }
101 
102     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
103         long eventId)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException, java.rmi.RemoteException {
106         return getService().getEvent(eventId);
107     }
108 
109     public static void importICal4j(long plid, java.io.File file)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException, java.rmi.RemoteException {
112         getService().importICal4j(plid, file);
113     }
114 
115     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
116         long eventId, java.lang.String title, java.lang.String description,
117         int startDateMonth, int startDateDay, int startDateYear,
118         int startDateHour, int startDateMinute, int endDateMonth,
119         int endDateDay, int endDateYear, int durationHour, int durationMinute,
120         boolean allDay, boolean timeZoneSensitive, java.lang.String type,
121         boolean repeating,
122         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
123         int firstReminder, int secondReminder)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException, java.rmi.RemoteException {
126         return getService()
127                    .updateEvent(eventId, title, description, startDateMonth,
128             startDateDay, startDateYear, startDateHour, startDateMinute,
129             endDateMonth, endDateDay, endDateYear, durationHour,
130             durationMinute, allDay, timeZoneSensitive, type, repeating,
131             recurrence, remindBy, firstReminder, secondReminder);
132     }
133 
134     public static CalEventService getService() {
135         if (_service == null) {
136             _service = (CalEventService)PortalBeanLocatorUtil.locate(CalEventService.class.getName());
137         }
138 
139         return _service;
140     }
141 
142     public void setService(CalEventService service) {
143         _service = service;
144     }
145 
146     private static CalEventService _service;
147 }