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) */