org.jasig.schedassist.web.visitor
Class CreateAppointmentFormController

java.lang.Object
  extended by org.jasig.schedassist.web.visitor.CreateAppointmentFormController

@Controller
@RequestMapping(value="/schedule/{ownerIdentifier}/create.html")
@SessionAttributes(value="command")
public class CreateAppointmentFormController
extends Object

Controller for IScheduleVisitors to create appointments via an AvailableService.

Version:
$Id: CreateAppointmentFormController.java 2332 2010-08-02 17:56:49Z npblair $
Author:
Nicholas Blair, nblair@doit.wisc.edu

Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
CreateAppointmentFormController()
           
 
Method Summary
protected  String createAppointment(org.springframework.ui.ModelMap model, String ownerIdentifier, CreateAppointmentFormBackingObject fbo, org.springframework.validation.BindingResult bindingResult)
           
 AvailableScheduleDao getAvailableScheduleDao()
           
 IEventUtils getEventUtils()
           
 OwnerDao getOwnerDao()
           
 PublicProfileDao getPublicProfileDao()
           
 RelationshipDao getRelationshipDao()
           
 SchedulingAssistantService getSchedulingAssistantService()
           
protected  void initBinder(org.springframework.web.bind.WebDataBinder binder)
           
 void setAvailableScheduleDao(AvailableScheduleDao availableScheduleDao)
           
 void setEventUtils(IEventUtils eventUtils)
           
 void setOwnerDao(OwnerDao ownerDao)
           
 void setPublicProfileDao(PublicProfileDao publicProfileDao)
           
 void setRelationshipDao(RelationshipDao relationshipDao)
           
 void setSchedulingAssistantService(SchedulingAssistantService schedulingAssistantService)
           
protected  String setupForm(org.springframework.ui.ModelMap model, String startTimePhrase, String ownerIdentifier)
           
protected  void validateChosenStartTime(VisibleWindow window, Date startTime)
          Verify the startTime argument is within the window; throws a ScheduleException if not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Constructor Detail

CreateAppointmentFormController

public CreateAppointmentFormController()
Method Detail

setRelationshipDao

public void setRelationshipDao(@Qualifier(value="composite")
                               RelationshipDao relationshipDao)
Parameters:
relationshipDao - the relationshipDao to set

setAvailableScheduleDao

public void setAvailableScheduleDao(AvailableScheduleDao availableScheduleDao)
Parameters:
availableScheduleDao - the availableScheduleDao to set

setOwnerDao

public void setOwnerDao(OwnerDao ownerDao)
Parameters:
ownerDao - the ownerDao to set

setPublicProfileDao

public void setPublicProfileDao(PublicProfileDao publicProfileDao)
Parameters:
publicProfileDao - the publicProfileDao to set

setEventUtils

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

getSchedulingAssistantService

public SchedulingAssistantService getSchedulingAssistantService()
Returns:
the schedulingAssistantService

setSchedulingAssistantService

public void setSchedulingAssistantService(SchedulingAssistantService schedulingAssistantService)
Parameters:
schedulingAssistantService - the schedulingAssistantService to set

getRelationshipDao

public RelationshipDao getRelationshipDao()
Returns:
the relationshipDao

getAvailableScheduleDao

public AvailableScheduleDao getAvailableScheduleDao()
Returns:
the availableScheduleDao

getOwnerDao

public OwnerDao getOwnerDao()
Returns:
the ownerDao

getPublicProfileDao

public PublicProfileDao getPublicProfileDao()
Returns:
the publicProfileDao

getEventUtils

public IEventUtils getEventUtils()
Returns:
the eventUtils

initBinder

@InitBinder(value="command")
protected void initBinder(org.springframework.web.bind.WebDataBinder binder)
Parameters:
binder -

setupForm

@RequestMapping(method=GET)
protected String setupForm(org.springframework.ui.ModelMap model,
                                          @RequestParam(value="startTime",required=true)
                                          String startTimePhrase,
                                          @PathVariable(value="ownerIdentifier")
                                          String ownerIdentifier)
                    throws InputFormatException,
                           SchedulingException,
                           OwnerNotFoundException,
                           NotAVisitorException
Parameters:
model -
startTimePhrase -
ownerId -
Returns:
Throws:
InputFormatException
SchedulingException
OwnerNotFoundException
NotAVisitorException

createAppointment

@RequestMapping(method=POST)
protected String createAppointment(org.springframework.ui.ModelMap model,
                                                  @PathVariable(value="ownerIdentifier")
                                                  String ownerIdentifier,
                                                  @ModelAttribute(value="command")
                                                  CreateAppointmentFormBackingObject fbo,
                                                  org.springframework.validation.BindingResult bindingResult)
                            throws NotAVisitorException,
                                   OwnerNotFoundException,
                                   SchedulingException
Parameters:
ownerIdentifier -
model -
fbo -
bindingResult -
Returns:
Throws:
NotAVisitorException
OwnerNotFoundException
SchedulingException

validateChosenStartTime

protected void validateChosenStartTime(VisibleWindow window,
                                       Date startTime)
                                throws SchedulingException
Verify the startTime argument is within the window; throws a ScheduleException if not.

Parameters:
window -
startTime -
Throws:
SchedulingException


Copyright © 2012 Jasig. All Rights Reserved.