@Service(value="auditManager#default") public class DefaultAuditManager extends Object implements AuditManager
Modifier and Type | Class and Description |
---|---|
private static class |
DefaultAuditManager.AuditRecord |
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
log |
private static int |
NUM_RECENT_EVENTS |
private static TimeZone |
UTC_TIME_ZONE |
Constructor and Description |
---|
DefaultAuditManager() |
Modifier and Type | Method and Description |
---|---|
void |
addAuditEvent(MetadataRepository repository,
AuditEvent event) |
private static SimpleDateFormat |
createNameFormat() |
void |
deleteAuditEvents(MetadataRepository metadataRepository,
String repositoryId) |
List<AuditEvent> |
getAuditEventsInRange(MetadataRepository metadataRepository,
Collection<String> repositoryIds,
Date startTime,
Date endTime)
Get all audit events from the given repositories that match a certain range
|
List<AuditEvent> |
getAuditEventsInRange(MetadataRepository metadataRepository,
Collection<String> repositoryIds,
String resource,
Date startTime,
Date endTime)
Get all audit events from the given repositories that match a certain range and resource pattern
|
List<AuditEvent> |
getMostRecentAuditEvents(MetadataRepository metadataRepository,
List<String> repositoryIds) |
private static final int NUM_RECENT_EVENTS
private static final org.slf4j.Logger log
private static final TimeZone UTC_TIME_ZONE
public DefaultAuditManager()
public List<AuditEvent> getMostRecentAuditEvents(MetadataRepository metadataRepository, List<String> repositoryIds) throws MetadataRepositoryException
getMostRecentAuditEvents
in interface AuditManager
MetadataRepositoryException
public void addAuditEvent(MetadataRepository repository, AuditEvent event) throws MetadataRepositoryException
addAuditEvent
in interface AuditManager
MetadataRepositoryException
public void deleteAuditEvents(MetadataRepository metadataRepository, String repositoryId) throws MetadataRepositoryException
deleteAuditEvents
in interface AuditManager
MetadataRepositoryException
public List<AuditEvent> getAuditEventsInRange(MetadataRepository metadataRepository, Collection<String> repositoryIds, Date startTime, Date endTime) throws MetadataRepositoryException
AuditManager
getAuditEventsInRange
in interface AuditManager
repositoryIds
- the repositories to retrieve events forstartTime
- find events only after this timeendTime
- find events only before this timeMetadataRepositoryException
public List<AuditEvent> getAuditEventsInRange(MetadataRepository metadataRepository, Collection<String> repositoryIds, String resource, Date startTime, Date endTime) throws MetadataRepositoryException
AuditManager
getAuditEventsInRange
in interface AuditManager
repositoryIds
- the repositories to retrieve events forresource
- find all events whose resources start with this stringstartTime
- find events only after this timeendTime
- find events only before this timeMetadataRepositoryException
private static SimpleDateFormat createNameFormat()
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.