Class AppointmentTemplate

    • Constructor Detail

      • AppointmentTemplate

        public AppointmentTemplate()
    • Method Detail

      • getId

        public Long getId()
        Specified by:
        getId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
      • addClosingTime

        public void addClosingTime​(AppointmentClosingTime closingTime)
        Adds a closing time to this template. Use this in favor of adding to the getClosingTimes() directly, as this sets cross references properly. An appointment slot describes a time range when no appointments can be booked.
        Parameters:
        closingTime - A closing time to add.
      • addClosingTimes

        public void addClosingTimes​(Iterable<AppointmentClosingTime> closingTimes)
        Adds one or more closing times to this template. Use this in favor of adding to the getClosingTimes() directly, as this sets cross references properly. An appointment slot describes a time range when no appointments can be booked.
        Parameters:
        closingTimes - A sequence of closing times to add.
      • addSlot

        public void addSlot​(AppointmentSlot slot)
        Adds a slot to this template. Use this in favor of adding to the getSlots() directly, as this sets cross references properly. Each available slot is a time range where appointments can be booked.
        Parameters:
        slot - A slot to add.
      • addSlots

        public void addSlots​(Iterable<AppointmentSlot> slots)
        Adds one ore more slots to this template. Use this in favor of adding to the getSlots() directly, as this sets cross references properly. Each available slot is a time range where appointments can be booked.
        Parameters:
        slots - A sequence of slots to add.
      • addType

        public void addType​(AppointmentType type)
        Adds a type to this template. Use this in favor of adding to the getAppointmentTypes() directly, as this sets cross references properly. An appointment type describes an activity for which an appointment can be booked, such as drying hairs or dying hairs.
        Parameters:
        type - A type to add.
      • getAppointmentTypes

        public List<AppointmentType> getAppointmentTypes()
        Returns:
        A list of the appointment types of this template. An appointment type describes an activity for which an appointment can be booked, such as drying hairs or dying hairs.
      • getCapacity

        public int getCapacity()
        Returns:
        The capacity of this template. The capacity indicates how many appointments can be booked at the same time.
      • getClient

        public Mandant getClient()
        Returns:
        The client to which this template belongs to.
      • getClosingTimes

        public List<AppointmentClosingTime> getClosingTimes()
        Returns:
        A list of times when no appointments can be booked.
      • getColor

        @Nullable
        public String getColor()
        Returns:
        The CSS color of this calendar. May be null or empty when no color was set.
      • getMaximumAdvanceBooking

        public Duration getMaximumAdvanceBooking()
        Returns:
        How far in advance one can book an appointment, relative to the current date time.
      • getMaximumAdvanceBookingWeeks

        public long getMaximumAdvanceBookingWeeks()
        Returns:
        The value of getMaximumAdvanceBooking(), converted to weeks.
      • getMinimumBookingNotice

        public Duration getMinimumBookingNotice()
        Returns:
        The minumum time that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
      • getMinimumBookingNoticeHours

        public long getMinimumBookingNoticeHours()
        Returns:
        The minumum time in hours that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
      • getMinimumBookingNoticeWeeks

        public long getMinimumBookingNoticeWeeks()
        Returns:
        The minumum time in weeks that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
      • getSlots

        public List<AppointmentSlot> getSlots()
        Returns:
        The available slots of this template. Each slot is a time range where appointments can be booked.
      • getUUID

        public String getUUID()
        Specified by:
        getUUID in interface IUUIDEntity
        Returns:
        The UUID of this appointment template. Please note that this UUID is guaranteed to be unique only for a given getClient(). That is, two appointment templates belonging to two different clients may have the same UUID.
      • getUUIDObject

        public UUID getUUIDObject()
        Specified by:
        getUUIDObject in interface IUUIDEntity
        Returns:
        The UUID of this appointment template. Please note that this UUID is guaranteed to be unique only for a given getClient(). That is, two appointment templates belonging to two different clients may have the same UUID.
      • getZoneId

        public ZoneId getZoneId()
        Returns:
        Time zone of this appointment template.
      • getZoneIdString

        public String getZoneIdString()
        Returns:
        Time zone of this appointment template.
      • isAllowIcal

        public boolean isAllowIcal()
        Returns:
        Whether to allow viewing the appointments of this template via a HTTP iCal URL.
      • setAllowIcal

        public void setAllowIcal​(boolean allowIcal)
        Parameters:
        allowIcal - Whether to allow viewing the appointments of this template via a HTTP iCal URL.
      • setAppointmentTypes

        public void setAppointmentTypes​(List<AppointmentType> appointmentTypes)
        Parameters:
        appointmentTypes - A list of the appointment types of this template. An appointment type describes an activity for which an appointment can be booked, such as drying hairs or dying hairs.
      • setBeschreibung

        @Deprecated
        public void setBeschreibung​(String description)
        Deprecated.
        Parameters:
        description - The internal description of this entity that is visible in the backend.
      • setCapacity

        public void setCapacity​(int capacity)
        Parameters:
        capacity - The capacity of this template. The capacity indicates how many appointments can be booked at the same time.
      • setClient

        public void setClient​(Mandant client)
        Parameters:
        client - The client to which this template belongs to.
      • setClosingTimes

        public void setClosingTimes​(List<AppointmentClosingTime> closingTimes)
        Parameters:
        closingTimes - A list of times when no appointments can be booked.
      • setColor

        public void setColor​(String color)
        Parameters:
        color - The CSS color of this appointment template.
      • setDescription

        public void setDescription​(String description)
        Parameters:
        description - The internal description of this entity that is visible in the backend.
      • setMaximumAdvanceBooking

        public void setMaximumAdvanceBooking​(Duration maximumAdvanceBooking)
        Parameters:
        maximumAdvanceBooking - How far in advance one can book an appointment, relative to the current date time.
      • setMaximumAdvanceBookingWeeks

        public void setMaximumAdvanceBookingWeeks​(long maximumAdvanceBookingWeeks)
        Parameters:
        maximumAdvanceBookingWeeks - The new value for getMaximumAdvanceBooking(), in weeks.
      • setMinimumBookingNotice

        public void setMinimumBookingNotice​(Duration minimumBookingNotice)
        Parameters:
        minimumBookingNotice - The minumum time that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
      • setMinimumBookingNoticeHours

        public void setMinimumBookingNoticeHours​(long minimumBookingNoticeHours)
        Parameters:
        minimumBookingNoticeHours - The minumum time in hours that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
      • setMinimumBookingNoticeWeeks

        public void setMinimumBookingNoticeWeeks​(long minimumBookingNoticeWeeks)
        Parameters:
        minimumBookingNoticeWeeks - The minumum time in weeks that must lie between the current date time and an appointment when a user books it. Can be user to avoid last minute bookings.
      • setName

        public void setName​(String name)
        Parameters:
        name - The name of this appointment template, as entered in the backend.
      • setSlots

        public void setSlots​(List<AppointmentSlot> slots)
        Parameters:
        slots - The available slots of this template. Each slot is a time range where appointments can be booked.
      • setUUID

        public void setUUID​(String uuid)
        Specified by:
        setUUID in interface IUUIDEntity
        Parameters:
        uuid - A new UUID for this appointment template. Please note that this UUID is guaranteed to be unique only for a given getClient(). That is, two appointment templates belonging to two different clients may have the same UUID.
      • setUUIDObject

        public void setUUIDObject​(UUID uuid)
        Parameters:
        uuid - A new UUID for this appointment template. Please note that this UUID is guaranteed to be unique only for a given getClient(). That is, two appointment templates belonging to two different clients may have the same UUID.
      • setZoneId

        public void setZoneId​(ZoneId zoneId)
        Parameters:
        zoneId - Time zone of this appointment template.
      • setZoneIdString

        public void setZoneIdString​(String zoneIdString)
        Parameters:
        zoneIdString - Time zone of this appointment template.