Skip to content

Commit

Permalink
Add back createQueue method for backwards-compatibility (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
mseaton authored Nov 22, 2023
1 parent d70552f commit a0773aa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ public interface QueueService {
*/
Optional<Queue> 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
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ public Optional<Queue> 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)
*/
Expand Down

0 comments on commit a0773aa

Please sign in to comment.