Changeset 170
- Timestamp:
- 02/17/06 16:42:53
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/calendar3/docs/todo.txt
r164 r170 14 14 calendar3/webtest (recurse) 15 15 16 -------------------------------------------------------------------------------- 17 Testing: 18 Add events at boundaries - start/end of day, week, month. 19 20 Switch displays and ensure they turn up. 16 21 -------------------------------------------------------------------------------- 17 22 update quickstart stuff trunk/calendar3/icalendar/src/org/bedework/icalendar/IcalTranslator.java
r2 r170 56 56 57 57 import org.bedework.calfacade.BwEvent; 58 import org.bedework.calfacade.BwUser; 58 59 import org.bedework.calfacade.CalFacadeException; 59 import org.bedework.calfacade.CalFacadeUtil;60 60 import org.bedework.calfacade.svc.EventInfo; 61 61 … … 80 80 import java.io.Serializable; 81 81 import java.util.Collection; 82 import java.util.HashMap; 82 83 import java.util.Iterator; 83 84 import java.util.Vector; … … 170 171 return null; 171 172 } 173 174 HashMap added = new HashMap(); 172 175 173 176 try { … … 175 178 176 179 /* Add referenced timezones to the calendar */ 177 addIcalTimezones(cal, val );180 addIcalTimezones(cal, val, added); 178 181 179 182 /* Add it to the calendar */ … … 198 201 return null; 199 202 } 203 204 HashMap added = new HashMap(); 200 205 201 206 try { 202 207 Calendar cal = newIcal(); 203 204 /* Add referenced timezones to the calendar */205 //addIcalTimezones(cal, val);206 208 207 209 Iterator it = vals.iterator(); 208 210 while (it.hasNext()) { 209 211 BwEvent val = (BwEvent)it.next(); 212 213 /* Add referenced timezones to the calendar */ 214 addIcalTimezones(cal, val, added); 210 215 211 216 /* Add it to the calendar */ … … 484 489 * and add it to the calendar. 485 490 */ 486 private void addIcalTimezones(Calendar cal, BwEvent ev) throws CalFacadeException { 491 private void addIcalTimezones(Calendar cal, BwEvent ev, 492 HashMap added) throws CalFacadeException { 493 BwUser owner = ev.getOwner(); 494 495 addIcalTimezone(cal, ev.getDtstart().getTzid(), owner, added); 496 497 if (ev.getEndType() == BwEvent.endTypeDate) { 498 addIcalTimezone(cal, ev.getDtend().getTzid(), owner, added); 499 } 500 } 501 502 private void addIcalTimezone(Calendar cal, String tzid, 503 BwUser owner, 504 HashMap added) throws CalFacadeException { 487 505 VTimeZone vtz; 488 String stzid = ev.getDtstart().getTzid(); 506 507 if ((tzid == null) || added.containsKey(tzid)) { 508 return; 509 } 489 510 490 511 if (debug) { 491 debugMsg("Look for timezone with id " + stzid); 492 } 493 494 if (stzid != null) { 495 vtz = cb.findTimeZone(stzid, ev.getOwner()); 496 if (vtz != null) { 497 if (debug) { 498 debugMsg("found timezone with id " + stzid); 499 } 500 cal.getComponents().add(vtz); 501 } else if (debug) { 502 debugMsg("Didn't find timezone with id " + stzid); 503 } 504 } 505 506 if (ev.getEndType() == BwEvent.endTypeDate) { 507 String etzid = ev.getDtend().getTzid(); 508 509 if ((etzid != null) && !CalFacadeUtil.eqObjval(etzid, stzid)) { 510 vtz = cb.findTimeZone(etzid, ev.getOwner()); 511 if (vtz != null) { 512 cal.getComponents().add(vtz); 513 } 514 } 515 } 512 debugMsg("Look for timezone with id " + tzid); 513 } 514 515 vtz = cb.findTimeZone(tzid, owner); 516 if (vtz != null) { 517 if (debug) { 518 debugMsg("found timezone with id " + tzid); 519 } 520 cal.getComponents().add(vtz); 521 } else if (debug) { 522 debugMsg("Didn't find timezone with id " + tzid); 523 } 524 525 added.put(tzid, null); 516 526 } 517 527 trunk/calendar3/webcommon/src/org/bedework/webcommon/misc/ExportAction.java
r119 r170 162 162 } 163 163 164 IcalTranslator ical = new IcalTranslator(svci.getIcalCallback()); 164 IcalTranslator ical = new IcalTranslator(svci.getIcalCallback(), 165 form.getDebug()); 165 166 166 167 Calendar vcal = ical.toIcal(evs);
