org.jasig.schedassist
Interface SchedulingAssistantService


public interface SchedulingAssistantService

Main service interface for Scheduling Assistant; provides methods for exposing a IScheduleOwner's VisibleSchedule and appointment creation/cancellation by IScheduleVisitors.

Version:
$Id: AvailableService.java 2348 2010-08-09 22:06:51Z npblair $
Author:
Nicholas Blair, nblair@doit.wisc.edu

Method Summary
 List<AvailableBlock> calculateVisitorConflicts(IScheduleVisitor visitor, IScheduleOwner owner, Date start, Date end)
          Retrieve the IScheduleVisitor's calendar data and compare it to the IScheduleOwner's availability.
 void cancelAppointment(IScheduleVisitor visitor, IScheduleOwner owner, net.fortuna.ical4j.model.component.VEvent event, AvailableBlock block, String cancelReason)
          Cancel an available appointment for IScheduleVisitor/IScheduleOwner.
 net.fortuna.ical4j.model.component.VEvent getExistingAppointment(AvailableBlock targetBlock, IScheduleOwner owner)
          Return the VEvent for an existing Scheduling Assistant Appointment at the times specified by the targetBlock in the IScheduleOwner's schedule.
 VisibleSchedule getVisibleSchedule(IScheduleVisitor visitor, IScheduleOwner owner)
          Return the VisibleSchedule for the specified IScheduleOwner scoped to the IScheduleVisitor.
 VisibleSchedule getVisibleSchedule(IScheduleVisitor visitor, IScheduleOwner owner, Date start, Date end)
          Return the VisibleSchedule for the specified IScheduleOwner scoped to the IScheduleVisitor.
 net.fortuna.ical4j.model.component.VEvent scheduleAppointment(IScheduleVisitor visitor, IScheduleOwner owner, AvailableBlock block, String eventDescription)
          Schedule an available appointment for IScheduleVisitor/IScheduleOwner within the times specified in the AvailableBlock.
 

Method Detail

getVisibleSchedule

VisibleSchedule getVisibleSchedule(IScheduleVisitor visitor,
                                   IScheduleOwner owner)
Return the VisibleSchedule for the specified IScheduleOwner scoped to the IScheduleVisitor. Implementations should use the owner's VisibleWindow to determine the boundaries for the return value.

Parameters:
visitor -
owner -
Returns:
an appropriate VisibleSchedule to display to the IScheduleVisitor

getVisibleSchedule

VisibleSchedule getVisibleSchedule(IScheduleVisitor visitor,
                                   IScheduleOwner owner,
                                   Date start,
                                   Date end)
Return the VisibleSchedule for the specified IScheduleOwner scoped to the IScheduleVisitor. If the start and end Date arguments go outside of the boundaries of the IScheduleOwner's VisibleWindow, either value will be truncated to the limits prescribed by the VisibleWindow. Ideally, this method can provide a subset of a IScheduleOwner's VisibleWindow for start and end dates that fall completely inside the VisibleWindow.

Parameters:
visitor -
owner -
start -
end -
Returns:
an appropriate VisibleSchedule to display to the IScheduleVisitor

getExistingAppointment

net.fortuna.ical4j.model.component.VEvent getExistingAppointment(AvailableBlock targetBlock,
                                                                 IScheduleOwner owner)
Return the VEvent for an existing Scheduling Assistant Appointment at the times specified by the targetBlock in the IScheduleOwner's schedule.

Parameters:
targetBlock -
owner -
Returns:
the existing scheduling assistant appointment, or null if no appointment exists

scheduleAppointment

net.fortuna.ical4j.model.component.VEvent scheduleAppointment(IScheduleVisitor visitor,
                                                              IScheduleOwner owner,
                                                              AvailableBlock block,
                                                              String eventDescription)
                                                              throws SchedulingException
Schedule an available appointment for IScheduleVisitor/IScheduleOwner within the times specified in the AvailableBlock.

Parameters:
visitor -
owner -
block -
eventDescription -
Returns:
the created/updated VEvent (never null on success)
Throws:
SchedulingException

cancelAppointment

void cancelAppointment(IScheduleVisitor visitor,
                       IScheduleOwner owner,
                       net.fortuna.ical4j.model.component.VEvent event,
                       AvailableBlock block,
                       String cancelReason)
                       throws SchedulingException
Cancel an available appointment for IScheduleVisitor/IScheduleOwner.

Parameters:
visitor -
owner -
event -
block -
Throws:
SchedulingException

calculateVisitorConflicts

List<AvailableBlock> calculateVisitorConflicts(IScheduleVisitor visitor,
                                               IScheduleOwner owner,
                                               Date start,
                                               Date end)
Retrieve the IScheduleVisitor's calendar data and compare it to the IScheduleOwner's availability. Return a (never null, but possibly empty) List of AvailableBlocks in the IScheduleOwner's availability that the IScheduleVisitor has conflicts for in their calendar data.

Parameters:
visitor -
owner -
start -
end -
Returns:
a never null, but possibly empty List of AvailableBlocks that conflict for the IScheduleVisitor.


Copyright © 2011 Jasig. All Rights Reserved.