@@ -188,10 +188,16 @@ public DataRegionTable goToAuditEventView(String eventType)
188188 */
189189 public SelectRowsResponse getAuditLogsFromLKS (String containerPath , AuditEvent auditEventName , List <String > columnNames ,
190190 @ Nullable List <Filter > filters , @ Nullable Integer maxRows , @ Nullable ContainerFilter containerFilter ) throws IOException , CommandException
191+ {
192+ return getAuditLogsFromLKS (containerPath , _wrapper .getCurrentProject (), auditEventName , columnNames , filters , maxRows , containerFilter );
193+ }
194+
195+ public SelectRowsResponse getAuditLogsFromLKS (String containerPath , @ NotNull String projectName , AuditEvent auditEventName , List <String > columnNames ,
196+ @ Nullable List <Filter > filters , @ Nullable Integer maxRows , @ Nullable ContainerFilter containerFilter ) throws IOException , CommandException
191197 {
192198 SelectRowsCommand cmd = new SelectRowsCommand ("auditLog" , auditEventName .getName ());
193199 cmd .setColumns (columnNames );
194- cmd .addFilter ("ProjectId/Name" , _wrapper . getCurrentProject () , Filter .Operator .EQUAL );
200+ cmd .addFilter ("ProjectId/Name" , projectName , Filter .Operator .EQUAL );
195201 if (filters != null )
196202 filters .forEach (cmd ::addFilter );
197203 if (maxRows != null )
@@ -208,7 +214,7 @@ public List<Map<String, Object>> getAuditLogsForTransactionId(String containerPa
208214 }
209215
210216 public List <Map <String , Object >> getAuditLogsForTransactionId (String containerPath , AuditEvent auditEventName , List <String > columnNames ,
211- Integer transactionId , List <Filter > eventFilters , @ Nullable ContainerFilter containerFilter ) throws IOException , CommandException
217+ Integer transactionId , @ Nullable List <Filter > eventFilters , @ Nullable ContainerFilter containerFilter ) throws IOException , CommandException
212218 {
213219 List <Filter > transactionFilter = new ArrayList <>();
214220 if (transactionId != null )
@@ -218,6 +224,22 @@ public List<Map<String, Object>> getAuditLogsForTransactionId(String containerPa
218224 return getAuditLogsFromLKS (containerPath , auditEventName , columnNames , transactionFilter , null , containerFilter ).getRows ();
219225 }
220226
227+ public List <Map <String , Object >> getAuditLogsForTransactionId (String containerPath ,
228+ AuditEvent auditEventName ,
229+ List <String > columnNames ,
230+ String projectName ,
231+ Integer transactionId ,
232+ List <Filter > eventFilters ,
233+ @ Nullable ContainerFilter containerFilter ) throws IOException , CommandException
234+ {
235+ List <Filter > transactionFilter = new ArrayList <>();
236+ if (transactionId != null )
237+ transactionFilter .add (new Filter ("TransactionId" , transactionId , Filter .Operator .EQUAL ));
238+ if (eventFilters != null && !eventFilters .isEmpty ())
239+ transactionFilter .addAll (eventFilters );
240+ return getAuditLogsFromLKS (containerPath , projectName , auditEventName , columnNames , transactionFilter , null , containerFilter ).getRows ();
241+ }
242+
221243 public void checkAuditEventValuesForTransactionId (String containerPath , AuditEvent auditEventName , Integer transactionId , int rowCount , Map <String , Object > expectedValues ) throws IOException , CommandException
222244 {
223245 checkAuditEventValuesForTransactionId (containerPath , auditEventName , transactionId , null , rowCount , expectedValues );
0 commit comments