Package de.xima.fc.appointment
Class SubmittedAppointment
- java.lang.Object
-
- de.xima.fc.appointment.SubmittedAppointment
-
- All Implemented Interfaces:
Serializable
public class SubmittedAppointment extends Object implements Serializable
Represents the state of a submitted appointment form field. Used to determine which action to take, such as whether to create or delete an appointment entity.- Since:
- 6.5.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SubmittedAppointment(FieldName fieldName, UUID templateUuid, IFormDataAdapter formData, Map<UUID,Appointment> existingAppointmentsByUuid)Creates a new appointment action for a form submission.SubmittedAppointment(FieldName fieldName, UUID templateUuid, Map<String,List<String[]>> formValuesMap, Appointment appointment, AppointmentType appointmentType)Creates a new appointment action for a form submission.SubmittedAppointment(Appointment appointment)Creates a new appointment action for deleting an existing appointment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UUIDgetAppointmentUuid()AppointmentgetExistingAppointment()AppointmentTypegetExistingAppointmentType()FieldNamegetFieldName()InstantgetSlotId()UUIDgetTemplateUuid()EAppointmentActionTypegetType()Analyzes the submitted and existing data and decided which action needs to be taken.UUIDgetTypeUuid()StringtoString()
-
-
-
Constructor Detail
-
SubmittedAppointment
public SubmittedAppointment(Appointment appointment)
Creates a new appointment action for deleting an existing appointment.- Parameters:
appointment- The existing appointment that needs to be deleted.
-
SubmittedAppointment
public SubmittedAppointment(FieldName fieldName, UUID templateUuid, IFormDataAdapter formData, Map<UUID,Appointment> existingAppointmentsByUuid)
Creates a new appointment action for a form submission.- Parameters:
fieldName- The name of the form field with the appointment widget.templateUuid- The UUID of the corresponding appointment template.formData- The form data that was submited.existingAppointmentsByUuid- A map between theAppointment.getUUID()and the corresponding appointments. Must contain only the appointments for the current appointment template
-
SubmittedAppointment
public SubmittedAppointment(FieldName fieldName, UUID templateUuid, Map<String,List<String[]>> formValuesMap, Appointment appointment, AppointmentType appointmentType)
Creates a new appointment action for a form submission.- Parameters:
fieldName- The name of the form field with the appointment widget.templateUuid- The UUID of the corresponding appointment template.formValuesMap- The form data that was submitted.appointment- An existing appointment, may benull.appointmentType- The appointment type of the given appointment.
-
-
Method Detail
-
getAppointmentUuid
public UUID getAppointmentUuid()
- Returns:
- The submitted UUID of the appointment, if any.
-
getExistingAppointment
public Appointment getExistingAppointment()
- Returns:
- The existing appointment for the form field, if any.
-
getExistingAppointmentType
public AppointmentType getExistingAppointmentType()
- Returns:
- The
Appointment.getAppointmentType()of thegetExistingAppointment(), if any.
-
getFieldName
public FieldName getFieldName()
- Returns:
- The name of the form field with the appointment widget.
-
getSlotId
public Instant getSlotId()
- Returns:
- The start time of the slot that the user want to book or change.
-
getTemplateUuid
public UUID getTemplateUuid()
- Returns:
- The UUID of the appointment template to which the slot belongs.
-
getType
public EAppointmentActionType getType()
Analyzes the submitted and existing data and decided which action needs to be taken.- Returns:
- The action to apply to the appointment.
-
getTypeUuid
public UUID getTypeUuid()
- Returns:
- The submitted UUID of the appointment type for which an appointment should be booked or changed.
-
-