Context
- Context for the access object, such as a database session etc.public class IcalQueryExecutor<Context> extends Object
Constructor and Description |
---|
IcalQueryExecutor(IAppointmentIcalQueryAccessObject<Context> accessObject)
Creates a new executor for creating iCal with with appointments.
|
Modifier and Type | Method and Description |
---|---|
IAppointmentIcalQueryResult |
executeQuery(Context ctx,
IAppointmentIcalQueryParams params,
Instant now)
Performs an iCal query and returns an iCal file.
|
IAppointmentIcalQueryResult |
executeQuery(Locale locale,
AppointmentTemplate template,
List<Appointment> appointments,
String sourceUrl)
Creates an iCal file from the given appointments.
|
public IcalQueryExecutor(IAppointmentIcalQueryAccessObject<Context> accessObject)
accessObject
- Object for accessing the database.public IAppointmentIcalQueryResult executeQuery(Locale locale, AppointmentTemplate template, List<Appointment> appointments, String sourceUrl) throws AppointmentIcalException
locale
- Locale to use for localized messages (description etc.)template
- Template to which the appointments belong.appointments
- Appointments to include in the iCal file.sourceUrl
- URL that is echoed back as the source of the iCal file.AppointmentIcalException
- When the iCal file could not be created, such as due to a database error.public IAppointmentIcalQueryResult executeQuery(Context ctx, IAppointmentIcalQueryParams params, Instant now) throws AppointmentIcalException
ctx
- Context for the access object.params
- Parameters for the iCal query.now
- The current server time.AppointmentIcalException
- When the appointments cold not be loaded.Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.