-
Notifications
You must be signed in to change notification settings - Fork 52
O3-5692: Build a dedicated REST endpoint for queue entries #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,9 +17,11 @@ | |
| import java.time.LocalDateTime; | ||
| import java.time.LocalTime; | ||
| import java.time.ZoneId; | ||
| import java.util.Collection; | ||
| import java.util.Collections; | ||
| import java.util.Date; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
| import java.util.Optional; | ||
|
|
||
| import lombok.Setter; | ||
|
|
@@ -215,6 +217,18 @@ public List<QueueEntry> getQueueEntries(QueueEntrySearchCriteria searchCriteria) | |
| return dao.getQueueEntries(searchCriteria); | ||
| } | ||
|
|
||
| @Override | ||
| @Transactional(readOnly = true) | ||
| public List<QueueEntry> getQueueEntries(QueueEntrySearchCriteria searchCriteria, Integer startIndex, Integer limit) { | ||
| return dao.getQueueEntries(searchCriteria, startIndex, limit); | ||
| } | ||
|
|
||
| @Override | ||
| @Transactional(readOnly = true) | ||
| public Map<QueueEntry, String> getPreviousQueueEntryUuids(Collection<QueueEntry> entries) { | ||
| return dao.getPreviousQueueEntryUuids(entries); | ||
| } | ||
|
Comment on lines
+228
to
+230
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Kindly provide the implementation for
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The implementation at lines 228-230 delegates to the DAO - |
||
|
|
||
| @Override | ||
| @Transactional(readOnly = true) | ||
| public Long getCountOfQueueEntries(QueueEntrySearchCriteria searchCriteria) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly to follow the 3-layer architectural pattern (Controller -> Service -> DAO) mentioned in the PR description, please expose
this method
getPreviousQueueEntryUuidsin the Service interface to ensures that the logic is available to the RESTcontroller while maintaining proper security and transaction boundaries. please don't forget to add the @Authorized annotation for
PrivilegeConstants.GET_QUEUE_ENTRIES."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already in place, the method is declared on
QueueEntryServiceat line 146 with@Authorized({ PrivilegeConstants.GET_QUEUE_ENTRIES })on line 145. Let me know if you're seeing something different.