org.apache.archiva.audit
Class DefaultAuditManager

java.lang.Object
  extended by org.apache.archiva.audit.DefaultAuditManager
All Implemented Interfaces:
AuditManager

@Service(value="auditManager#default")
public class DefaultAuditManager
extends Object
implements AuditManager


Nested Class Summary
private static class DefaultAuditManager.AuditRecord
           
 
Field Summary
private static org.slf4j.Logger log
           
private static int NUM_RECENT_EVENTS
           
private static TimeZone UTC_TIME_ZONE
           
 
Constructor Summary
DefaultAuditManager()
           
 
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
 

Field Detail

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
Constructor Detail

DefaultAuditManager

public DefaultAuditManager()
Method Detail

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 for
startTime - find events only after this time
endTime - 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 for
resource - find all events whose resources start with this string
startTime - find events only after this time
endTime - 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.