You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2012/03/24 15:03:25 UTC

svn commit: r1304797 - in /incubator/openmeetings/trunk/singlewebapp: WebContent/src/modules/lzcalendar/ docs/ src/org/openmeetings/app/data/calendar/beans/ src/org/openmeetings/app/persistence/beans/calendar/ src/org/openmeetings/axis/services/

Author: sebawagner
Date: Sat Mar 24 14:03:24 2012
New Revision: 1304797

URL: http://svn.apache.org/viewvc?rev=1304797&view=rev
Log:
IN PROGRESS - issue OPENMEETINGS-7: Replace lzCalendar with non CPL implementation 
https://issues.apache.org/jira/browse/OPENMEETINGS-7 - Add timezone awareness in Calendar Rest service, fix docs for Calendar WebService

Modified:
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx
    incubator/openmeetings/trunk/singlewebapp/docs/CalendarService.html
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/calendar/beans/AppointmentDTO.java
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/persistence/beans/calendar/Appointment.java
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebService.java
    incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebServiceFacade.java

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx?rev=1304797&r1=1304796&r2=1304797&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzcalendar/lzCalendar.lzx Sat Mar 24 14:03:24 2012
@@ -32,6 +32,11 @@
 	<attribute name="tStartDate" value="null" />
 	<attribute name="tEndDate" value="null" />
 	
+	<!---
+		The user id the calendar will load the events for
+	 -->
+	<attribute name="requestUserId" value="$once{ canvas.user_id }" type="number" />
+	
 	<handler name="oninit">
 		<![CDATA[
 			_mainScrollBar.setAttribute("visibility","hidden");
@@ -101,9 +106,12 @@
 		
 			var downloadurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport
 	                       +canvas.httpRootKey+'services/CalendarService/getAppointmentsByWeekCalendar?'
-	                       //+'SID='+canvas.sessionId
+	                       +'SID='+canvas.sessionId
 	                       +'&firstDayInWeek='+canvas.firstdayinweek
-	                       +'&startDate='+this.currentDate.getFullYear()+"-"+tMonth+"-"+tDay;
+	                       +'&startDate='+this.currentDate.getFullYear()+"-"+tMonth+"-"+tDay
+	                       +'&requestUserId=' + requestUserId
+	                       +'&omTimeZoneId=' + canvas.timeZoneId
+	                       +'&javaTimeZoneName=';
 	       
 	        this.getAppointmentsByWeekCalendar.setAttribute("src",downloadurl);
 	        if ($debug) Debug.write("getAppointmentsByWeekCalendar doRequest 1 ",downloadurl);

Modified: incubator/openmeetings/trunk/singlewebapp/docs/CalendarService.html
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/docs/CalendarService.html?rev=1304797&r1=1304796&r2=1304797&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/docs/CalendarService.html (original)
+++ incubator/openmeetings/trunk/singlewebapp/docs/CalendarService.html Sat Mar 24 14:03:24 2012
@@ -100,12 +100,11 @@ limitations under the License.
                 <div class="navigation_comment"><i >Get all reminder types for calendar events</i></div>
                 </div>
                                                <div>
-                <a href="#main"><b>main</b></a><br/>
-                <div class="navigation_comment"><i ></i></div>
-                </div>
-                                               <div>
                 <a href="#getAppointmentsByWeekCalendar"><b>getAppointmentsByWeekCalendar</b></a><br/>
-                <div class="navigation_comment"><i ></i></div>
+                <div class="navigation_comment"><i >Get the appointments (calendar events) for the given requestUserId <br/>
+ The TimeZone can be either given by the Id of the timezone in the table
+ "om_timezone" with the param timeZoneIdA <br/>
+ Or with the java name of the TimeZone in the param javaTimeZoneName</i></div>
                 </div>
                            </div>
 	   
@@ -1152,57 +1151,102 @@ limitations under the License.
     	   				    		      <div class="method">
 		        <div class="method_header">
 		        <div style="margin-left:10px">
-    			<a name="main" ><b>main</b></a>
-    			</div>
-    			</div>
-    			
-    			Method: <i>main (
-    			    			    			       			   String args
-    			       			    			)
-    			</i><br/>
-    			<p>
-    			  
-    			</p>
-    			<p>
-                  Return Type: void
-                </p>
-    			<p>Params:</p>
-    			    				<b>Warning:</b><i> Params in this method do not seem to be correctly documentated</i>
-    				<br/><br/>
-    			    			
-    			    				<i>No Params</i>
-    			    			<br/>
-    			REST Sample Call/URL:<br/>
-    			    			    				    												<a href="http://localhost:5080/openmeetings/services/CalendarService/main?args=VALUE">http://localhost:5080/openmeetings/services/CalendarService/main?args=VALUE</a>
-    			</a>
-    		  </div>
-    	   				    		      <div class="method">
-		        <div class="method_header">
-		        <div style="margin-left:10px">
     			<a name="getAppointmentsByWeekCalendar" ><b>getAppointmentsByWeekCalendar</b></a>
     			</div>
     			</div>
     			
     			Method: <i>getAppointmentsByWeekCalendar (
-    			    			    			       			   int firstDayInWeek
+    			    			    			       			   String SID
+    			       			    			       			     , 
+    			       			   int firstDayInWeek
     			       			    			       			     , 
     			       			   Date startDate
+    			       			    			       			     , 
+    			       			   Long requestUserId
+    			       			    			       			     , 
+    			       			   Long omTimeZoneId
+    			       			    			       			     , 
+    			       			   String javaTimeZoneName
     			       			    			)
     			</i><br/>
     			<p>
-    			  
+    			  Get the appointments (calendar events) for the given requestUserId <br/>
+ The TimeZone can be either given by the Id of the timezone in the table
+ "om_timezone" with the param timeZoneIdA <br/>
+ Or with the java name of the TimeZone in the param javaTimeZoneName
     			</p>
     			<p>
                   Return Type: java.util.List
                 </p>
     			<p>Params:</p>
-    			    				<b>Warning:</b><i> Params in this method do not seem to be correctly documentated</i>
-    				<br/><br/>
     			    			
-    			    				<i>No Params</i>
+    				    			<table rules="all" border="1">
+	    			   <thead>
+	    			   <tr>
+	    			     <th width="200" align="left">Type</th>
+	    			     <th width="200" align="left">Fieldname</th>
+	    			     <th width="400" align="left">Description</th>
+	    			   </tr>
+	    			   </thead>
+	    			   <tbody>
+	    			   	    			   	    			   <tr>
+	                     <td valign="top">
+	                     		                     		String
+	                     		                     </td>
+	                     <td valign="top">SID</td>
+	                     <td valign="top">a valid user id</td>
+	                   </tr>
+	                   
+	                   	                   	    			   <tr>
+	                     <td valign="top">
+	                     		                     		int
+	                     		                     </td>
+	                     <td valign="top">firstDayInWeek</td>
+	                     <td valign="top">the first dayin week, 0=Sunday, 1=Monday, ...</td>
+	                   </tr>
+	                   
+	                   	                   	    			   <tr>
+	                     <td valign="top">
+	                     		                     		Date
+	                     		                     </td>
+	                     <td valign="top">startDate</td>
+	                     <td valign="top">the date it should start with</td>
+	                   </tr>
+	                   
+	                   	                   	    			   <tr>
+	                     <td valign="top">
+	                     		                     		Long
+	                     		                     </td>
+	                     <td valign="top">requestUserId</td>
+	                     <td valign="top">the user id the calendar events are requested, if it is not
+            the user id of the SID then the SID's user needs to have the
+            right to watch those events</td>
+	                   </tr>
+	                   
+	                   	                   	    			   <tr>
+	                     <td valign="top">
+	                     		                     		Long
+	                     		                     </td>
+	                     <td valign="top">omTimeZoneId</td>
+	                     <td valign="top">the id of the timezone (alternativly use javaTimeZoneName)</td>
+	                   </tr>
+	                   
+	                   	                   	    			   <tr>
+	                     <td valign="top">
+	                     		                     		String
+	                     		                     </td>
+	                     <td valign="top">javaTimeZoneName</td>
+	                     <td valign="top">the name of the java time zone, see <a
+            href="http://en.wikipedia.org/wiki/Time_zone#Java"
+            target="_blank"
+            >http://en.wikipedia.org/wiki/Time_zone#Java</a></td>
+	                   </tr>
+	                   
+	                   	                   	                   </tbody>
+	    			</table>
     			    			<br/>
     			REST Sample Call/URL:<br/>
-    			    			    				    								    				    												<a href="http://localhost:5080/openmeetings/services/CalendarService/getAppointmentsByWeekCalendar?firstDayInWeek=VALUE&startDate=VALUE">http://localhost:5080/openmeetings/services/CalendarService/getAppointmentsByWeekCalendar?firstDayInWeek=VALUE&startDate=VALUE</a>
+    			    			    				    								    				    								    				    								    				    								    				    								    				    												<a href="http://localhost:5080/openmeetings/services/CalendarService/getAppointmentsByWeekCalendar?SID=VALUE&firstDayInWeek=VALUE&startDate=VALUE&requestUserId=VALUE&omTimeZoneId=VALUE&javaTimeZoneName=VALUE">http://localhost:5080/openmeetings/services/CalendarService/getAppointmentsByWeekCalendar?SID=VALUE&firstDayInWeek=VALUE&startDate=VALUE&requestUserId=VALUE&omTimeZoneId=VALUE&javaTimeZoneName=VALUE</a>
     			</a>
     		  </div>
     	   			

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/calendar/beans/AppointmentDTO.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/calendar/beans/AppointmentDTO.java?rev=1304797&r1=1304796&r2=1304797&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/calendar/beans/AppointmentDTO.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/calendar/beans/AppointmentDTO.java Sat Mar 24 14:03:24 2012
@@ -3,6 +3,7 @@ package org.openmeetings.app.data.calend
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.List;
+import java.util.TimeZone;
 
 import org.openmeetings.app.persistence.beans.calendar.Appointment;
 import org.openmeetings.app.persistence.beans.calendar.MeetingMember;
@@ -22,7 +23,7 @@ public class AppointmentDTO {
 	private Boolean isPasswordProtected;
 	private List<MeetingMemberDTO> meetingMember = new ArrayList<MeetingMemberDTO>();
 
-	public AppointmentDTO(Appointment appointment) {
+	public AppointmentDTO(Appointment appointment, TimeZone timezone) {
 		appointmentId = appointment.getAppointmentId();
 		categoryId = (appointment.getAppointmentCategory() != null) ? appointment
 				.getAppointmentCategory().getCategoryId() : null;
@@ -36,12 +37,8 @@ public class AppointmentDTO {
 		title = appointment.getAppointmentName();
 		location = appointment.getAppointmentLocation();
 		comment = appointment.getAppointmentDescription();
-		Calendar calStart = Calendar.getInstance();
-		calStart.setTime(appointment.getAppointmentStarttime());
-		start = calStart;
-		Calendar calEnd = Calendar.getInstance();
-		calEnd.setTime(appointment.getAppointmentEndtime());
-		end = calEnd;
+		start = appointment.appointmentStartAsCalendar(timezone);
+		end = appointment.appointmentEndAsCalendar(timezone);
 		isPasswordProtected = appointment.getIsPasswordProtected();
 		for (MeetingMember meetingMemberItem : appointment.getMeetingMember()) {
 			meetingMember.add(new MeetingMemberDTO(meetingMemberItem));

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/persistence/beans/calendar/Appointment.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/persistence/beans/calendar/Appointment.java?rev=1304797&r1=1304796&r2=1304797&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/persistence/beans/calendar/Appointment.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/persistence/beans/calendar/Appointment.java Sat Mar 24 14:03:24 2012
@@ -22,6 +22,7 @@ import java.io.Serializable;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
+import java.util.TimeZone;
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -142,8 +143,8 @@ public class Appointment implements Seri
 		return appointmentStarttime;
 	}
 
-	public Calendar appointmentStartAsCalendar() {
-		Calendar cal = Calendar.getInstance();
+	public Calendar appointmentStartAsCalendar(TimeZone timeZone) {
+		Calendar cal = Calendar.getInstance(timeZone);
 		cal.setTime(appointmentStarttime);
 		return cal;
 	}
@@ -156,8 +157,8 @@ public class Appointment implements Seri
 		return appointmentEndtime;
 	}
 
-	public Calendar appointmentEndAsCalendar() {
-		Calendar cal = Calendar.getInstance();
+	public Calendar appointmentEndAsCalendar(TimeZone timeZone) {
+		Calendar cal = Calendar.getInstance(timeZone);
 		cal.setTime(appointmentEndtime);
 		return cal;
 	}

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebService.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebService.java?rev=1304797&r1=1304796&r2=1304797&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebService.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebService.java Sat Mar 24 14:03:24 2012
@@ -24,6 +24,7 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TimeZone;
 
 import org.apache.axis2.AxisFault;
 import org.openmeetings.app.OpenmeetingsVariables;
@@ -44,6 +45,7 @@ import org.openmeetings.app.persistence.
 import org.openmeetings.app.persistence.beans.rooms.RoomTypes;
 import org.openmeetings.app.persistence.beans.rooms.Rooms;
 import org.openmeetings.app.persistence.beans.user.Users;
+import org.openmeetings.utils.math.TimezoneUtil;
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -76,6 +78,8 @@ public class CalendarWebService {
 	private AppointmentCategoryDaoImpl appointmentCategoryDaoImpl;
 	@Autowired
 	private AppointmentReminderTypDaoImpl appointmentReminderTypDaoImpl;
+	@Autowired
+	private TimezoneUtil timezoneUtil;
 
 	/**
 	 * Load appointments by a start / end range for the current SID
@@ -419,8 +423,7 @@ public class CalendarWebService {
 			Calendar appointmentend, Boolean isDaily, Boolean isWeekly,
 			Boolean isMonthly, Boolean isYearly, Long categoryId, Long remind,
 			String[] mmClient, Long roomType, String baseurl, Long languageId,
-			Boolean isPasswordProtected, String password)
-			throws AxisFault {
+			Boolean isPasswordProtected, String password) throws AxisFault {
 		try {
 
 			Long users_id = sessionManagement.checkSession(SID);
@@ -478,8 +481,9 @@ public class CalendarWebService {
 					appointmentName, appointmentDescription, appointmentstart
 							.getTime(), appointmentend.getTime(), isDaily,
 					isWeekly, isMonthly, isYearly, categoryId, remind, newList,
-					users_id, baseurl, languageId, isPasswordProtected, password, user
-							.getOmTimeZone().getIcal(), appointmentLocation);
+					users_id, baseurl, languageId, isPasswordProtected,
+					password, user.getOmTimeZone().getIcal(),
+					appointmentLocation);
 
 		} catch (Exception err) {
 			log.error("[updateAppointment]", err);
@@ -648,99 +652,151 @@ public class CalendarWebService {
 		return null;
 	}
 
-	public static void main(String... args) {
-
-		Calendar cal = Calendar.getInstance();
-		cal.set(Calendar.MONTH, 1);
-
-		new CalendarWebService()
-				.getAppointmentsByWeekCalendar(1, cal.getTime());
-
-	}
-
-	public List<Week> getAppointmentsByWeekCalendar(int firstDayInWeek,
-			Date startDate) {
+	/**
+	 * Get the appointments (calendar events) for the given requestUserId <br/>
+	 * The TimeZone can be either given by the Id of the timezone in the table
+	 * "om_timezone" with the param timeZoneIdA <br/>
+	 * Or with the java name of the TimeZone in the param javaTimeZoneName
+	 * 
+	 * @param SID
+	 *            a valid user id
+	 * @param firstDayInWeek
+	 *            the first dayin week, 0=Sunday, 1=Monday, ...
+	 * @param startDate
+	 *            the date it should start with
+	 * @param requestUserId
+	 *            the user id the calendar events are requested, if it is not
+	 *            the user id of the SID then the SID's user needs to have the
+	 *            right to watch those events
+	 * @param omTimeZoneId
+	 *            the id of the timezone (alternativly use javaTimeZoneName)
+	 * @param javaTimeZoneName
+	 *            the name of the java time zone, see <a
+	 *            href="http://en.wikipedia.org/wiki/Time_zone#Java"
+	 *            target="_blank"
+	 *            >http://en.wikipedia.org/wiki/Time_zone#Java</a>
+	 * @return
+	 * @throws AxisFault
+	 */
+	public List<Week> getAppointmentsByWeekCalendar(String SID,
+			int firstDayInWeek, Date startDate, Long requestUserId,
+			Long omTimeZoneId, String javaTimeZoneName) throws AxisFault {
+		try {
 
-		// Calculate the first day of a calendar based on the first showing day
-		// of the week
-		List<Week> weeks = new ArrayList<Week>(6);
-		Calendar currentDate = Calendar.getInstance();
-		currentDate.setTime(startDate);
-		currentDate.set(Calendar.DATE, 1);
+			Long users_id = sessionManagement.checkSession(SID);
+			Long user_level = userManagement.getUserLevelByID(users_id);
+			if (authLevelManagement.checkUserLevel(user_level)) {
 
-		int currentWeekDay = currentDate.get(Calendar.DAY_OF_WEEK);
+				TimeZone timezone = null;
 
-		Calendar startWeekDay = Calendar.getInstance();
+				if (javaTimeZoneName != null && !javaTimeZoneName.isEmpty()) {
+					timezone = TimeZone.getTimeZone(javaTimeZoneName);
+					if (timezone == null) {
+						throw new Exception("Invalid javaTimeZoneName given");
+					}
+				}
 
-		log.debug("currentWeekDay -- " + currentWeekDay);
-		log.debug("firstDayInWeek -- " + firstDayInWeek);
+				if (omTimeZoneId > 0) {
+					timezone = timezoneUtil
+							.getTimezoneByOmTimeZoneId(omTimeZoneId);
+				}
 
-		if (currentWeekDay == firstDayInWeek) {
-			
-			log.debug("ARE equal currentWeekDay -- ");
-			
-			startWeekDay.setTime(currentDate.getTime());
-			
-		} else {
-			
-			startWeekDay.setTimeInMillis((currentDate.getTimeInMillis() - ((currentWeekDay - 1) * 86400000)));
+				// Calculate the first day of a calendar based on the first
+				// showing day of the week
+				List<Week> weeks = new ArrayList<Week>(6);
+				Calendar currentDate = Calendar.getInstance();
+				currentDate.setTime(startDate);
+				currentDate.set(Calendar.DATE, 1);
 
-			if (currentWeekDay > firstDayInWeek) {
-				startWeekDay.setTimeInMillis(startWeekDay.getTimeInMillis()
-						+ (firstDayInWeek * 86400000));
-			} else {
-				startWeekDay.setTimeInMillis(startWeekDay.getTimeInMillis()
-						- (firstDayInWeek * 86400000));
-			}
+				int currentWeekDay = currentDate.get(Calendar.DAY_OF_WEEK);
 
-		}
+				Calendar startWeekDay = Calendar.getInstance();
 
-		Calendar calStart = Calendar.getInstance();
-		calStart.setTime(startWeekDay.getTime());
+				log.debug("currentWeekDay -- " + currentWeekDay);
+				log.debug("firstDayInWeek -- " + firstDayInWeek);
 
-		Calendar calEnd = Calendar.getInstance();
-		// every month page in our calendar shows 42 days
-		calEnd.setTime(new Date(startWeekDay.getTime().getTime()
-				+ (42L * 86400000L)));
+				if (currentWeekDay == firstDayInWeek) {
 
-		List<Appointment> appointments = appointmentDao.getAppointmentsByRange(
-				1L, calStart.getTime(), calEnd.getTime());
+					log.debug("ARE equal currentWeekDay -- ");
 
-		log.debug("startWeekDay 2" + startWeekDay.getTime());
-		log.debug("startWeekDay Number of appointments " + appointments.size());
+					startWeekDay.setTime(currentDate.getTime());
 
-		long z = 0;
+				} else {
 
-		for (int k = 0; k < 6; k++) { // 6 weeks per monthly summary
+					startWeekDay
+							.setTimeInMillis((currentDate.getTimeInMillis() - ((currentWeekDay - 1) * 86400000)));
 
-			Week week = new Week();
+					if (currentWeekDay > firstDayInWeek) {
+						startWeekDay.setTimeInMillis(startWeekDay
+								.getTimeInMillis()
+								+ (firstDayInWeek * 86400000));
+					} else {
+						startWeekDay.setTimeInMillis(startWeekDay
+								.getTimeInMillis()
+								- (firstDayInWeek * 86400000));
+					}
 
-			for (int i = 0; i < 7; i++) { // 7 days a week
+				}
 
-				Calendar tCal = Calendar.getInstance();
-				tCal.setTimeInMillis(startWeekDay.getTimeInMillis()
-						+ (z * 86400000L));
+				Calendar calStart = Calendar.getInstance(timezone);
+				calStart.setTime(startWeekDay.getTime());
 
-				Day day = new Day(tCal.getTime());
+				Calendar calEnd = Calendar.getInstance(timezone);
+				// every month page in our calendar shows 42 days
+				calEnd.setTime(new Date(startWeekDay.getTime().getTime()
+						+ (42L * 86400000L)));
+
+				List<Appointment> appointments = appointmentDao
+						.getAppointmentsByRange(requestUserId,
+								calStart.getTime(), calEnd.getTime());
+
+				log.debug("startWeekDay 2" + startWeekDay.getTime());
+				log.debug("startWeekDay Number of appointments "
+						+ appointments.size());
+
+				long z = 0;
+
+				for (int k = 0; k < 6; k++) { // 6 weeks per monthly summary
+
+					Week week = new Week();
+
+					for (int i = 0; i < 7; i++) { // 7 days a week
+
+						Calendar tCal = Calendar.getInstance();
+						tCal.setTimeInMillis(startWeekDay.getTimeInMillis()
+								+ (z * 86400000L));
+
+						Day day = new Day(tCal.getTime());
+
+						for (Appointment appointment : appointments) {
+							if (appointment
+									.appointmentStartAsCalendar(timezone).get(
+											Calendar.MONTH) == tCal
+									.get(Calendar.MONTH)
+									&& appointment.appointmentStartAsCalendar(
+											timezone).get(Calendar.DATE) == tCal
+											.get(Calendar.DATE)) {
+								day.getAppointments().add(
+										new AppointmentDTO(appointment,
+												timezone));
+							}
+						}
 
-				for (Appointment appointment : appointments) {
-					if (appointment.appointmentStartAsCalendar().get(
-							Calendar.MONTH) == tCal.get(Calendar.MONTH)
-							&& appointment.appointmentStartAsCalendar().get(
-									Calendar.DATE) == tCal.get(Calendar.DATE)) {
-						day.getAppointments().add(
-								new AppointmentDTO(appointment));
+						week.getDays().add(day);
+						z++;
 					}
+
+					weeks.add(week);
 				}
 
-				week.getDays().add(day);
-				z++;
+				return weeks;
+
 			}
 
-			weeks.add(week);
+		} catch (Exception err) {
+			log.error("[getAppointmentReminderTypList]", err);
 		}
-
-		return weeks;
+		return null;
 	}
 
 }

Modified: incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebServiceFacade.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebServiceFacade.java?rev=1304797&r1=1304796&r2=1304797&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebServiceFacade.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebServiceFacade.java Sat Mar 24 14:03:24 2012
@@ -144,10 +144,12 @@ public class CalendarWebServiceFacade {
 		return getCalendarServiceProxy().getAppointmentReminderTypList(SID);
 	}
 
-	public List<Week> getAppointmentsByWeekCalendar(int firstDayInWeek,
-			Date startDate) throws AxisFault {
-		return getCalendarServiceProxy().getAppointmentsByWeekCalendar(
-				firstDayInWeek, startDate);
+	public List<Week> getAppointmentsByWeekCalendar(String SID,
+			int firstDayInWeek, Date startDate, Long requestUserId,
+			Long omTimeZoneId, String javaTimeZoneName) throws AxisFault {
+		return getCalendarServiceProxy().getAppointmentsByWeekCalendar(SID,
+				firstDayInWeek, startDate, requestUserId, omTimeZoneId,
+				javaTimeZoneName);
 	}
 
 }