Class SqaleAuditService

java.lang.Object
com.evolveum.midpoint.repo.sqale.SqaleServiceBase
com.evolveum.midpoint.repo.sqale.audit.SqaleAuditService
All Implemented Interfaces:
AuditService

public class SqaleAuditService extends SqaleServiceBase implements AuditService
Audit service using SQL DB as a store, also allows for searching (see supportsRetrieval()).
  • Constructor Details

  • Method Details

    • audit

      public void audit(AuditEventRecord record, Task task, OperationResult parentResult)
      Description copied from interface: AuditService
      Emits audit event record, e.g. writes it in the database or logs it to a file. If audit is recorded to the repository, AuditEventRecord.repoId will be set, any provided ID is ignored. This is high-level audit method that also tries to complete the audit event record, e.g. filling in missing task information, current timestamp if none is provided, etc.
      Specified by:
      audit in interface AuditService
    • audit

      public void audit(AuditEventRecordType record, OperationResult parentResult)
      Description copied from interface: AuditService
      Emits audit event record provided as a generated Prism bean. Used for audit import functionality. This is a low-level audit method that does not process provided record at all.
      Specified by:
      audit in interface AuditService
    • cleanupAudit

      public void cleanupAudit(CleanupPolicyType policy, OperationResult parentResult)
      Description copied from interface: AuditService
      Clean up audit records that are older than specified.
      Specified by:
      cleanupAudit in interface AuditService
      Parameters:
      policy - Records will be deleted base on this policy.
    • supportsRetrieval

      public boolean supportsRetrieval()
      Description copied from interface: AuditService
      Returns true if retrieval of objects from the audit trail is supported. This applies to listRecords, countObjects, reconstructObject and similar operations.
      Specified by:
      supportsRetrieval in interface AuditService
    • applyAuditConfiguration

      public void applyAuditConfiguration(@Nullable @Nullable SystemConfigurationAuditType configuration)
      Description copied from interface: AuditService
      Called when audit configuration is established or changed. Setting to null means to use default values for the settings.
      Specified by:
      applyAuditConfiguration in interface AuditService
    • countObjects

      public int countObjects(@Nullable @Nullable ObjectQuery query, @Nullable @Nullable Collection<SelectorOptions<GetOperationOptions>> options, @NotNull @NotNull OperationResult parentResult)
      Description copied from interface: AuditService
      Returns the number of audit events that match the specified query. If query is null or no filter in query is specified, count of all audit events is returned. Ignores any paging and ordering from the query.
      Specified by:
      countObjects in interface AuditService
      Parameters:
      query - search query
      parentResult - parent operation result (in/out)
      Returns:
      count of audit events of specified type that match the search criteria
    • searchObjects

      @NotNull public @NotNull SearchResultList<AuditEventRecordType> searchObjects(@Nullable @Nullable ObjectQuery query, @Nullable @Nullable Collection<SelectorOptions<GetOperationOptions>> options, @NotNull @NotNull OperationResult parentResult) throws SchemaException
      Description copied from interface: AuditService
      Returns the result list of audit events that match the specified query. If query is null or no filter in query is specified, all audit events are returned, subject to paging or internal sanity limit.
      Specified by:
      searchObjects in interface AuditService
      Parameters:
      query - search query
      parentResult - parent operation result (in/out)
      Returns:
      list of audit events of specified type that match the search criteria
      Throws:
      SchemaException
    • searchObjectsIterative

      public SearchResultMetadata searchObjectsIterative(@Nullable @Nullable ObjectQuery query, @NotNull @NotNull AuditResultHandler handler, @Nullable @Nullable Collection<SelectorOptions<GetOperationOptions>> options, @NotNull @NotNull OperationResult parentResult) throws SchemaException
      Description copied from interface: AuditService
      Executes iterative search using the provided `handler` to process each object.
      Specified by:
      searchObjectsIterative in interface AuditService
      Parameters:
      query - search query
      handler - result handler
      options - get options to use for the search
      parentResult - parent OperationResult (in/out)
      Returns:
      summary information about the search result
      Throws:
      SchemaException
    • registerOperationStart

      protected long registerOperationStart(String kind)