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
Handler implementation for reading and writing
Appointment entities.- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
Fields inherited from class GenericHandler
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels the given appointment.Books the given appointment.getAllBy(UserContext uc, IAppointmentQueryParams params) Returns all appointments that match the given query parameters.<View extends IEffectiveAppointmentStatusProviding>
List<View> getAttributesBy(UserContext uc, IAppointmentQueryParams params, Class<View> viewClass) Returns all the attributes of the appointments specified by theIAppointmentQueryParams.getBy(UserContext uc, de.xima.cmn.criteria.QueryCriteriaManager qcm, boolean eager) Finds the appointment with theQueryCriteriaManagerand an is able to load it eagerly.getByUUID(UserContext uc, String uuid) Finds the appointment with the given UUID.getByUUID(UserContext uc, String uuid, boolean eager) Finds the appointment with the given UUID and an is able to load it eagerly.getByUUID(UserContext uc, UUID uuid) Finds the appointment with the given UUID.Moves an appointment to a different time and date.Validates whether the given appointments can be created or updated.Methods inherited from class GenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, serializableList, update, updateMethods inherited from class AMSApiHandler
getNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAPIHandler
getNameMethods inherited from interface IGenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, update, update
-
Constructor Details
-
AppointmentHandler
public AppointmentHandler()
-
-
Method Details
-
cancelBookedAppointment
public void cancelBookedAppointment(UserContext uc, IAppointmentDeleteBookingParams params) throws AppointmentBookingException Description copied from interface:IAppointmentHandlerCancels the given appointment. You should callIAppointmentHandler.validateAppointments(UserContext, IAppointmentValidateParams)first if you have not done so yet.- Specified by:
cancelBookedAppointmentin 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:IAppointmentHandlerBooks the given appointment. You should callIAppointmentHandler.validateAppointments(UserContext, IAppointmentValidateParams)first if you have not done so yet.- Specified by:
createBookedAppointmentin 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
Description copied from interface:IAppointmentHandlerReturns all appointments that match the given query parameters. You should callIAppointmentHandler.validateAppointments(UserContext, IAppointmentValidateParams)first if you have not done so yet.- Specified by:
getAllByin 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.
-
getAttributesBy
public <View extends IEffectiveAppointmentStatusProviding> List<View> getAttributesBy(UserContext uc, IAppointmentQueryParams params, Class<View> viewClass) Description copied from interface:IAppointmentHandlerReturns all the attributes of the appointments specified by theIAppointmentQueryParams.- Specified by:
getAttributesByin interfaceIAppointmentHandler- Parameters:
uc- User context for the database transaction.params- the appointment query paramsviewClass- the class of theIEffectiveAppointmentStatusProvidingimplementation- Returns:
- the attributes specified by the appointment query params
-
getByUUID
Description copied from interface:IAppointmentHandlerFinds the appointment with the given UUID.- Specified by:
getByUUIDin interfaceIAppointmentHandler- Parameters:
uc- Current user context for accessing the database.uuid- UUID of an appointment.- Returns:
- The appointment with the given UUID.
-
getByUUID
Description copied from interface:IAppointmentHandlerFinds the appointment with the given UUID and an is able to load it eagerly.- Specified by:
getByUUIDin interfaceIAppointmentHandler- Parameters:
uc- Current user context for accessing the database.uuid- UUID of an appointment.eager- the flag to load the appointment eagerly.- Returns:
- The appointment with the given UUID.
-
getBy
public Appointment getBy(UserContext uc, de.xima.cmn.criteria.QueryCriteriaManager qcm, boolean eager) Description copied from interface:IAppointmentHandlerFinds the appointment with theQueryCriteriaManagerand an is able to load it eagerly.- Specified by:
getByin interfaceIAppointmentHandler- Parameters:
uc- Current user context for accessing the database.qcm- Custom filter criteria for the appointment.eager- the flag to load the appointment eagerly.- Returns:
- The appointment with the given UUID.
-
getByUUID
Description copied from interface:IAppointmentHandlerFinds the appointment with the given UUID.- Specified by:
getByUUIDin 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:IAppointmentHandlerMoves an appointment to a different time and date.- Specified by:
moveBookedAppointmentin 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:IAppointmentHandlerValidates whether the given appointments can be created or updated.- Specified by:
validateAppointmentsin interfaceIAppointmentHandler- Parameters:
uc- Current user context for accessing the database.params- Parameters with the appointments to validate.- Returns:
- The validation errors for each appointment.
-