Package de.xima.fc.entities
Class AppointmentTemplate
java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
de.xima.fc.entities.AbstractEntity
de.xima.fc.entities.AbstractLockableEntity
de.xima.fc.entities.AppointmentTemplate
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>
,de.xima.cmn.dao.interfaces.ILockableEntity<Long>
,IDescriptionProviding
,ILockingVersionProviding
,IMandantDependent
,INameProviding
,ITransferable
,ITransferableEntity
,ITransferableLockableEntity
,IUUIDEntity
,Serializable
,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity
public class AppointmentTemplate
extends AbstractLockableEntity
implements INameProviding, IDescriptionProviding, IUUIDEntity, IMandantDependent
An entity for the appointment module of formcycle. Describes a template with the configuration of the appointments
that can be made.
- Since:
- 6.5.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
JPA attribute name for theisAllowIcal()
field.static final String
JPA attribute name for thegetAppointmentTypes()
field.static final String
JPA attribute name for thegetCapacity()
field.static final String
JPA attribute name for thegetClosingTimes()
field.static final String
JPA attribute name for thegetHtmlDescriptionTemplate()
field.static final String
JPA attribute name for thegetMaximumAdvanceBooking()
field.static final String
JPA attribute name for thegetMinimumBookingNotice()
field.static final String
JPA attribute name for thegetPlainDescriptionTemplate()
field.static final String
JPA attribute name for theisPrependProcessState()
field.static final String
JPA attribute name for thegetSlots()
field.static final String
JPA attribute name for thegetSubjectTemplate()
field.static final String
JPA attribute name for thegetZoneIdString()
field.protected @NotNull Mandant
Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersion
Fields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, id
Fields inherited from interface de.xima.fc.entities.interfaces.IDescriptionProviding
ATTR_BESCHREIBUNG, ATTR_DESCRIPTION, COL_DESCRIPTION
Fields inherited from interface de.xima.cmn.dao.interfaces.IEntity
ATTR_ID
Fields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSION
Fields inherited from interface de.xima.fc.entities.interfaces.IMandantDependent
ATTR_MANDANT, COL_CLIENT_ID
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
Fields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, TYPE_NAME_UUID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addClosingTime
(AppointmentClosingTime closingTime) Adds a closing time to this template.void
addClosingTimes
(Iterable<AppointmentClosingTime> closingTimes) Adds one or more closing times to this template.void
addSlot
(AppointmentSlot slot) Adds a slot to this template.void
addSlots
(Iterable<AppointmentSlot> slots) Adds one ore more slots to this template.void
addType
(AppointmentType type) Adds a type to this template.Deprecated.int
getColor()
getId()
Deprecated.UsegetClient()
.long
long
long
getName()
getSlots()
getUUID()
boolean
boolean
void
setAllowIcal
(boolean allowIcal) void
setAppointmentTypes
(List<AppointmentType> appointmentTypes) void
setBeschreibung
(String description) Deprecated.void
setCapacity
(int capacity) void
void
setClosingTimes
(List<AppointmentClosingTime> closingTimes) void
void
setDescription
(String description) void
setHtmlDescriptionTemplate
(String htmlDescriptionTemplate) void
setMandant
(Mandant mandant) Deprecated.UsesetClient(Mandant)
.void
setMaximumAdvanceBooking
(Duration maximumAdvanceBooking) void
setMaximumAdvanceBookingWeeks
(long maximumAdvanceBookingWeeks) void
setMinimumBookingNotice
(Duration minimumBookingNotice) void
setMinimumBookingNoticeHours
(long minimumBookingNoticeHours) void
setMinimumBookingNoticeWeeks
(long minimumBookingNoticeWeeks) void
void
setPlainDescriptionTemplate
(String plainDescriptionTemplate) void
setPrependProcessState
(boolean prependProcessState) void
setSlots
(List<AppointmentSlot> slots) void
setSubjectTemplate
(String subjectTemplate) void
void
setUUIDObject
(UUID uuid) void
void
setZoneIdString
(String zoneIdString) Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toString
Methods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId, setId
Methods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface de.xima.cmn.dao.interfaces.IEntity
isPersisted, setId
-
Field Details
-
ATTR_ALLOW_ICAL
JPA attribute name for theisAllowIcal()
field.- See Also:
-
ATTR_APPOINTMENT_TYPES
JPA attribute name for thegetAppointmentTypes()
field.- See Also:
-
ATTR_CAPACITY
JPA attribute name for thegetCapacity()
field.- See Also:
-
ATTR_HTML_DESCRIPTION_TEMPLATE
JPA attribute name for thegetHtmlDescriptionTemplate()
field.- See Also:
-
ATTR_CLOSING_TIMES
JPA attribute name for thegetClosingTimes()
field.- See Also:
-
ATTR_MAXIMUM_ADVANCE_BOOKING
JPA attribute name for thegetMaximumAdvanceBooking()
field.- See Also:
-
ATTR_MINIMUM_BOOKING_NOTICE
JPA attribute name for thegetMinimumBookingNotice()
field.- See Also:
-
ATTR_PLAIN_DESCRIPTION_TEMPLATE
JPA attribute name for thegetPlainDescriptionTemplate()
field.- See Also:
-
ATTR_PREPEND_PROCESS_STATE
JPA attribute name for theisPrependProcessState()
field.- See Also:
-
ATTR_SLOTS
JPA attribute name for thegetSlots()
field.- See Also:
-
ATTR_SUBJECT_TEMPLATE
JPA attribute name for thegetSubjectTemplate()
field.- See Also:
-
ATTR_ZONE_ID_STRING
JPA attribute name for thegetZoneIdString()
field.- See Also:
-
client
-
-
Constructor Details
-
AppointmentTemplate
public AppointmentTemplate()
-
-
Method Details
-
addClosingTime
Adds a closing time to this template. Use this in favor of adding to thegetClosingTimes()
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
Adds one or more closing times to this template. Use this in favor of adding to thegetClosingTimes()
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
Adds a slot to this template. Use this in favor of adding to thegetSlots()
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
Adds one ore more slots to this template. Use this in favor of adding to thegetSlots()
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
Adds a type to this template. Use this in favor of adding to thegetAppointmentTypes()
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
- 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.
-
getBeschreibung
Deprecated.UsegetDescription()
- Specified by:
getBeschreibung
in interfaceIDescriptionProviding
- Returns:
- The internal description of this entity that is visible in the backend.
-
getCapacity
public int getCapacity()- Returns:
- The capacity of this template. The capacity indicates how many appointments can be booked at the same time.
-
getClient
- Returns:
- The client to which this template belongs to.
-
getClosingTimes
- Returns:
- A list of times when no appointments can be booked.
-
getColor
- Returns:
- The CSS color of this calendar. May be
null
or empty when no color was set.
-
getDescription
- Specified by:
getDescription
in interfaceIDescriptionProviding
- Returns:
- The internal description of this entity that is visible in the backend.
-
getHtmlDescriptionTemplate
- Returns:
- The HTML text of the description for each entry in the generated ICAL file with all appointments.
-
getId
- Specified by:
getId
in interfacede.xima.cmn.dao.interfaces.IEntity<Long>
-
getMandant
Deprecated.UsegetClient()
.- Specified by:
getMandant
in interfaceIMandantDependent
- Returns:
- The client to which this template belongs to.
-
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
- 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.
-
getName
- Specified by:
getName
in interfaceINameProviding
- Returns:
- The name of this object.
-
getPlainDescriptionTemplate
- Returns:
- The plain text of the description for each entry in the generated ICAL file with all appointments.
-
getSlots
- Returns:
- The available slots of this template. Each slot is a time range where appointments can be booked.
-
getSubjectTemplate
- Returns:
- The text of the subject for each entry in the generated ICAL file with all appointments.
-
getUUID
- Specified by:
getUUID
in interfaceIUUIDEntity
- 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
- Specified by:
getUUIDObject
in interfaceIUUIDEntity
- 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
- Returns:
- Time zone of this appointment template.
-
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.
-
isPrependProcessState
public boolean isPrependProcessState()- Returns:
- When
true
, prepends the state of the correspondingform record
to thegetSubjectTemplate()
in the generated ICAL file.
-
setAllowIcal
public void setAllowIcal(boolean allowIcal) - Parameters:
allowIcal
- Whether to allow viewing the appointments of this template via a HTTP iCal URL.
-
setAppointmentTypes
- 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.- 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
- Parameters:
client
- The client to which this template belongs to.
-
setClosingTimes
- Parameters:
closingTimes
- A list of times when no appointments can be booked.
-
setColor
- Parameters:
color
- The CSS color of this appointment template.
-
setDescription
- Parameters:
description
- The internal description of this entity that is visible in the backend.
-
setHtmlDescriptionTemplate
- Parameters:
htmlDescriptionTemplate
- The HTML text of the description for each entry in the generated ICAL file with all appointments.
-
setMandant
Deprecated.UsesetClient(Mandant)
.- Specified by:
setMandant
in interfaceIMandantDependent
- Parameters:
mandant
- The client to which this template belongs to.
-
setMaximumAdvanceBooking
- 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 forgetMaximumAdvanceBooking()
, in weeks.
-
setMinimumBookingNotice
- 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
- Parameters:
name
- The name of this appointment template, as entered in the backend.
-
setPlainDescriptionTemplate
- Parameters:
plainDescriptionTemplate
- The plain text of the description for each entry in the generated ICAL file with all appointments.
-
setPrependProcessState
public void setPrependProcessState(boolean prependProcessState) - Parameters:
prependProcessState
- Whentrue
, prepends the state of the correspondingform record
to thegetSubjectTemplate()
in the generated ICAL file.
-
setSlots
- Parameters:
slots
- The available slots of this template. Each slot is a time range where appointments can be booked.
-
setSubjectTemplate
- Parameters:
subjectTemplate
- The text of the subject for each entry in the generated ICAL file with all appointments.
-
setUUID
- Specified by:
setUUID
in interfaceIUUIDEntity
- Parameters:
uuid
- A new UUID for this appointment template. Please note that this UUID is guaranteed to be unique only for a givengetClient()
. That is, two appointment templates belonging to two different clients may have the same UUID.
-
setUUIDObject
- Parameters:
uuid
- A new UUID for this appointment template. Please note that this UUID is guaranteed to be unique only for a givengetClient()
. That is, two appointment templates belonging to two different clients may have the same UUID.
-
setZoneId
- Parameters:
zoneId
- Time zone of this appointment template.
-
setZoneIdString
- Parameters:
zoneIdString
- Time zone of this appointment template.
-
getDescription()