Class BulkAuditLogger
- java.lang.Object
-
- org.linuxforhealth.fhir.bulkdata.audit.BulkAuditLogger
-
public class BulkAuditLogger extends java.lang.ObjectThis class provides convenience methods for FHIR Java Batch Jobs that access and manipulate FHIR Data, thus needing to write FHIR audit log entries.
-
-
Constructor Summary
Constructors Constructor Description BulkAuditLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidlogCreateOnImport(Resource newResource, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users)Builds an audit log entry for a 'create' in a bulkdata service invocation.voidlogFastOnExport(java.lang.String resource, java.lang.String queryParm, int totalSearch, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users)Builds an audit log entry for a 'search' in a bulkdata service invocation.voidlogReadOnExport(Resource resource, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users)Builds an audit log entry for a 'read' in a bulkdata service invocation.voidlogSearchOnExport(java.lang.String resource, java.util.Map<java.lang.String,java.util.List<java.lang.String>> queryParms, int totalSearch, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users)Builds an audit log entry for a 'search' in a bulkdata service invocation.voidlogUpdateOnImport(Resource updatedResource, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users)Builds an audit log entry for an 'update' in a bulkdata service invocation.voidlogUpdateOnImportSkipped(Resource resource, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users)Builds an audit log entry for an 'update' skipped in a bulkdata service invocation.voidlogValidateOnImport(Resource newResource, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users)Builds an audit log entry for a 'validate' in a bulkdata service invocation.booleanshouldLog()
-
-
-
Method Detail
-
shouldLog
public boolean shouldLog()
-
logCreateOnImport
public void logCreateOnImport(Resource newResource, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users) throws java.lang.Exception
Builds an audit log entry for a 'create' in a bulkdata service invocation.- Parameters:
newResource- The Resource object being created.startTime- The start time of the create request execution.endTime- The end time of the create request execution.responseStatus- The response status.location- the destination or source for the export or importusers- the principals that initiated the request- Throws:
java.lang.Exception
-
logValidateOnImport
public void logValidateOnImport(Resource newResource, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users) throws java.lang.Exception
Builds an audit log entry for a 'validate' in a bulkdata service invocation.- Parameters:
newResource- The Resource object being created.startTime- The start time of the create request execution.endTime- The end time of the create request execution.responseStatus- The response status.location- the destination or source for the export or importusers- the principals that initiated the request- Throws:
java.lang.Exception
-
logUpdateOnImport
public void logUpdateOnImport(Resource updatedResource, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users) throws java.lang.Exception
Builds an audit log entry for an 'update' in a bulkdata service invocation.- Parameters:
updatedResource- The updated version of the Resource.startTime- The start time of the update request execution.endTime- The end time of the update request execution.responseStatus- The response status.location- the destination or source for the export or importusers- the principals that initiated the request- Throws:
java.lang.Exception
-
logUpdateOnImportSkipped
public void logUpdateOnImportSkipped(Resource resource, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users) throws java.lang.Exception
Builds an audit log entry for an 'update' skipped in a bulkdata service invocation.- Parameters:
resource- The updated version of the Resource.startTime- The start time of the update request execution.endTime- The end time of the update request execution.responseStatus- The response status.location- the destination or source for the export or importusers- the principals that initiated the request- Throws:
java.lang.Exception
-
logReadOnExport
public void logReadOnExport(Resource resource, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users) throws java.lang.Exception
Builds an audit log entry for a 'read' in a bulkdata service invocation.- Parameters:
resource- The Resource object being read.startTime- The start time of the read request execution.endTime- The end time of the read request execution.responseStatus- The response status.location- the destination or source for the export or importusers- the principals that initiated the request- Throws:
java.lang.Exception
-
logSearchOnExport
public void logSearchOnExport(java.lang.String resource, java.util.Map<java.lang.String,java.util.List<java.lang.String>> queryParms, int totalSearch, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users) throws java.lang.ExceptionBuilds an audit log entry for a 'search' in a bulkdata service invocation.- Parameters:
resource- the resourcequeryParms- The query parameters passed to the search service.totalSearch- The total retrievedstartTime- The start time of the bundle request execution.endTime- The end time of the bundle request execution.responseStatus- The response status.location- the destination or source for the export or importusers- the principals that initiated the request- Throws:
java.lang.Exception
-
logFastOnExport
public void logFastOnExport(java.lang.String resource, java.lang.String queryParm, int totalSearch, java.util.Date startTime, java.util.Date endTime, javax.ws.rs.core.Response.Status responseStatus, java.lang.String location, java.lang.String users) throws java.lang.ExceptionBuilds an audit log entry for a 'search' in a bulkdata service invocation.- Parameters:
resource- the resourcequeryParm- The query parameter passed to the search service.totalSearch- The total retrievedstartTime- The start time of the bundle request execution.endTime- The end time of the bundle request execution.responseStatus- The response status.location- the destination or source for the export or importusers- the principals that initiated the request- Throws:
java.lang.Exception
-
-