Skip to content

Commit

Permalink
audit refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
vrindanayak committed Sep 18, 2018
1 parent f09c819 commit e47efa9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private ActiveParticipantBuilder[] buildApplicationActivityActiveParticipants(
userID,
archiveInfo.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(AuditMessages.userIDTypeCode(userID))
.requester(true)
.isRequester()
.roleIDCode(eventType.source)
.build();
}
Expand Down Expand Up @@ -396,7 +396,7 @@ private void auditQueueMessageEvent(AuditLogger auditLogger, Path path, AuditSer
callingUserID,
info.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(callingUserIDTypeCode(archiveUserIDTypeCode, callingUserID))
.requester(true).build();
.isRequester().build();
apBuilder[1] = new ActiveParticipantBuilder.Builder(
calledUserID,
getLocalHostName(auditLogger))
Expand Down Expand Up @@ -466,12 +466,12 @@ private void auditSoftwareConfiguration(AuditLogger auditLogger, Path path, Audi
callingUserID,
auditInfo.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(AuditMessages.userIDTypeCode(callingUserID))
.requester(true).build()
.isRequester().build()
: new ActiveParticipantBuilder.Builder(
calledUserID,
getLocalHostName(auditLogger))
.userIDTypeCode(archiveUserIDTypeCode(calledUserID))
.requester(true).build();
.isRequester().build();
ParticipantObjectIdentificationBuilder poiLDAPDiff = new ParticipantObjectIdentificationBuilder.Builder(calledUserID,
AuditMessages.ParticipantObjectIDTypeCode.DeviceName,
AuditMessages.ParticipantObjectTypeCode.SystemObject,
Expand Down Expand Up @@ -520,7 +520,7 @@ private void auditDeletion(AuditLogger auditLogger, Path path, AuditServiceUtils
callingUserID,
auditInfo.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(callingUserIDTypeCode(archiveUserIDTypeCode, callingUserID))
.requester(true).build();
.isRequester().build();
activeParticipantBuilder[1] = new ActiveParticipantBuilder.Builder(
archiveUserID,
getLocalHostName(auditLogger))
Expand All @@ -533,7 +533,7 @@ private void auditDeletion(AuditLogger auditLogger, Path path, AuditServiceUtils
getLocalHostName(auditLogger))
.userIDTypeCode(AuditMessages.UserIDTypeCode.DeviceName)
.altUserID(AuditLogger.processID())
.requester(true).build();
.isRequester().build();


ParticipantObjectDescriptionBuilder desc = new ParticipantObjectDescriptionBuilder.Builder()
Expand Down Expand Up @@ -588,7 +588,7 @@ private void auditExternalRetrieve(AuditLogger auditLogger, Path path, AuditServ
userID,
i.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(AuditMessages.userIDTypeCode(userID))
.requester(true)
.isRequester()
.build();
activeParticipantBuilder[1] = new ActiveParticipantBuilder.Builder(
i.getField(AuditInfo.MOVE_USER_ID),
Expand Down Expand Up @@ -645,7 +645,7 @@ private void auditConnectionRejected(AuditLogger auditLogger, Path path, AuditSe
userID = napID = crI.getField(AuditInfo.CALLING_HOST);
activeParticipantBuilder[1] = new ActiveParticipantBuilder.Builder(userID, napID)
.userIDTypeCode(AuditMessages.UserIDTypeCode.NodeID)
.requester(true).build();
.isRequester().build();

ParticipantObjectIdentificationBuilder poi = new ParticipantObjectIdentificationBuilder.Builder(
crI.getField(AuditInfo.CALLING_HOST),
Expand Down Expand Up @@ -758,7 +758,7 @@ private void auditQuery(
callingUserID,
qrI.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(callingUserIDTypeCode(archiveUserIDTypeCode, callingUserID))
.requester(true)
.isRequester()
.roleIDCode(eventType.source)
.build();
activeParticipantBuilder[1] = new ActiveParticipantBuilder.Builder(
Expand Down Expand Up @@ -1049,7 +1049,7 @@ private ActiveParticipantBuilder[] storeWadoURIActiveParticipants(
callingUserID,
auditInfo.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(callingUserIDTypeCode(archiveUserIDTypeCode, callingUserID))
.requester(true)
.isRequester()
.roleIDCode(eventType.source)
.build();
activeParticipantBuilder[1] = new ActiveParticipantBuilder.Builder(
Expand Down Expand Up @@ -1157,7 +1157,7 @@ private ActiveParticipantBuilder[] getApsForMove(AuditServiceUtils.EventType eve
ri.getField(AuditInfo.MOVE_USER_ID),
ri.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(AuditMessages.UserIDTypeCode.StationAETitle)
.requester(true)
.isRequester()
.build();
return activeParticipantBuilder;
}
Expand All @@ -1177,7 +1177,7 @@ private ActiveParticipantBuilder[] getApsForExport(AuditServiceUtils.EventType e
getLocalHostName(auditLogger))
.userIDTypeCode(archiveUserIDTypeCode)
.altUserID(AuditLogger.processID())
.requester(true)
.isRequester()
.roleIDCode(eventType.source)
.build();

Expand All @@ -1194,7 +1194,7 @@ private ActiveParticipantBuilder[] getApsForExport(AuditServiceUtils.EventType e
callingUserID,
ri.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(AuditMessages.userIDTypeCode(callingUserID))
.requester(true)
.isRequester()
.build();
}
return activeParticipantBuilder;
Expand All @@ -1216,7 +1216,7 @@ private ActiveParticipantBuilder[] getApsForGetOrWadoRS(AuditServiceUtils.EventT
callingUserID,
ri.getField(AuditInfo.DEST_NAP_ID))
.userIDTypeCode(callingUserIDTypeCode(archiveUserIDTypeCode, callingUserID))
.requester(true)
.isRequester()
.roleIDCode(eventType.destination)
.build();
return activeParticipantBuilder;
Expand Down Expand Up @@ -1565,7 +1565,7 @@ private ActiveParticipantBuilder[] getSchedulerTriggeredActiveParticipant(AuditL
getLocalHostName(auditLogger))
.userIDTypeCode(AuditMessages.UserIDTypeCode.DeviceName)
.altUserID(AuditLogger.processID())
.requester(true)
.isRequester()
.roleIDCode(et.destination)
.build();
return activeParticipantBuilder;
Expand All @@ -1589,7 +1589,7 @@ private ActiveParticipantBuilder[] getInternalPatientRecordActiveParticipants(
callingUserID,
auditInfo.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(callingUserIDTypeCode(archiveUserIDTypeCode, callingUserID))
.requester(true)
.isRequester()
.roleIDCode(et.source)
.build();
return activeParticipantBuilder;
Expand Down Expand Up @@ -1630,14 +1630,14 @@ private ActiveParticipantBuilder[] getOutgoingPatientRecordActiveParticipants(
getLocalHostName(auditLogger))
.userIDTypeCode(AuditMessages.UserIDTypeCode.DeviceName)
.altUserID(AuditLogger.processID())
.requester(true)
.isRequester()
.build();
else {
activeParticipantBuilder[2] = new ActiveParticipantBuilder.Builder(
callingUserID,
auditInfo.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(AuditMessages.userIDTypeCode(callingUserID))
.requester(true)
.isRequester()
.build();
activeParticipantBuilder[3] = new ActiveParticipantBuilder.Builder(
calledUserID,
Expand Down Expand Up @@ -1744,7 +1744,7 @@ private ActiveParticipantBuilder[] buildProcedureRecordActiveParticipants(AuditL
.userIDTypeCode(callingUserIDTypeCode(archiveUserIDTypeCode, callingUserID)).build()
: new ActiveParticipantBuilder.Builder(callingUserID, prI.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(callingUserIDTypeCode(archiveUserIDTypeCode, callingUserID))
.requester(true).build();
.isRequester().build();
activeParticipantBuilder[1] = new ActiveParticipantBuilder.Builder(
archiveUserID,
getLocalHostName(auditLogger))
Expand All @@ -1757,7 +1757,7 @@ private ActiveParticipantBuilder[] buildProcedureRecordActiveParticipants(AuditL
getLocalHostName(auditLogger))
.userIDTypeCode(AuditMessages.UserIDTypeCode.DeviceName)
.altUserID(AuditLogger.processID())
.requester(true)
.isRequester()
.build();
return activeParticipantBuilder;
}
Expand Down Expand Up @@ -1807,15 +1807,15 @@ private ActiveParticipantBuilder[] buildProvideRegisterActiveParticipants(
callingUserID,
ai.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(AuditMessages.userIDTypeCode(callingUserID))
.requester(true)
.isRequester()
.build();
} else
activeParticipantBuilder[1] = new ActiveParticipantBuilder.Builder(
device.getDeviceName(),
getLocalHostName(auditLogger))
.altUserID(AuditLogger.processID())
.userIDTypeCode(AuditMessages.UserIDTypeCode.DeviceName)
.requester(true)
.isRequester()
.roleIDCode(et.source)
.build();
return activeParticipantBuilder;
Expand Down Expand Up @@ -1947,7 +1947,7 @@ private void auditStorageCommit(AuditLogger auditLogger, Path path, AuditService
callingUserID,
auditInfo.getField(AuditInfo.CALLING_HOST))
.userIDTypeCode(callingUserIDTypeCode(archiveUserIDTypeCode, callingUserID))
.requester(true)
.isRequester()
.roleIDCode(et.source).build();

String[] studyUIDs = StringUtils.split(auditInfo.getField(AuditInfo.STUDY_UID), ';');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private static ActiveParticipantBuilder buildActiveParticipant(HttpServletReques
request.getRemoteHost())
.userIDTypeCode(AuditMessages.userIDTypeCode(userID))
.altUserID(AuditLogger.processID())
.requester(true).build();
.isRequester().build();
}

private static EventIdentificationBuilder buildEventIdentification(AuditLogger logger) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private static ActiveParticipantBuilder buildActiveParticipant(HttpServletReques
request.getRemoteHost())
.userIDTypeCode(AuditMessages.userIDTypeCode(userID))
.altUserID(AuditLogger.processID())
.requester(true).build();
.isRequester().build();
}

private static EventIdentificationBuilder buildEventIdentification(AuditLogger logger) {
Expand Down

0 comments on commit e47efa9

Please sign in to comment.