Custom Room Availability


When UniTime event management is not used, but information about room availability is needed for course and/or examination timetabling, a custom room availability interface can be used. It is based on a simple XML format (see request XML, response XML, DTD).


When room availability is requested within UniTime (e.g., while input data are being loaded into the course or examination solver), a request XML file is generated. It contains information about the current academic session (year, term, and campus) and about a time frame of the requested availability (starting and end date, starting and end time). When the resquest XML file appears, an appropriate response XML should be generated by the external system. It contains information about all the relevant rooms and their events in the given time frame. The room availability can be cached for a certain time as well as asynchronously periodically refreshed so that UniTime not need to wait for the external system every time a person opens a page that needs room availability (e.g., Class Assignment or Examination Assignment page).


Following application properties needs to be set to enable this interface.

 # Custom room availability service (a class implementing org.unitime.timetable.interfaces.RoomAvailabilityInterface)

# Maximum age of the room availability (in seconds, defaults to 600)
# Room availability refresh period (in seconds, defaults to 60)
# Time to live for the cache (if no request is made for the room availability in this time, it will stop asking for
# an update, in seconds defaults to 3600)
# Time limit for the response (in seconds, defaults to 60)

# Request XML file (defaults to Tomcat/data/unitime/request.xml)
# Response XML file (defaults to Tomcat/data/unitime/response.xml)
# Delete the response file after the response is read

# Midterm exam event type (so that these can be ignored when room availability is used for evening examination) Examination Event
# Final exam event type Examination Event
# Class event type Event

An alternative is the BlobRoomAvailabilityService, that stores and requests the XMLs as blobs in the database.

 # Custom room availability service (a class implementing org.unitime.timetable.interfaces.RoomAvailabilityInterface)

# SQL query that passes the XML request as CLOB{ call room_avail_interface.request(?) }
# SLQ query that reads the XML response as CLOB{? = call room_avail_interface.response()}
The other parameters are the same as for the RoomAvailabilityService.


Custom room availability is implemented by RoomAvailabilityService using RoomAvailability interface. Also see the DefaultRoomAvailability that is used to get the room availability from the UniTime's event management (enabled by default).

Other customizations

There are many other customizations available, see for suggestions. Most of the settings can be seen and changed using Administration > Defaults > Configuration page. For instance see Examination Naming Conventions or Customizations.

Back to Timetabling Documentation.©2010 UniTime LLCContent available under GNU Free Documentation License 1.3.