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, queryLogsByPageequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivatequeryLogsByPage, queryLogsByPagegetAuditableEventNames, newExtendedInfo, newLogEntrypublic PersistenceProvider getOrCreatePersistenceProvider()
public void deactivate()
deactivate in interface AuditBackendpublic void addLogEntries(List<LogEntry> entries)
AuditLoggeraddLogEntries in interface AuditLoggerentries - the list of log entries.public List<LogEntry> getLogEntriesFor(String uuid)
AuditReadergetLogEntriesFor in interface AuditReadergetLogEntriesFor in class AbstractAuditBackenduuid - the document uuidpublic List<LogEntry> getLogEntriesFor(String uuid, Map<String,FilterMapEntry> filterMap, boolean doDefaultSort)
getLogEntriesFor in interface AuditReaderpublic LogEntry getLogEntryByID(long id)
AuditReadergetLogEntryByID in interface AuditReaderid - the log entry identifierpublic List<LogEntry> nativeQueryLogs(String whereClause, int pageNb, int pageSize)
AuditReadernativeQueryLogs in interface AuditReadernativeQueryLogs in class AbstractAuditBackendpublic List<?> nativeQuery(String query, int pageNb, int pageSize)
AuditReadernativeQuery in interface AuditReadernativeQuery in class AbstractAuditBackendpublic List<?> nativeQuery(String query, Map<String,Object> params, int pageNb, int pageSize)
AuditReadernativeQuery in interface AuditReaderquery - 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)
AuditReaderNote we will use NXQL in the future when the search engine will index history.
queryLogs in interface AuditReaderqueryLogs in class AbstractAuditBackendeventIds - the event ids.dateRange - a preset date range.DateRangeQueryConstantspublic List<LogEntry> queryLogsByPage(String[] eventIds, String dateRange, String[] category, String path, int pageNb, int pageSize)
queryLogsByPage in interface AuditReaderpublic List<LogEntry> queryLogsByPage(String[] eventIds, Date limit, String[] category, String path, int pageNb, int pageSize)
queryLogsByPage in interface AuditReaderpublic long syncLogCreationEntries(String repoId, String path, Boolean recurs)
AuditAdminsyncLogCreationEntries in interface AuditAdminpublic void addLogEntry(LogEntry entry)
public void addLogEntry(javax.persistence.EntityManager em,
               LogEntry entry)
public Long getEventsCount(String eventId)
getEventsCount in interface AuditAdminpublic void logEvent(Event event)
AuditLoggerlogEvent in interface AuditLoggerlogEvent in class AbstractAuditBackendpublic void logEvents(EventBundle eventBundle)
AuditLoggerlogEvents in interface AuditLoggerlogEvents in class AbstractAuditBackendCopyright © 2015 Nuxeo SA. All rights reserved.