public class DefaultAuditBackend extends AbstractAuditBackend implements AuditBackend
Constructor and Description |
---|
DefaultAuditBackend() |
Modifier and Type | Method and Description |
---|---|
void |
addLogEntries(List<LogEntry> entries)
Adds given log entries.
|
void |
addLogEntry(javax.persistence.EntityManager em,
LogEntry entry) |
void |
addLogEntry(LogEntry entry) |
void |
deactivate() |
Long |
getEventsCount(javax.persistence.EntityManager em,
String eventId) |
Long |
getEventsCount(String eventId) |
List<LogEntry> |
getLogEntriesFor(String uuid)
Returns the logs given a doc uuid.
|
List<LogEntry> |
getLogEntriesFor(String uuid,
Map<String,FilterMapEntry> filterMap,
boolean doDefaultSort) |
LogEntry |
getLogEntryByID(long id)
Returns a given log entry given its id.
|
List<String> |
getLoggedEventIds() |
PersistenceProvider |
getOrCreatePersistenceProvider() |
void |
logEvent(Event event)
Logs an Event.
|
void |
logEvents(EventBundle eventBundle)
Logs a bundle of events
|
List<?> |
nativeQuery(String query,
int pageNb,
int pageSize)
Returns a batched list of entries.
|
List<?> |
nativeQuery(String query,
Map<String,Object> params,
int pageNb,
int pageSize)
Returns a batched list of entries.
|
List<LogEntry> |
nativeQueryLogs(String whereClause,
int pageNb,
int pageSize)
Returns a batched list of log entries.
|
List<LogEntry> |
queryLogs(String[] eventIds,
String dateRange)
Returns the list of log entries.
|
List<LogEntry> |
queryLogsByPage(String[] eventIds,
Date limit,
String[] category,
String path,
int pageNb,
int pageSize) |
List<LogEntry> |
queryLogsByPage(String[] eventIds,
String dateRange,
String[] category,
String path,
int pageNb,
int pageSize) |
long |
syncLogCreationEntries(String repoId,
String path,
Boolean recurs)
Forces log Synchronisation for a branch of the repository.
|
activate, getAuditableEventNames, newExtendedInfo, newLogEntry, queryLogsByPage, queryLogsByPage
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate
queryLogsByPage, queryLogsByPage
getAuditableEventNames, newExtendedInfo, newLogEntry
public PersistenceProvider getOrCreatePersistenceProvider()
public void deactivate()
deactivate
in interface AuditBackend
public void addLogEntries(List<LogEntry> entries)
AuditLogger
addLogEntries
in interface AuditLogger
entries
- the list of log entries.public List<LogEntry> getLogEntriesFor(String uuid)
AuditReader
getLogEntriesFor
in interface AuditReader
getLogEntriesFor
in class AbstractAuditBackend
uuid
- the document uuidpublic List<LogEntry> getLogEntriesFor(String uuid, Map<String,FilterMapEntry> filterMap, boolean doDefaultSort)
getLogEntriesFor
in interface AuditReader
public LogEntry getLogEntryByID(long id)
AuditReader
getLogEntryByID
in interface AuditReader
id
- the log entry identifierpublic List<LogEntry> nativeQueryLogs(String whereClause, int pageNb, int pageSize)
AuditReader
nativeQueryLogs
in interface AuditReader
nativeQueryLogs
in class AbstractAuditBackend
public List<?> nativeQuery(String query, int pageNb, int pageSize)
AuditReader
nativeQuery
in interface AuditReader
nativeQuery
in class AbstractAuditBackend
public List<?> nativeQuery(String query, Map<String,Object> params, int pageNb, int pageSize)
AuditReader
nativeQuery
in interface AuditReader
query
- a JPA query language queryparams
- parameters for the querypageNb
- the page number (starts at 1)pageSize
- the number of results per pagepublic List<LogEntry> queryLogs(String[] eventIds, String dateRange)
AuditReader
Note we will use NXQL in the future when the search engine will index history.
queryLogs
in interface AuditReader
queryLogs
in class AbstractAuditBackend
eventIds
- the event ids.dateRange
- a preset date range.DateRangeQueryConstants
public List<LogEntry> queryLogsByPage(String[] eventIds, String dateRange, String[] category, String path, int pageNb, int pageSize)
queryLogsByPage
in interface AuditReader
public List<LogEntry> queryLogsByPage(String[] eventIds, Date limit, String[] category, String path, int pageNb, int pageSize)
queryLogsByPage
in interface AuditReader
public long syncLogCreationEntries(String repoId, String path, Boolean recurs)
AuditAdmin
syncLogCreationEntries
in interface AuditAdmin
public void addLogEntry(LogEntry entry)
public void addLogEntry(javax.persistence.EntityManager em, LogEntry entry)
public Long getEventsCount(String eventId)
getEventsCount
in interface AuditAdmin
public void logEvent(Event event)
AuditLogger
logEvent
in interface AuditLogger
logEvent
in class AbstractAuditBackend
public void logEvents(EventBundle eventBundle)
AuditLogger
logEvents
in interface AuditLogger
logEvents
in class AbstractAuditBackend
Copyright © 2015 Nuxeo SA. All rights reserved.