diff --git a/src/main/java/org/opensearch/securityanalytics/correlation/alert/CorrelationAlertService.java b/src/main/java/org/opensearch/securityanalytics/correlation/alert/CorrelationAlertService.java index 4e135d8a7..cb8e5e97f 100644 --- a/src/main/java/org/opensearch/securityanalytics/correlation/alert/CorrelationAlertService.java +++ b/src/main/java/org/opensearch/securityanalytics/correlation/alert/CorrelationAlertService.java @@ -18,6 +18,11 @@ import org.opensearch.common.lucene.uid.Versions; import org.opensearch.commons.alerting.model.Alert; import org.opensearch.commons.alerting.model.Table; +import org.opensearch.client.Client; +import org.opensearch.common.lucene.uid.Versions; +import org.opensearch.commons.alerting.model.ActionExecutionResult; +import org.opensearch.commons.alerting.model.Alert; +import org.opensearch.commons.authuser.User; import org.opensearch.common.unit.TimeValue; import org.opensearch.common.xcontent.LoggingDeprecationHandler; import org.opensearch.common.xcontent.XContentFactory; @@ -39,6 +44,12 @@ import org.opensearch.search.sort.SortOrder; import org.opensearch.securityanalytics.action.CorrelationAckAlertsResponse; import org.opensearch.securityanalytics.action.GetCorrelationAlertsResponse; +import org.opensearch.core.xcontent.XContentParserUtils; +import org.opensearch.index.query.BoolQueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.SearchHit; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.commons.alerting.model.CorrelationAlert; import org.opensearch.securityanalytics.util.CorrelationIndices; import java.io.IOException; import java.time.Instant; @@ -320,7 +331,7 @@ private CorrelationAlert getParsedCorrelationAlert(SearchHit hit) throws IOExcep CorrelationAlert correlationAlert = CorrelationAlertsList.parse(xcp, hit.getId(), hit.getVersion()); return correlationAlert; } - + } diff --git a/src/main/java/org/opensearch/securityanalytics/correlation/alert/CorrelationAlertsList.java b/src/main/java/org/opensearch/securityanalytics/correlation/alert/CorrelationAlertsList.java index e7e45afe5..2770f3eaa 100644 --- a/src/main/java/org/opensearch/securityanalytics/correlation/alert/CorrelationAlertsList.java +++ b/src/main/java/org/opensearch/securityanalytics/correlation/alert/CorrelationAlertsList.java @@ -4,6 +4,7 @@ */ package org.opensearch.securityanalytics.correlation.alert; + import org.opensearch.commons.alerting.model.ActionExecutionResult; import org.opensearch.commons.alerting.model.Alert; import org.opensearch.commons.alerting.model.CorrelationAlert; @@ -129,6 +130,7 @@ public static CorrelationAlert parse(XContentParser xcp, String id, long version ); } + public List getCorrelationAlertList() { return correlationAlertList; }