Skip to content

Commit

Permalink
Add javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
f-galland committed Dec 19, 2024
1 parent a2f965e commit 1a2ac3c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,18 @@
import java.io.IOException;
import java.util.Objects;

/** Helper class for managing command orders */
public class Orders {

private static final Logger log = LogManager.getLogger(Orders.class);

/**
* Helper static method that takes the search results in SearchHits form and parses them into
* Order objects. It then puts together a json string meant for sending over HTTP
*
* @param searchHits the commands search result
* @return A json string payload with an array of orders to be processed
*/
public static String getOrders(SearchHits searchHits) {
try (XContentBuilder builder = XContentFactory.jsonBuilder()) {
// Start an XContentBuilder array named "orders"
Expand Down

0 comments on commit 1a2ac3c

Please sign in to comment.