org.jasig.schedassist.model
Class VisibleScheduleBuilder

java.lang.Object
  extended by org.jasig.schedassist.model.VisibleScheduleBuilder
All Implemented Interfaces:
IVisibleScheduleBuilder

public class VisibleScheduleBuilder
extends Object
implements IVisibleScheduleBuilder

This class implements the mechanism of merging the IScheduleOwner's AvailableSchedule and the IScheduleOwner's Calendar for an IScheduleVisitor.

Version:
$Id: VisibleScheduleBuilder.java 2530 2010-09-10 20:21:16Z npblair $
Author:
Nicholas Blair, nblair@doit.wisc.edu

Field Summary
static String ATTENDING
           
static String BUSY
           
static String FREE
           
 
Constructor Summary
VisibleScheduleBuilder()
          Default Constructor, will set the eventUtils field to DefaultEventUtilsImpl.
VisibleScheduleBuilder(IEventUtils eventUtils)
           
 
Method Summary
 VisibleSchedule calculateVisibleSchedule(Date startTime, Date endTime, net.fortuna.ical4j.model.Calendar calendar, AvailableSchedule schedule, IScheduleOwner owner)
          This method should simply delegate to IVisibleScheduleBuilder.calculateVisibleSchedule(Date, Date, Calendar, AvailableSchedule, IScheduleOwner, IScheduleVisitor), passing null in for the IScheduleVisitor argument.
 VisibleSchedule calculateVisibleSchedule(Date startTime, Date endTime, net.fortuna.ical4j.model.Calendar calendar, AvailableSchedule schedule, IScheduleOwner owner, IScheduleVisitor visitor)
          Core algorithm for calculating a VisibleSchedule for an IScheduleVisitor viewing an IScheduleOwner's account.
protected  VisibleSchedule calculateVisibleScheduleNoAttendingCheck(Date startTime, Date endTime, net.fortuna.ical4j.model.Calendar calendar, AvailableSchedule schedule, MeetingDurations meetingDurations, ICalendarAccount calendarAccount)
           
 VisibleSchedule calculateVisitorConflicts(Date startTime, Date endTime, net.fortuna.ical4j.model.Calendar calendar, AvailableSchedule schedule, MeetingDurations meetingDurations, IScheduleVisitor visitor)
          This method is intended to provide a means for incorporating the IScheduleVisitor's own calendar data within the display of an IScheduleOwners schedule.
 void setEventUtils(IEventUtils eventUtils)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FREE

public static final String FREE
See Also:
Constant Field Values

BUSY

public static final String BUSY
See Also:
Constant Field Values

ATTENDING

public static final String ATTENDING
See Also:
Constant Field Values
Constructor Detail

VisibleScheduleBuilder

public VisibleScheduleBuilder()
Default Constructor, will set the eventUtils field to DefaultEventUtilsImpl.


VisibleScheduleBuilder

public VisibleScheduleBuilder(IEventUtils eventUtils)
Parameters:
eventUtils -
Method Detail

setEventUtils

public void setEventUtils(IEventUtils eventUtils)
Parameters:
eventUtils - the eventUtils to set

calculateVisibleSchedule

public VisibleSchedule calculateVisibleSchedule(Date startTime,
                                                Date endTime,
                                                net.fortuna.ical4j.model.Calendar calendar,
                                                AvailableSchedule schedule,
                                                IScheduleOwner owner)
Description copied from interface: IVisibleScheduleBuilder
This method should simply delegate to IVisibleScheduleBuilder.calculateVisibleSchedule(Date, Date, Calendar, AvailableSchedule, IScheduleOwner, IScheduleVisitor), passing null in for the IScheduleVisitor argument. As such, it will never return appointments with "ATTENDING" status (only FREE or BUSY).

Specified by:
calculateVisibleSchedule in interface IVisibleScheduleBuilder
Returns:
an appropriate VisibleSchedule

calculateVisibleSchedule

public VisibleSchedule calculateVisibleSchedule(Date startTime,
                                                Date endTime,
                                                net.fortuna.ical4j.model.Calendar calendar,
                                                AvailableSchedule schedule,
                                                IScheduleOwner owner,
                                                IScheduleVisitor visitor)
Description copied from interface: IVisibleScheduleBuilder
Core algorithm for calculating a VisibleSchedule for an IScheduleVisitor viewing an IScheduleOwner's account.

Specified by:
calculateVisibleSchedule in interface IVisibleScheduleBuilder
Returns:
an appropriate VisibleSchedule

calculateVisitorConflicts

public VisibleSchedule calculateVisitorConflicts(Date startTime,
                                                 Date endTime,
                                                 net.fortuna.ical4j.model.Calendar calendar,
                                                 AvailableSchedule schedule,
                                                 MeetingDurations meetingDurations,
                                                 IScheduleVisitor visitor)
Description copied from interface: IVisibleScheduleBuilder
This method is intended to provide a means for incorporating the IScheduleVisitor's own calendar data within the display of an IScheduleOwners schedule. The MeetingDurations argument is required and represents the preference of the IScheduleOwner in context.

Specified by:
calculateVisitorConflicts in interface IVisibleScheduleBuilder
Returns:
an appropriate VisibleSchedule

calculateVisibleScheduleNoAttendingCheck

protected VisibleSchedule calculateVisibleScheduleNoAttendingCheck(Date startTime,
                                                                   Date endTime,
                                                                   net.fortuna.ical4j.model.Calendar calendar,
                                                                   AvailableSchedule schedule,
                                                                   MeetingDurations meetingDurations,
                                                                   ICalendarAccount calendarAccount)
Parameters:
startTime -
endTime -
calendar -
schedule -
meetingDurations -
calendarAccount -
Returns:
an appropriate VisibleSchedule


Copyright © 2012 Jasig. All Rights Reserved.