001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.calendar.service;
022:
023: /**
024: * <a href="CalEventServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.calendar.service.CalEventService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.calendar.service.CalEventServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.calendar.service.CalEventService
047: * @see com.liferay.portlet.calendar.service.CalEventServiceFactory
048: *
049: */
050: public class CalEventServiceUtil {
051: public static com.liferay.portlet.calendar.model.CalEvent addEvent(
052: long plid, java.lang.String title,
053: java.lang.String description, int startDateMonth,
054: int startDateDay, int startDateYear, int startDateHour,
055: int startDateMinute, int endDateMonth, int endDateDay,
056: int endDateYear, int durationHour, int durationMinute,
057: boolean allDay, boolean timeZoneSensitive,
058: java.lang.String type, boolean repeating,
059: com.liferay.portal.kernel.cal.Recurrence recurrence,
060: java.lang.String remindBy, int firstReminder,
061: int secondReminder, boolean addCommunityPermissions,
062: boolean addGuestPermissions)
063: throws com.liferay.portal.PortalException,
064: com.liferay.portal.SystemException,
065: java.rmi.RemoteException {
066: CalEventService calEventService = CalEventServiceFactory
067: .getService();
068:
069: return calEventService.addEvent(plid, title, description,
070: startDateMonth, startDateDay, startDateYear,
071: startDateHour, startDateMinute, endDateMonth,
072: endDateDay, endDateYear, durationHour, durationMinute,
073: allDay, timeZoneSensitive, type, repeating, recurrence,
074: remindBy, firstReminder, secondReminder,
075: addCommunityPermissions, addGuestPermissions);
076: }
077:
078: public static com.liferay.portlet.calendar.model.CalEvent addEvent(
079: long plid, java.lang.String title,
080: java.lang.String description, int startDateMonth,
081: int startDateDay, int startDateYear, int startDateHour,
082: int startDateMinute, int endDateMonth, int endDateDay,
083: int endDateYear, int durationHour, int durationMinute,
084: boolean allDay, boolean timeZoneSensitive,
085: java.lang.String type, boolean repeating,
086: com.liferay.portal.kernel.cal.Recurrence recurrence,
087: java.lang.String remindBy, int firstReminder,
088: int secondReminder,
089: java.lang.String[] communityPermissions,
090: java.lang.String[] guestPermissions)
091: throws com.liferay.portal.PortalException,
092: com.liferay.portal.SystemException,
093: java.rmi.RemoteException {
094: CalEventService calEventService = CalEventServiceFactory
095: .getService();
096:
097: return calEventService.addEvent(plid, title, description,
098: startDateMonth, startDateDay, startDateYear,
099: startDateHour, startDateMinute, endDateMonth,
100: endDateDay, endDateYear, durationHour, durationMinute,
101: allDay, timeZoneSensitive, type, repeating, recurrence,
102: remindBy, firstReminder, secondReminder,
103: communityPermissions, guestPermissions);
104: }
105:
106: public static void deleteEvent(long eventId)
107: throws com.liferay.portal.PortalException,
108: com.liferay.portal.SystemException,
109: java.rmi.RemoteException {
110: CalEventService calEventService = CalEventServiceFactory
111: .getService();
112:
113: calEventService.deleteEvent(eventId);
114: }
115:
116: public static java.io.File exportEvent(long eventId)
117: throws com.liferay.portal.PortalException,
118: com.liferay.portal.SystemException,
119: java.rmi.RemoteException {
120: CalEventService calEventService = CalEventServiceFactory
121: .getService();
122:
123: return calEventService.exportEvent(eventId);
124: }
125:
126: public static java.io.File exportGroupEvents(long plid,
127: java.lang.String fileName)
128: throws com.liferay.portal.PortalException,
129: com.liferay.portal.SystemException,
130: java.rmi.RemoteException {
131: CalEventService calEventService = CalEventServiceFactory
132: .getService();
133:
134: return calEventService.exportGroupEvents(plid, fileName);
135: }
136:
137: public static com.liferay.portlet.calendar.model.CalEvent getEvent(
138: long eventId) throws com.liferay.portal.PortalException,
139: com.liferay.portal.SystemException,
140: java.rmi.RemoteException {
141: CalEventService calEventService = CalEventServiceFactory
142: .getService();
143:
144: return calEventService.getEvent(eventId);
145: }
146:
147: public static void importICal4j(long plid, java.io.File file)
148: throws com.liferay.portal.PortalException,
149: com.liferay.portal.SystemException,
150: java.rmi.RemoteException {
151: CalEventService calEventService = CalEventServiceFactory
152: .getService();
153:
154: calEventService.importICal4j(plid, file);
155: }
156:
157: public static com.liferay.portlet.calendar.model.CalEvent updateEvent(
158: long eventId, java.lang.String title,
159: java.lang.String description, int startDateMonth,
160: int startDateDay, int startDateYear, int startDateHour,
161: int startDateMinute, int endDateMonth, int endDateDay,
162: int endDateYear, int durationHour, int durationMinute,
163: boolean allDay, boolean timeZoneSensitive,
164: java.lang.String type, boolean repeating,
165: com.liferay.portal.kernel.cal.Recurrence recurrence,
166: java.lang.String remindBy, int firstReminder,
167: int secondReminder)
168: throws com.liferay.portal.PortalException,
169: com.liferay.portal.SystemException,
170: java.rmi.RemoteException {
171: CalEventService calEventService = CalEventServiceFactory
172: .getService();
173:
174: return calEventService.updateEvent(eventId, title, description,
175: startDateMonth, startDateDay, startDateYear,
176: startDateHour, startDateMinute, endDateMonth,
177: endDateDay, endDateYear, durationHour, durationMinute,
178: allDay, timeZoneSensitive, type, repeating, recurrence,
179: remindBy, firstReminder, secondReminder);
180: }
181: }
|