public class ESAuditBackend extends AbstractAuditBackend implements AuditBackend
AuditBackend
interface using Elasticsearch persistenceModifier and Type | Field and Description |
---|---|
static String |
IDX_NAME |
static String |
IDX_TYPE |
static String |
SEQ_NAME |
Constructor and Description |
---|
ESAuditBackend() |
Modifier and Type | Method and Description |
---|---|
void |
addLogEntries(List<LogEntry> entries)
Adds given log entries.
|
org.elasticsearch.action.search.SearchRequestBuilder |
buildQuery(String query,
Map<String,Object> params) |
org.elasticsearch.action.search.SearchRequestBuilder |
buildSearchQuery(String fixedPart,
PredicateDefinition[] predicates,
DocumentModel searchDocumentModel) |
void |
deactivate() |
String |
expandQueryVariables(String query,
Map<String,Object> params) |
String |
expandQueryVariables(String query,
Object[] params) |
Long |
getEventsCount(String eventId) |
List<LogEntry> |
getLogEntriesFor(String uuid,
Map<String,FilterMapEntry> filterMap,
boolean doDefaultSort) |
LogEntry |
getLogEntryByID(long id)
Returns a given log entry given its id.
|
String |
migrate(int batchSize) |
List<?> |
nativeQuery(String query,
Map<String,Object> params,
int pageNb,
int pageSize)
Returns a batched list of entries.
|
List<LogEntry> |
queryLogsByPage(String[] eventIds,
Date limit,
String[] categories,
String path,
int pageNb,
int pageSize) |
List<LogEntry> |
queryLogsByPage(String[] eventIds,
String dateRange,
String[] categories,
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, getLogEntriesFor, logEvent, logEvents, nativeQuery, nativeQueryLogs, newExtendedInfo, newLogEntry, queryLogs, queryLogsByPage, queryLogsByPage
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate
getLogEntriesFor, nativeQuery, nativeQueryLogs, queryLogs, queryLogsByPage, queryLogsByPage
getAuditableEventNames, logEvent, logEvents, newExtendedInfo, newLogEntry
public static final String IDX_NAME
public static final String IDX_TYPE
public static final String SEQ_NAME
public void deactivate()
deactivate
in interface AuditBackend
public 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 org.elasticsearch.action.search.SearchRequestBuilder buildQuery(String query, Map<String,Object> params)
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> queryLogsByPage(String[] eventIds, Date limit, String[] categories, String path, int pageNb, int pageSize)
queryLogsByPage
in interface AuditReader
public List<LogEntry> queryLogsByPage(String[] eventIds, String dateRange, String[] categories, String path, int pageNb, int pageSize)
queryLogsByPage
in interface AuditReader
public void addLogEntries(List<LogEntry> entries)
AuditLogger
addLogEntries
in interface AuditLogger
entries
- the list of log entries.public Long getEventsCount(String eventId)
getEventsCount
in interface AuditAdmin
public long syncLogCreationEntries(String repoId, String path, Boolean recurs)
AuditAdmin
syncLogCreationEntries
in interface AuditAdmin
public org.elasticsearch.action.search.SearchRequestBuilder buildSearchQuery(String fixedPart, PredicateDefinition[] predicates, DocumentModel searchDocumentModel)
public String migrate(int batchSize)
Copyright © 2015 Nuxeo SA. All rights reserved.