Changeset 543
- Timestamp:
- 06/06/06 15:48:55
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java
r542 r543 1203 1203 if (periodEvents.size() == 0) { 1204 1204 fbc.setType(BwFreeBusyComponent.typeFree); 1205 } else { 1206 fbc.setType(getFreeBusyType(periodEvents)); 1205 1207 } 1206 1208 } else if (periodEvents.size() != 0) { … … 1222 1224 1223 1225 fbc.addPeriod(new Period(psdt, pedt)); 1226 fbc.setType(getFreeBusyType(periodEvents)); 1224 1227 } 1225 1228 } … … 1338 1341 } 1339 1342 1343 private int getFreeBusyType(Collection periodEvents) { 1344 int fbtype = BwFreeBusyComponent.typeFree; 1345 1346 Iterator it = periodEvents.iterator(); 1347 while (it.hasNext()) { 1348 EventInfo ei = (EventInfo)it.next(); 1349 1350 String status = ei.getEvent().getStatus(); 1351 if (status.equals(BwEvent.statusConfirmed)) { 1352 return BwFreeBusyComponent.typeBusy; 1353 } 1354 1355 if (status.equals(BwEvent.statusTentative)) { 1356 fbtype = BwFreeBusyComponent.typeBusyTentative; 1357 } 1358 } 1359 1360 return fbtype; 1361 } 1362 1340 1363 private static class EventPeriod implements Comparable { 1341 1364 DateTime start;
