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          long plid, 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, boolean addCommunityPermissions,
56          boolean addGuestPermissions)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException, java.rmi.RemoteException {
59          return getService()
60                     .addEvent(plid, title, description, startDateMonth,
61              startDateDay, startDateYear, startDateHour, startDateMinute,
62              endDateMonth, endDateDay, endDateYear, durationHour,
63              durationMinute, allDay, timeZoneSensitive, type, repeating,
64              recurrence, remindBy, firstReminder, secondReminder,
65              addCommunityPermissions, addGuestPermissions);
66      }
67  
68      public static com.liferay.portlet.calendar.model.CalEvent addEvent(
69          long plid, java.lang.String title, java.lang.String description,
70          int startDateMonth, int startDateDay, int startDateYear,
71          int startDateHour, int startDateMinute, int endDateMonth,
72          int endDateDay, int endDateYear, int durationHour, int durationMinute,
73          boolean allDay, boolean timeZoneSensitive, java.lang.String type,
74          boolean repeating,
75          com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
76          int firstReminder, int secondReminder,
77          java.lang.String[] communityPermissions,
78          java.lang.String[] guestPermissions)
79          throws com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException, java.rmi.RemoteException {
81          return getService()
82                     .addEvent(plid, title, description, startDateMonth,
83              startDateDay, startDateYear, startDateHour, startDateMinute,
84              endDateMonth, endDateDay, endDateYear, durationHour,
85              durationMinute, allDay, timeZoneSensitive, type, repeating,
86              recurrence, remindBy, firstReminder, secondReminder,
87              communityPermissions, guestPermissions);
88      }
89  
90      public static void deleteEvent(long eventId)
91          throws com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException, java.rmi.RemoteException {
93          getService().deleteEvent(eventId);
94      }
95  
96      public static java.io.File exportEvent(long eventId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException, java.rmi.RemoteException {
99          return getService().exportEvent(eventId);
100     }
101 
102     public static java.io.File exportGroupEvents(long plid,
103         java.lang.String fileName)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException, java.rmi.RemoteException {
106         return getService().exportGroupEvents(plid, fileName);
107     }
108 
109     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
110         long eventId)
111         throws com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException, java.rmi.RemoteException {
113         return getService().getEvent(eventId);
114     }
115 
116     public static void importICal4j(long plid, java.io.File file)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException, java.rmi.RemoteException {
119         getService().importICal4j(plid, file);
120     }
121 
122     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
123         long eventId, java.lang.String title, java.lang.String description,
124         int startDateMonth, int startDateDay, int startDateYear,
125         int startDateHour, int startDateMinute, int endDateMonth,
126         int endDateDay, int endDateYear, int durationHour, int durationMinute,
127         boolean allDay, boolean timeZoneSensitive, java.lang.String type,
128         boolean repeating,
129         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
130         int firstReminder, int secondReminder)
131         throws com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException, java.rmi.RemoteException {
133         return getService()
134                    .updateEvent(eventId, title, description, startDateMonth,
135             startDateDay, startDateYear, startDateHour, startDateMinute,
136             endDateMonth, endDateDay, endDateYear, durationHour,
137             durationMinute, allDay, timeZoneSensitive, type, repeating,
138             recurrence, remindBy, firstReminder, secondReminder);
139     }
140 
141     public static CalEventService getService() {
142         if (_service == null) {
143             throw new RuntimeException("CalEventService is not set");
144         }
145 
146         return _service;
147     }
148 
149     public void setService(CalEventService service) {
150         _service = service;
151     }
152 
153     private static CalEventService _service;
154 }