1   /**
2    * Copyright (c) 2000-2008 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  /**
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   * <code>com.liferay.portlet.calendar.service.CalEventService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.calendar.service.CalEventServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.calendar.service.CalEventService
50   * @see com.liferay.portlet.calendar.service.CalEventServiceFactory
51   *
52   */
53  public class CalEventServiceUtil {
54      public static com.liferay.portlet.calendar.model.CalEvent addEvent(
55          long plid, java.lang.String title, java.lang.String description,
56          int startDateMonth, int startDateDay, int startDateYear,
57          int startDateHour, int startDateMinute, int endDateMonth,
58          int endDateDay, int endDateYear, int durationHour, int durationMinute,
59          boolean allDay, boolean timeZoneSensitive, java.lang.String type,
60          boolean repeating, com.liferay.portal.kernel.cal.Recurrence recurrence,
61          java.lang.String remindBy, int firstReminder, int secondReminder,
62          boolean addCommunityPermissions, boolean addGuestPermissions)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException, java.rmi.RemoteException {
65          CalEventService calEventService = CalEventServiceFactory.getService();
66  
67          return calEventService.addEvent(plid, title, description,
68              startDateMonth, startDateDay, startDateYear, startDateHour,
69              startDateMinute, endDateMonth, endDateDay, endDateYear,
70              durationHour, durationMinute, allDay, timeZoneSensitive, type,
71              repeating, recurrence, remindBy, firstReminder, secondReminder,
72              addCommunityPermissions, addGuestPermissions);
73      }
74  
75      public static com.liferay.portlet.calendar.model.CalEvent addEvent(
76          long plid, java.lang.String title, java.lang.String description,
77          int startDateMonth, int startDateDay, int startDateYear,
78          int startDateHour, int startDateMinute, int endDateMonth,
79          int endDateDay, int endDateYear, int durationHour, int durationMinute,
80          boolean allDay, boolean timeZoneSensitive, java.lang.String type,
81          boolean repeating, com.liferay.portal.kernel.cal.Recurrence recurrence,
82          java.lang.String remindBy, int firstReminder, int secondReminder,
83          java.lang.String[] communityPermissions,
84          java.lang.String[] guestPermissions)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException, java.rmi.RemoteException {
87          CalEventService calEventService = CalEventServiceFactory.getService();
88  
89          return calEventService.addEvent(plid, title, description,
90              startDateMonth, startDateDay, startDateYear, startDateHour,
91              startDateMinute, endDateMonth, endDateDay, endDateYear,
92              durationHour, durationMinute, allDay, timeZoneSensitive, type,
93              repeating, recurrence, remindBy, firstReminder, secondReminder,
94              communityPermissions, guestPermissions);
95      }
96  
97      public static void deleteEvent(long eventId)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException, java.rmi.RemoteException {
100         CalEventService calEventService = CalEventServiceFactory.getService();
101 
102         calEventService.deleteEvent(eventId);
103     }
104 
105     public static java.io.File exportEvent(long eventId)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException, java.rmi.RemoteException {
108         CalEventService calEventService = CalEventServiceFactory.getService();
109 
110         return calEventService.exportEvent(eventId);
111     }
112 
113     public static java.io.File exportGroupEvents(long plid,
114         java.lang.String fileName)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException, java.rmi.RemoteException {
117         CalEventService calEventService = CalEventServiceFactory.getService();
118 
119         return calEventService.exportGroupEvents(plid, fileName);
120     }
121 
122     public static com.liferay.portlet.calendar.model.CalEvent getEvent(
123         long eventId)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException, java.rmi.RemoteException {
126         CalEventService calEventService = CalEventServiceFactory.getService();
127 
128         return calEventService.getEvent(eventId);
129     }
130 
131     public static void importICal4j(long plid, java.io.File file)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException, java.rmi.RemoteException {
134         CalEventService calEventService = CalEventServiceFactory.getService();
135 
136         calEventService.importICal4j(plid, file);
137     }
138 
139     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
140         long eventId, java.lang.String title, java.lang.String description,
141         int startDateMonth, int startDateDay, int startDateYear,
142         int startDateHour, int startDateMinute, int endDateMonth,
143         int endDateDay, int endDateYear, int durationHour, int durationMinute,
144         boolean allDay, boolean timeZoneSensitive, java.lang.String type,
145         boolean repeating, com.liferay.portal.kernel.cal.Recurrence recurrence,
146         java.lang.String remindBy, int firstReminder, int secondReminder)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException, java.rmi.RemoteException {
149         CalEventService calEventService = CalEventServiceFactory.getService();
150 
151         return calEventService.updateEvent(eventId, title, description,
152             startDateMonth, startDateDay, startDateYear, startDateHour,
153             startDateMinute, endDateMonth, endDateDay, endDateYear,
154             durationHour, durationMinute, allDay, timeZoneSensitive, type,
155             repeating, recurrence, remindBy, firstReminder, secondReminder);
156     }
157 }