Skip to content

Commit

Permalink
Audit services code cleanup #3262
Browse files Browse the repository at this point in the history
  • Loading branch information
vrindanayak committed Jul 26, 2024
1 parent c1cf9e0 commit 2ffd5e7
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static void audit(AuditLogger auditLogger, Path path, AuditUtils.EventType event
EventIdentification eventIdentification = getEventIdentification(auditInfo, eventType);
eventIdentification.setEventDateTime(getEventTime(path, auditLogger));
String archiveUserID = auditInfo.getField(AuditInfo.ARCHIVE_USER_ID);
ParticipantObjectIdentification archivePOI = archive(archiveUserID);
ParticipantObjectIdentification archivePOI = archive(archiveUserID, reader);
if (auditInfo.getField(AuditInfo.CALLING_USERID) == null) {
ActiveParticipant archive = archive(archiveUserID, AuditMessages.UserIDTypeCode.DeviceName, auditLogger);
emitAuditMessage(auditLogger, eventIdentification, Collections.singletonList(archive), archivePOI);
Expand Down Expand Up @@ -88,11 +88,15 @@ private static EventIdentification getEventIdentification(AuditInfo auditInfo, A
return ei;
}

private static ParticipantObjectIdentification archive(String archiveUserID) {
private static ParticipantObjectIdentification archive(String archiveUserID, SpoolFileReader reader) {
ParticipantObjectIdentification archive = new ParticipantObjectIdentification();
archive.setParticipantObjectID(archiveUserID);
archive.setParticipantObjectIDTypeCode(AuditMessages.ParticipantObjectIDTypeCode.DeviceName);
archive.setParticipantObjectTypeCode(AuditMessages.ParticipantObjectTypeCode.SystemObject);
archive.getParticipantObjectDetail().add((AuditMessages.createParticipantObjectDetail("Alert Description",
!reader.getInstanceLines().isEmpty()
? String.join("\n", reader.getInstanceLines())
: null)));
return archive;
}

Expand Down

0 comments on commit 2ffd5e7

Please sign in to comment.