1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <a href="CalEventServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.calendar.service.CalEventService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.calendar.service.CalEventServiceFactory</code> is responsible
42   * for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.calendar.service.CalEventService
48   * @see com.liferay.portlet.calendar.service.CalEventServiceFactory
49   *
50   */
51  public class CalEventServiceUtil {
52      public static com.liferay.portlet.calendar.model.CalEvent addEvent(
53          long plid, java.lang.String title, java.lang.String description,
54          int startDateMonth, int startDateDay, int startDateYear,
55          int startDateHour, int startDateMinute, int endDateMonth,
56          int endDateDay, int endDateYear, int durationHour, int durationMinute,
57          boolean allDay, boolean timeZoneSensitive, java.lang.String type,
58          boolean repeating, com.liferay.portal.kernel.cal.Recurrence recurrence,
59          java.lang.String remindBy, int firstReminder, int secondReminder,
60          boolean addCommunityPermissions, boolean addGuestPermissions)
61          throws com.liferay.portal.PortalException, 
62              com.liferay.portal.SystemException, java.rmi.RemoteException {
63          CalEventService calEventService = CalEventServiceFactory.getService();
64  
65          return calEventService.addEvent(plid, title, description,
66              startDateMonth, startDateDay, startDateYear, startDateHour,
67              startDateMinute, endDateMonth, endDateDay, endDateYear,
68              durationHour, durationMinute, allDay, timeZoneSensitive, type,
69              repeating, recurrence, remindBy, firstReminder, secondReminder,
70              addCommunityPermissions, addGuestPermissions);
71      }
72  
73      public static com.liferay.portlet.calendar.model.CalEvent addEvent(
74          long plid, java.lang.String title, java.lang.String description,
75          int startDateMonth, int startDateDay, int startDateYear,
76          int startDateHour, int startDateMinute, int endDateMonth,
77          int endDateDay, int endDateYear, int durationHour, int durationMinute,
78          boolean allDay, boolean timeZoneSensitive, java.lang.String type,
79          boolean repeating, com.liferay.portal.kernel.cal.Recurrence recurrence,
80          java.lang.String remindBy, int firstReminder, int secondReminder,
81          java.lang.String[] communityPermissions,
82          java.lang.String[] guestPermissions)
83          throws com.liferay.portal.PortalException, 
84              com.liferay.portal.SystemException, java.rmi.RemoteException {
85          CalEventService calEventService = CalEventServiceFactory.getService();
86  
87          return calEventService.addEvent(plid, title, description,
88              startDateMonth, startDateDay, startDateYear, startDateHour,
89              startDateMinute, endDateMonth, endDateDay, endDateYear,
90              durationHour, durationMinute, allDay, timeZoneSensitive, type,
91              repeating, recurrence, remindBy, firstReminder, secondReminder,
92              communityPermissions, guestPermissions);
93      }
94  
95      public static void deleteEvent(long eventId)
96          throws com.liferay.portal.PortalException, 
97              com.liferay.portal.SystemException, java.rmi.RemoteException {
98          CalEventService calEventService = CalEventServiceFactory.getService();
99          calEventService.deleteEvent(eventId);
100     }
101 
102     public static java.io.File exportEvent(long eventId)
103         throws com.liferay.portal.PortalException, 
104             com.liferay.portal.SystemException, java.rmi.RemoteException {
105         CalEventService calEventService = CalEventServiceFactory.getService();
106 
107         return calEventService.exportEvent(eventId);
108     }
109 
110     public static java.io.File exportGroupEvents(long plid,
111         java.lang.String fileName)
112         throws com.liferay.portal.PortalException, 
113             com.liferay.portal.SystemException, java.rmi.RemoteException {
114         CalEventService calEventService = CalEventServiceFactory.getService();
115 
116         return calEventService.exportGroupEvents(plid, fileName);
117     }
118 
119     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
120         long eventId)
121         throws com.liferay.portal.PortalException, 
122             com.liferay.portal.SystemException, java.rmi.RemoteException {
123         CalEventService calEventService = CalEventServiceFactory.getService();
124 
125         return calEventService.getEvent(eventId);
126     }
127 
128     public static void importICal4j(long plid, java.io.File file)
129         throws com.liferay.portal.PortalException, 
130             com.liferay.portal.SystemException, java.rmi.RemoteException {
131         CalEventService calEventService = CalEventServiceFactory.getService();
132         calEventService.importICal4j(plid, file);
133     }
134 
135     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
136         long eventId, java.lang.String title, java.lang.String description,
137         int startDateMonth, int startDateDay, int startDateYear,
138         int startDateHour, int startDateMinute, int endDateMonth,
139         int endDateDay, int endDateYear, int durationHour, int durationMinute,
140         boolean allDay, boolean timeZoneSensitive, java.lang.String type,
141         boolean repeating, com.liferay.portal.kernel.cal.Recurrence recurrence,
142         java.lang.String remindBy, int firstReminder, int secondReminder)
143         throws com.liferay.portal.PortalException, 
144             com.liferay.portal.SystemException, java.rmi.RemoteException {
145         CalEventService calEventService = CalEventServiceFactory.getService();
146 
147         return calEventService.updateEvent(eventId, title, description,
148             startDateMonth, startDateDay, startDateYear, startDateHour,
149             startDateMinute, endDateMonth, endDateDay, endDateYear,
150             durationHour, durationMinute, allDay, timeZoneSensitive, type,
151             repeating, recurrence, remindBy, firstReminder, secondReminder);
152     }
153 }