Package de.xima.fc.handler.entity
Class AppointmentHandler
- java.lang.Object
-
- de.xima.fc.handler.AMSApiHandler
-
- de.xima.fc.handler.entity.GenericHandler
-
- de.xima.fc.handler.entity.AppointmentHandler
-
- All Implemented Interfaces:
IAPIHandler
,IAppointmentHandler
,IGenericHandler
,Serializable
public class AppointmentHandler extends GenericHandler implements IAppointmentHandler
Handler implementation for reading and writingAppointment
entities.- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.xima.fc.handler.entity.GenericHandler
LOG
-
-
Constructor Summary
Constructors Constructor Description AppointmentHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelBookedAppointment(UserContext uc, IAppointmentDeleteBookingParams params)
Cancels the given appointment.Appointment
createBookedAppointment(UserContext uc, IAppointmentCreateBookingParams params)
Books the given appointment.List<Appointment>
getAllBy(UserContext uc, IAppointmentQueryParams params)
Returns all appointments that match the given query parameters.Appointment
getByUUID(UserContext uc, String uuid)
Finds the appointment with the given UUID.Appointment
getByUUID(UserContext uc, UUID uuid)
Finds the appointment with the given UUID.Appointment
moveBookedAppointment(UserContext uc, IAppointmentMoveBookingParams params)
Moves an appointment to a different time and date.List<EAppointmentBookingError>
validateAppointments(UserContext uc, IAppointmentValidateParams params)
Validates whether the given appointments can be created or updated.-
Methods inherited from class de.xima.fc.handler.entity.GenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getSingleAttributes, getSingleAttributes, resultTotalCount, serializableList, update, update
-
Methods inherited from class de.xima.fc.handler.AMSApiHandler
getName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.com.interfaces.IAPIHandler
getName
-
Methods inherited from interface de.xima.fc.handler.interfaces.entity.IGenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getSingleAttributes, getSingleAttributes, resultTotalCount, update, update
-
-
-
-
Method Detail
-
cancelBookedAppointment
public void cancelBookedAppointment(UserContext uc, IAppointmentDeleteBookingParams params) throws AppointmentBookingException
Description copied from interface:IAppointmentHandler
Cancels the given appointment. You should callIAppointmentHandler.validateAppointments(UserContext, IAppointmentValidateParams)
first if you have not done so yet.- Specified by:
cancelBookedAppointment
in interfaceIAppointmentHandler
- Parameters:
uc
- Current user context for accessing the database.params
- Parameters with the appointment to cancel, must be a persisted entity.- Throws:
AppointmentBookingException
- When the booking could not be performed. SeeAppointmentBookingException.getBookingError()
for more details.
-
createBookedAppointment
public Appointment createBookedAppointment(UserContext uc, IAppointmentCreateBookingParams params) throws AppointmentBookingException
Description copied from interface:IAppointmentHandler
Books the given appointment. You should callIAppointmentHandler.validateAppointments(UserContext, IAppointmentValidateParams)
first if you have not done so yet.- Specified by:
createBookedAppointment
in interfaceIAppointmentHandler
- Parameters:
uc
- Current user context for accessing the database.params
- Parameters with the appointment to book, must be a new (non-persisted) entity.- Returns:
- The persisted appointment.
- Throws:
AppointmentBookingException
- When the booking could not be performed. SeeAppointmentBookingException.getBookingError()
for more details.
-
getAllBy
public List<Appointment> getAllBy(UserContext uc, IAppointmentQueryParams params)
Description copied from interface:IAppointmentHandler
Returns all appointments that match the given query parameters. You should callIAppointmentHandler.validateAppointments(UserContext, IAppointmentValidateParams)
first if you have not done so yet.- Specified by:
getAllBy
in interfaceIAppointmentHandler
- Parameters:
uc
- Current user context for accessing the database.params
- Restrictions to apply the returned appointments.- Returns:
- All appointments that match the given query parameters.
-
getByUUID
public Appointment getByUUID(UserContext uc, String uuid)
Description copied from interface:IAppointmentHandler
Finds the appointment with the given UUID.- Specified by:
getByUUID
in interfaceIAppointmentHandler
- Parameters:
uc
- Current user context for accessing the database.uuid
- UUID of an appointment.- Returns:
- The appointment with the given UUID.
-
getByUUID
public Appointment getByUUID(UserContext uc, UUID uuid)
Description copied from interface:IAppointmentHandler
Finds the appointment with the given UUID.- Specified by:
getByUUID
in interfaceIAppointmentHandler
- Parameters:
uc
- Current user context for accessing the database.uuid
- UUID of an appointment.- Returns:
- The appointment with the given UUID.
-
moveBookedAppointment
public Appointment moveBookedAppointment(UserContext uc, IAppointmentMoveBookingParams params) throws AppointmentBookingException
Description copied from interface:IAppointmentHandler
Moves an appointment to a different time and date.- Specified by:
moveBookedAppointment
in interfaceIAppointmentHandler
- Parameters:
uc
- Current user context for accessing the database.params
- Parameters with the appointment to move.- Returns:
- The updated appointment from the database.
- Throws:
AppointmentBookingException
- When the booking could not be performed. SeeAppointmentBookingException.getBookingError()
for more details.
-
validateAppointments
public List<EAppointmentBookingError> validateAppointments(UserContext uc, IAppointmentValidateParams params)
Description copied from interface:IAppointmentHandler
Validates whether the given appointments can be created or updated.- Specified by:
validateAppointments
in interfaceIAppointmentHandler
- Parameters:
uc
- Current user context for accessing the database.params
- Parameters with the appointments to validate.- Returns:
- The validation errors for each appointment.
-
-