Class BulkAuditLogger


  • public class BulkAuditLogger
    extends java.lang.Object
    This 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
      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)
      Builds an audit log entry for a 'create' in a bulkdata service invocation.
      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)
      Builds an audit log entry for a 'search' in a bulkdata service invocation.
      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)
      Builds an audit log entry for a 'read' in a bulkdata service invocation.
      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)
      Builds an audit log entry for a 'search' in a bulkdata service invocation.
      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)
      Builds an audit log entry for an 'update' in a bulkdata service invocation.
      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)
      Builds an audit log entry for an 'update' skipped in a bulkdata service invocation.
      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)
      Builds an audit log entry for a 'validate' in a bulkdata service invocation.
      boolean shouldLog()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BulkAuditLogger

        public BulkAuditLogger()
    • 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 import
        users - 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 import
        users - 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 import
        users - 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 import
        users - 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 import
        users - 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.Exception
        Builds an audit log entry for a 'search' in a bulkdata service invocation.
        Parameters:
        resource - the resource
        queryParms - The query parameters passed to the search service.
        totalSearch - The total retrieved
        startTime - 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 import
        users - 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.Exception
        Builds an audit log entry for a 'search' in a bulkdata service invocation.
        Parameters:
        resource - the resource
        queryParm - The query parameter passed to the search service.
        totalSearch - The total retrieved
        startTime - 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 import
        users - the principals that initiated the request
        Throws:
        java.lang.Exception