Skip to content

Commit 575cb83

Browse files
authored
Add javadocs in missing locations (opensearch-project#132)
Signed-off-by: Eric Pugh <[email protected]>
1 parent df39f8a commit 575cb83

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

src/main/java/org/opensearch/ubi/QueryRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class QueryRequest {
4040
* @param userQuery The user-entered query.
4141
* @param clientId The ID of the client that initiated the query.
4242
* @param query The raw query.
43+
* @param application The application that initiated the query.
4344
* @param queryAttributes An optional map of additional attributes for the query.
4445
* @param queryResponse The {@link QueryResponse} for this query request.
4546
*/

src/main/java/org/opensearch/ubi/UbiPlugin.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,22 @@
4949
*/
5050
public class UbiPlugin extends Plugin implements ActionPlugin, SearchPlugin, TelemetryAwarePlugin {
5151

52+
/**
53+
* The index name used for storing User Behavior Insights queries data.
54+
*/
5255
public static final String UBI_QUERIES_INDEX = "ubi_queries";
56+
/**
57+
* The index name used for storing User Behavior Insights events data.
58+
*/
5359
public static final String UBI_EVENTS_INDEX = "ubi_events";
5460

61+
/**
62+
* Path to the JSON file containing the mapping configuration for the events index.
63+
*/
5564
public static final String EVENTS_MAPPING_FILE = "/events-mapping.json";
65+
/**
66+
* Path to the JSON file containing the mapping configuration for the queries index.
67+
*/
5668
public static final String QUERIES_MAPPING_FILE = "/queries-mapping.json";
5769

5870
private ActionFilter ubiActionFilter;

src/main/java/org/opensearch/ubi/UbiRestHandler.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
import static org.opensearch.ubi.UbiPlugin.UBI_EVENTS_INDEX;
3636
import static org.opensearch.ubi.UbiPlugin.UBI_QUERIES_INDEX;
3737

38+
/**
39+
* REST handler for User Behavior Insights Plugin operations.
40+
* Provides endpoints for initializing UBI indices and mappings.
41+
*/
3842
public class UbiRestHandler extends BaseRestHandler {
3943

4044
private static final Logger LOGGER = LogManager.getLogger(UbiRestHandler.class);
@@ -43,6 +47,13 @@ public class UbiRestHandler extends BaseRestHandler {
4347
* URL for initializing the plugin and the index mappings.
4448
*/
4549
public static final String INITIALIZE_URL = "/_plugins/ubi/initialize";
50+
51+
/**
52+
* Creates a new instance of {@link UbiRestHandler}.
53+
*/
54+
public UbiRestHandler() {
55+
// Default constructor
56+
}
4657

4758
@Override
4859
public String getName() {

src/main/java/org/opensearch/ubi/UbiSettings.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,17 @@
1414
import java.util.List;
1515

1616
/**
17-
* The UBI settings.
17+
* Utility class for UBI settings.
1818
*/
1919
public class UbiSettings {
2020

21+
/**
22+
* Private constructor to prevent instantiation as this is a utility class with static methods.
23+
*/
24+
private UbiSettings() {
25+
// Private constructor to prevent instantiation
26+
}
27+
2128
/**
2229
* The name of the Data Prepper http_source URL for receiving queries.
2330
*/

0 commit comments

Comments
 (0)