Package com.evolveum.midpoint.audit.api
Interface AuditService
-
- All Known Implementing Classes:
SqlAuditServiceImpl
public interface AuditService
- Author:
- semancik
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_MESSAGE_SIZE
static int
MAX_PROPERTY_SIZE
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
applyAuditConfiguration(SystemConfigurationAuditType configuration)
Called when audit configuration is established or changed.void
audit(AuditEventRecord record, Task task)
void
cleanupAudit(CleanupPolicyType policy, OperationResult parentResult)
Clean up audit records that are older than specified.int
countObjects(@Nullable ObjectQuery query, @Nullable Collection<SelectorOptions<GetOperationOptions>> options, @NotNull OperationResult parentResult)
Returns the number of audit events that match the specified query.long
countObjects(String query, Map<String,Object> params)
List<AuditEventRecord>
listRecords(String query, Map<String,Object> params, OperationResult result)
void
reindexEntry(AuditEventRecord record)
Reindex audit record - currently does nothing.@NotNull SearchResultList<AuditEventRecordType>
searchObjects(@Nullable ObjectQuery query, @Nullable Collection<SelectorOptions<GetOperationOptions>> options, @NotNull OperationResult parentResult)
Returns the result list of audit events that match the specified query.boolean
supportsRetrieval()
Returns true if retrieval of objects from the audit trail is supported.
-
-
-
Field Detail
-
MAX_MESSAGE_SIZE
static final int MAX_MESSAGE_SIZE
- See Also:
- Constant Field Values
-
MAX_PROPERTY_SIZE
static final int MAX_PROPERTY_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
audit
void audit(AuditEventRecord record, Task task)
-
cleanupAudit
void cleanupAudit(CleanupPolicyType policy, OperationResult parentResult)
Clean up audit records that are older than specified.- Parameters:
policy
- Records will be deleted base on this policy.
-
listRecords
List<AuditEventRecord> listRecords(String query, Map<String,Object> params, OperationResult result)
- Throws:
UnsupportedOperationException
- if object retrieval is not supported
-
reindexEntry
void reindexEntry(AuditEventRecord record)
Reindex audit record - currently does nothing. Previously it effectively created missing changed items detail entities, which is less and less useful nowadays. TODO: In the future we may consider reindexing of new columns, but the functionality is currently not fully specified.
-
countObjects
long countObjects(String query, Map<String,Object> params)
- Throws:
UnsupportedOperationException
- if object retrieval is not supported
-
supportsRetrieval
boolean supportsRetrieval()
Returns true if retrieval of objects from the audit trail is supported. This applies to listRecords, countObjects, reconstructObject and similar operations.
-
applyAuditConfiguration
default void applyAuditConfiguration(SystemConfigurationAuditType configuration)
Called when audit configuration is established or changed.
-
countObjects
int countObjects(@Nullable @Nullable ObjectQuery query, @Nullable @Nullable Collection<SelectorOptions<GetOperationOptions>> options, @NotNull @NotNull OperationResult parentResult)
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.- Parameters:
query
- search queryparentResult
- parent operation result (in/out)- Returns:
- count of audit events of specified type that match the search criteria
-
searchObjects
@NotNull @NotNull SearchResultList<AuditEventRecordType> searchObjects(@Nullable @Nullable ObjectQuery query, @Nullable @Nullable Collection<SelectorOptions<GetOperationOptions>> options, @NotNull @NotNull OperationResult parentResult) throws SchemaException
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.- Parameters:
query
- search queryparentResult
- parent operation result (in/out)- Returns:
- list of audit events of specified type that match the search criteria
- Throws:
SchemaException
-
-