org.apache.archiva.audit
Class DefaultAuditManager
java.lang.Object
org.apache.archiva.audit.DefaultAuditManager
- All Implemented Interfaces:
- AuditManager
@Service(value="auditManager#default")
public class DefaultAuditManager
- extends Object
- implements AuditManager
Method Summary |
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NUM_RECENT_EVENTS
private static final int NUM_RECENT_EVENTS
- See Also:
- Constant Field Values
log
private static final org.slf4j.Logger log
UTC_TIME_ZONE
private static final TimeZone UTC_TIME_ZONE
DefaultAuditManager
public DefaultAuditManager()
getMostRecentAuditEvents
public List<AuditEvent> getMostRecentAuditEvents(MetadataRepository metadataRepository,
List<String> repositoryIds)
throws MetadataRepositoryException
- Specified by:
getMostRecentAuditEvents
in interface AuditManager
- Throws:
MetadataRepositoryException
addAuditEvent
public void addAuditEvent(MetadataRepository repository,
AuditEvent event)
throws MetadataRepositoryException
- Specified by:
addAuditEvent
in interface AuditManager
- Throws:
MetadataRepositoryException
deleteAuditEvents
public void deleteAuditEvents(MetadataRepository metadataRepository,
String repositoryId)
throws MetadataRepositoryException
- Specified by:
deleteAuditEvents
in interface AuditManager
- Throws:
MetadataRepositoryException
getAuditEventsInRange
public List<AuditEvent> getAuditEventsInRange(MetadataRepository metadataRepository,
Collection<String> repositoryIds,
Date startTime,
Date endTime)
throws MetadataRepositoryException
- Description copied from interface:
AuditManager
- Get all audit events from the given repositories that match a certain range
- Specified by:
getAuditEventsInRange
in interface AuditManager
repositoryIds
- the repositories to retrieve events forstartTime
- find events only after this timeendTime
- find events only before this time
- Returns:
- the list of events found
- Throws:
MetadataRepositoryException
getAuditEventsInRange
public List<AuditEvent> getAuditEventsInRange(MetadataRepository metadataRepository,
Collection<String> repositoryIds,
String resource,
Date startTime,
Date endTime)
throws MetadataRepositoryException
- Description copied from interface:
AuditManager
- Get all audit events from the given repositories that match a certain range and resource pattern
- Specified by:
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 time
- Returns:
- the list of events found
- Throws:
MetadataRepositoryException
createNameFormat
private static SimpleDateFormat createNameFormat()
Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.