org.jasig.schedassist.web.owner.schedule
Class AvailableScheduleDataController

java.lang.Object
  extended by org.jasig.schedassist.web.owner.schedule.AvailableScheduleDataController

@Controller
@RequestMapping(value={"/owner/schedule-data.json","/delegate/schedule-data.json"})
public class AvailableScheduleDataController
extends Object

Controller implementation that returns the IScheduleOwner's AvailableSchedule for the 7 days starting at the "startDate" parameter.

Version:
$Id: AvailableScheduleDataController.java 2424 2010-08-30 20:57:23Z npblair $
Author:
Nicholas Blair, nblair@doit.wisc.edu

Nested Class Summary
static class AvailableScheduleDataController.AvailableBlockJsonRepresentation
          Simpler representation of an AvailableBlock tailored for JSON.
 
Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
AvailableScheduleDataController()
           
 
Method Summary
static List<AvailableScheduleDataController.AvailableBlockJsonRepresentation> formatJson(AvailableSchedule schedule)
           
 String getAvailableSchedule(String startParam, org.springframework.ui.ModelMap model, javax.servlet.http.HttpServletResponse response)
           
 AvailableScheduleDao getAvailableScheduleDao()
           
static Date roundDownToNearest15(Date date)
           
 void setAvailableScheduleDao(AvailableScheduleDao availableScheduleDao)
           
 
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

AvailableScheduleDataController

public AvailableScheduleDataController()
Method Detail

setAvailableScheduleDao

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

getAvailableScheduleDao

public AvailableScheduleDao getAvailableScheduleDao()
Returns:
the availableScheduleDao

getAvailableSchedule

@RequestMapping(method=GET)
public String getAvailableSchedule(@RequestParam(value="startDate",required=false)
                                                  String startParam,
                                                  org.springframework.ui.ModelMap model,
                                                  javax.servlet.http.HttpServletResponse response)
                            throws NotRegisteredException
Parameters:
startParam -
response -
Returns:
Throws:
NotRegisteredException

formatJson

public static List<AvailableScheduleDataController.AvailableBlockJsonRepresentation> formatJson(AvailableSchedule schedule)
Parameters:
schedule -
Returns:

roundDownToNearest15

public static Date roundDownToNearest15(Date date)
Parameters:
date -
Returns:


Copyright © 2012 Jasig. All Rights Reserved.