public class AppointmentHelper extends BaseAppointmentHelper
WEEK_START
Modifier | Constructor and Description |
---|---|
protected |
AppointmentHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
applyEventColors(org.primefaces.model.DefaultScheduleEvent.Builder<?> builder,
IGuiColor color,
StringBuilder styleClasses)
Given a schedule event builder, applies the color of the template to the event.
|
static org.primefaces.model.ScheduleEvent<?> |
convertToEvent(AppointmentTemplate template,
AppointmentSlot slot)
|
static org.primefaces.model.ScheduleEvent<?> |
convertToEvent(Map<Long,org.apache.commons.lang3.tuple.Pair<AppointmentTemplate,IGuiColor>> templates,
AppointmentEventView view) |
static AppointmentSlot |
convertToSlot(org.primefaces.model.ScheduleEvent<?> event)
|
static List<AppointmentClosingTime> |
createDefaultClosingTimes()
Creates the default
AppointmentTemplate.getClosingTimes() when none are set yet. |
static AppointmentTemplate |
createDefaultTemplate(Mandant client)
Sets the default values for a new
AppointmentTemplate . |
static AppointmentClosingTime |
createNewYearClosingTime()
Creates the closing time for the new year holiday.
|
static Optional<IGuiColor> |
findColor(AppointmentTemplate template)
Finds the
IGuiColor for an appointment template. |
static com.google.common.collect.Range<LocalDateTime> |
getEventDateTime(org.primefaces.model.ScheduleEvent<?> event) |
applySlotConstraints, createClosedDateTimeRanges, createDefaultSlots, createSlot, getSlotDateTime, getSlotDateTimeRange, getSlotFromDateTime, getSlotToDateTime, getTimeOnGrid, isSlotOverlapping, mergeOverlappingSlots, mergeOverlappingSlots
public static Optional<IGuiColor> findColor(AppointmentTemplate template)
IGuiColor
for an appointment template.template
- A template to process.public static void applyEventColors(org.primefaces.model.DefaultScheduleEvent.Builder<?> builder, IGuiColor color, StringBuilder styleClasses)
builder
- Schedule event builder to modify.color
- Color to use, see also findColor(AppointmentTemplate)
.styleClasses
- String builder for the style classes of the event builder.public static org.primefaces.model.ScheduleEvent<?> convertToEvent(AppointmentTemplate template, AppointmentSlot slot)
template
- Appointment template to which the slot belongs.slot
- A slot to convert.public static org.primefaces.model.ScheduleEvent<?> convertToEvent(Map<Long,org.apache.commons.lang3.tuple.Pair<AppointmentTemplate,IGuiColor>> templates, AppointmentEventView view)
public static AppointmentSlot convertToSlot(org.primefaces.model.ScheduleEvent<?> event)
event
- An event to convert.public static List<AppointmentClosingTime> createDefaultClosingTimes()
AppointmentTemplate.getClosingTimes()
when none are set yet.public static com.google.common.collect.Range<LocalDateTime> getEventDateTime(org.primefaces.model.ScheduleEvent<?> event)
event
- A schedule event.public static AppointmentTemplate createDefaultTemplate(Mandant client)
AppointmentTemplate
.client
- Client to set on the template.public static AppointmentClosingTime createNewYearClosingTime()
Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.