Class NoOpAuditService
java.lang.Object
com.atlassian.crowd.manager.audit.NoOpAuditService
- All Implemented Interfaces:
AuditService
No-op implementation of
AuditService
, to be used by products embedding Crowd.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns current auditing configurationboolean
void
saveAudit
(AuditLogChangeset changeset) Persists an audit log changeset.void
saveConfiguration
(AuditLogConfiguration auditLogConfiguration) Sets the new configuration for auditingsearchAuditLog
(AuditLogQuery query) Queries the audit log.boolean
Allows the caller to determine whether it should attempt to generate audit events.
-
Constructor Details
-
NoOpAuditService
public NoOpAuditService()
-
-
Method Details
-
saveAudit
Description copied from interface:AuditService
Persists an audit log changeset. The timestamp will be set to the current time. Will not do anything when audit log is disabled.- Specified by:
saveAudit
in interfaceAuditService
- Parameters:
changeset
- the changeset that will be persisted
-
searchAuditLog
Description copied from interface:AuditService
Queries the audit log. Returns aList
ofAuditLogChangeset
s, which match the criteria specified in the query. The results will be sorted by the timestamp, descending.- Specified by:
searchAuditLog
in interfaceAuditService
- Parameters:
query
- the search query- Returns:
- List of AuditLogEntry matching the query
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceAuditService
- Returns:
- true if the audit log is enabled, false otherwise. A disabled audit log will not persist any new entries.
-
saveConfiguration
Description copied from interface:AuditService
Sets the new configuration for auditing- Specified by:
saveConfiguration
in interfaceAuditService
- Parameters:
auditLogConfiguration
- new configuration
-
getConfiguration
Description copied from interface:AuditService
Returns current auditing configuration- Specified by:
getConfiguration
in interfaceAuditService
- Returns:
- current configuration
-
shouldAuditEvent
public boolean shouldAuditEvent()Description copied from interface:AuditService
Allows the caller to determine whether it should attempt to generate audit events. Auditing might be disabled globally, or it might be disabled during specific operations or states (for example during synchronizations).- Specified by:
shouldAuditEvent
in interfaceAuditService
- Returns:
- true if calling saveAudit() will persist the event, false otherwise
-