public interface AuditReader
Modifier and Type | Method and Description |
---|---|
long |
getLatestLogId(String repositoryId,
String... eventIds)
Returns the latest log id matching events and repository or 0 when no match found.
|
List<LogEntry> |
getLogEntriesAfter(long logIdOffset,
int limit,
String repositoryId,
String... eventIds)
Returns up to limit log entries matching events and repository with log id greater or equal to logIdOffset.
|
default List<LogEntry> |
getLogEntriesFor(String uuid)
Deprecated.
since 8.4, use
#getLogEntriesFor(String, String)) instead. |
List<LogEntry> |
getLogEntriesFor(String uuid,
Map<String,FilterMapEntry> filterMap,
boolean doDefaultSort)
Deprecated.
since 9.3, this method doesn't take into account the document repository, use
queryLogs(AuditQueryBuilder) instead. |
default List<LogEntry> |
getLogEntriesFor(String uuid,
String repositoryId)
Returns the logs given a doc uuid and a repository id.
|
LogEntry |
getLogEntryByID(long id)
Returns a given log entry given its id.
|
default 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.
|
default List<LogEntry> |
nativeQueryLogs(String whereClause,
int pageNb,
int pageSize)
Returns a batched list of log entries.
|
List<LogEntry> |
queryLogs(AuditQueryBuilder builder)
Returns the logs given a collection of predicates and a default sort.
|
default List<LogEntry> |
queryLogs(String[] eventIds,
String dateRange)
Returns the list of log entries.
|
List<LogEntry> |
queryLogsByPage(String[] eventIds,
Date limit,
String[] categories,
String path,
int pageNb,
int pageSize) |
default List<LogEntry> |
queryLogsByPage(String[] eventIds,
Date limit,
String category,
String path,
int pageNb,
int pageSize)
Returns the batched list of log entries.
|
default List<LogEntry> |
queryLogsByPage(String[] eventIds,
String dateRange,
String[] categories,
String path,
int pageNb,
int pageSize) |
default List<LogEntry> |
queryLogsByPage(String[] eventIds,
String dateRange,
String category,
String path,
int pageNb,
int pageSize)
Returns the batched list of log entries.
|
default List<LogEntry> getLogEntriesFor(String uuid, String repositoryId)
uuid
- the document uuidrepositoryId
- the repository id@Deprecated default List<LogEntry> getLogEntriesFor(String uuid)
#getLogEntriesFor(String, String))
instead.uuid
- the document uuid@Deprecated List<LogEntry> getLogEntriesFor(String uuid, Map<String,FilterMapEntry> filterMap, boolean doDefaultSort)
queryLogs(AuditQueryBuilder)
instead.uuid
- the document uuidfilterMap
- the map of filters to applydoDefaultSort
- the default sort to set (eventDate desc)LogEntry getLogEntryByID(long id)
id
- the log entry identifierList<LogEntry> queryLogs(AuditQueryBuilder builder)
builder
- the query builder to fetch log entriesdefault List<LogEntry> queryLogs(String[] eventIds, String dateRange)
Note we will use NXQL in the future when the search engine will index history.
eventIds
- the event ids.dateRange
- a preset date range.DateRangeQueryConstants
default List<LogEntry> queryLogsByPage(String[] eventIds, String dateRange, String category, String path, int pageNb, int pageSize)
Note we will use NXQL in the future when the search engine will index history.
eventIds
- the event ids.dateRange
- a preset date range.category
- add filter on events categorypath
- add filter on document pathpageNb
- page number (ignore if <=1)pageSize
- number of results per pageDateRangeQueryConstants
default List<LogEntry> queryLogsByPage(String[] eventIds, String dateRange, String[] categories, String path, int pageNb, int pageSize)
default List<LogEntry> queryLogsByPage(String[] eventIds, Date limit, String category, String path, int pageNb, int pageSize)
Note we will use NXQL in the future when the search engine will index history.
eventIds
- the event ids.limit
- filter events by date from limit to nowcategory
- add filter on events categorypath
- add filter on document pathpageNb
- page number (ignore if <=1)pageSize
- number of results per pageDateRangeQueryConstants
List<LogEntry> queryLogsByPage(String[] eventIds, Date limit, String[] categories, String path, int pageNb, int pageSize)
default List<LogEntry> nativeQueryLogs(String whereClause, int pageNb, int pageSize)
default List<?> nativeQuery(String query, int pageNb, int pageSize)
List<?> nativeQuery(String query, Map<String,Object> params, int pageNb, int pageSize)
query
- a JPA query language query if implementation of audit backend is JPA (< 7.3 or
audit.elasticsearch.enabled=false) and JSON if implementation is Elasticsearchparams
- parameters for the querypageNb
- the page number (starts at 1)pageSize
- the number of results per pagelong getLatestLogId(String repositoryId, String... eventIds)
List<LogEntry> getLogEntriesAfter(long logIdOffset, int limit, String repositoryId, String... eventIds)
Copyright © 2018 Nuxeo. All rights reserved.