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  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="CalEventServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link CalEventService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       CalEventService
45   * @generated
46   */
47  public class CalEventServiceUtil {
48      public static com.liferay.portlet.calendar.model.CalEvent addEvent(
49          java.lang.String title, java.lang.String description,
50          int startDateMonth, int startDateDay, int startDateYear,
51          int startDateHour, int startDateMinute, int endDateMonth,
52          int endDateDay, int endDateYear, int durationHour, int durationMinute,
53          boolean allDay, boolean timeZoneSensitive, java.lang.String type,
54          boolean repeating,
55          com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
56          int firstReminder, int secondReminder,
57          com.liferay.portal.service.ServiceContext serviceContext)
58          throws com.liferay.portal.PortalException,
59              com.liferay.portal.SystemException {
60          return getService()
61                     .addEvent(title, description, startDateMonth, startDateDay,
62              startDateYear, startDateHour, startDateMinute, endDateMonth,
63              endDateDay, endDateYear, durationHour, durationMinute, allDay,
64              timeZoneSensitive, type, repeating, recurrence, remindBy,
65              firstReminder, secondReminder, serviceContext);
66      }
67  
68      public static void deleteEvent(long eventId)
69          throws com.liferay.portal.PortalException,
70              com.liferay.portal.SystemException {
71          getService().deleteEvent(eventId);
72      }
73  
74      public static java.io.File exportEvent(long eventId)
75          throws com.liferay.portal.PortalException,
76              com.liferay.portal.SystemException {
77          return getService().exportEvent(eventId);
78      }
79  
80      public static java.io.File exportGroupEvents(long groupId,
81          java.lang.String fileName)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().exportGroupEvents(groupId, fileName);
85      }
86  
87      public static com.liferay.portlet.calendar.model.CalEvent getEvent(
88          long eventId)
89          throws com.liferay.portal.PortalException,
90              com.liferay.portal.SystemException {
91          return getService().getEvent(eventId);
92      }
93  
94      public static void importICal4j(long groupId, java.io.File file)
95          throws com.liferay.portal.PortalException,
96              com.liferay.portal.SystemException {
97          getService().importICal4j(groupId, file);
98      }
99  
100     public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
101         long eventId, java.lang.String title, java.lang.String description,
102         int startDateMonth, int startDateDay, int startDateYear,
103         int startDateHour, int startDateMinute, int endDateMonth,
104         int endDateDay, int endDateYear, int durationHour, int durationMinute,
105         boolean allDay, boolean timeZoneSensitive, java.lang.String type,
106         boolean repeating,
107         com.liferay.portal.kernel.cal.TZSRecurrence recurrence, int remindBy,
108         int firstReminder, int secondReminder,
109         com.liferay.portal.service.ServiceContext serviceContext)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException {
112         return getService()
113                    .updateEvent(eventId, title, description, startDateMonth,
114             startDateDay, startDateYear, startDateHour, startDateMinute,
115             endDateMonth, endDateDay, endDateYear, durationHour,
116             durationMinute, allDay, timeZoneSensitive, type, repeating,
117             recurrence, remindBy, firstReminder, secondReminder, serviceContext);
118     }
119 
120     public static CalEventService getService() {
121         if (_service == null) {
122             _service = (CalEventService)PortalBeanLocatorUtil.locate(CalEventService.class.getName());
123         }
124 
125         return _service;
126     }
127 
128     public void setService(CalEventService service) {
129         _service = service;
130     }
131 
132     private static CalEventService _service;
133 }