Skip to main content
Skip table of contents

ReservationCollectionTimeSlotFinder

Finds timeslots for a list of reservation collections.

Methods

findTimeSlots
Description

This method takes a list of reservation collections and a timeslot context. It will return a list of timeslots matching that context where at least one of those collections is avaialble. Each slot also contains a subset of the reservation collections.

Signature
CODE
global static B25.ReservationCollectionTimeSlotFinder.Result getTimeRanges(B25.ReservationCollectionTimeSlotFinder.Context context)
Parameters
CODE
B25.ReservationCollectionTimeSlotFinder.Context

An instance of B25.ReservationCollectionTimeSlotFinder.Context. This class wraps the input parameters, such as the collections check, and timeslotCotext

Return Type
CODE
B25.ReservationCollectionTimeSlotFinder.Result

An instance of B25.AvailableTimeRanges.Result. This contains a list of timeslots matching that context where at least one of those collections is avaialble. Each slot also contains a subset of the reservation collections.

Inner Classes

Context
Description

This class wraps the input parameters a list of reservation collections and a timeslot context.

Properties
CODE
List<ReservationCollection> collectionsToCheck

A list of Reservation Collections you want to conflict check for each timeslot.

CODE
TimeSlotGenerator.Context timeSlotContext;

Definition of the shape and range of the timeslots.

Result
Description

This class wraps the result, which contains a list of available timeslots.

Properties
CODE
List<TimeSlotWithReservationCollections> timeSlots;

A list of available timeslots. Each timeslot contains a list of ReservationCollections that would be available in that timeslot.

Example

This example shows how you can use the class in your own code.

JAVA
B25.TimeSlotGenerator.Context timeSlotContext = new B25.TimeSlotGenerator.Context();
timeSlotContext.startOfRange = Datetime.newInstance(2024, 01, 01, 0, 0, 0);
timeSlotContext.endOfRange = Datetime.newInstance(2024, 01, 07, 0, 0, 0);
timeSlotContext.duration = 15;
B25.ReservationCollectionTimeSlotFinder.Context findContext = new B25.ReservationCollectionTimeSlotFinder.Context();
findContext.collectionsToCheck = <List of collections most likely from CompositeReservationTemplates>
findContext.timeSlotContext = timeSlotContext;

B25.ReservationCollectionTimeSlotFinder.Result result = B25.ReservationCollectionTimeSlotFinder.findTimeSlots(findContext);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.