Changeset 543

Show
Ignore:
Timestamp:
06/06/06 15:48:55
Author:
douglm
Message:

Fix free/busy so tentative shows up.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java

    r542 r543  
    12031203            if (periodEvents.size() == 0) { 
    12041204              fbc.setType(BwFreeBusyComponent.typeFree); 
     1205            } else { 
     1206              fbc.setType(getFreeBusyType(periodEvents)); 
    12051207            } 
    12061208          } else if (periodEvents.size() != 0) { 
     
    12221224 
    12231225            fbc.addPeriod(new Period(psdt, pedt)); 
     1226            fbc.setType(getFreeBusyType(periodEvents)); 
    12241227          } 
    12251228        } 
     
    13381341  } 
    13391342 
     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 
    13401363  private static class EventPeriod implements Comparable { 
    13411364    DateTime start;