From a0773aa26bedfca823d8d6b06856ad36ae41ebf0 Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Wed, 22 Nov 2023 15:41:14 -0500 Subject: [PATCH] Add back createQueue method for backwards-compatibility (#47) --- .../java/org/openmrs/module/queue/api/QueueService.java | 8 ++++++++ .../openmrs/module/queue/api/impl/QueueServiceImpl.java | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/api/src/main/java/org/openmrs/module/queue/api/QueueService.java b/api/src/main/java/org/openmrs/module/queue/api/QueueService.java index b56bd85..b4c9580 100644 --- a/api/src/main/java/org/openmrs/module/queue/api/QueueService.java +++ b/api/src/main/java/org/openmrs/module/queue/api/QueueService.java @@ -39,6 +39,14 @@ public interface QueueService { */ Optional getQueueById(@NotNull Integer id); + /** + * Saves a queue. This is here mainly for backwards-compatibility, it delegates to saveQueue(Queue) + * + * @param queue the queue to be saved + * @return saved {@link org.openmrs.module.queue.model.Queue} + */ + Queue createQueue(@NotNull Queue queue); + /** * Saves a queue * diff --git a/api/src/main/java/org/openmrs/module/queue/api/impl/QueueServiceImpl.java b/api/src/main/java/org/openmrs/module/queue/api/impl/QueueServiceImpl.java index 2cbeb14..3622d4f 100644 --- a/api/src/main/java/org/openmrs/module/queue/api/impl/QueueServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/queue/api/impl/QueueServiceImpl.java @@ -54,6 +54,14 @@ public Optional getQueueById(@NotNull Integer queueId) { return dao.get(queueId); } + /** + * @see org.openmrs.module.queue.api.QueueService#createQueue(Queue) + */ + @Override + public Queue createQueue(@NotNull Queue queue) { + return saveQueue(queue); + } + /** * @see org.openmrs.module.queue.api.QueueService#saveQueue(Queue) */