public class ESAuditBackend extends AbstractAuditBackend implements AuditBackend
AuditBackend interface using Elasticsearch
persistence| Modifier and Type | Field and Description |
|---|---|
protected org.elasticsearch.client.Client |
esClient |
static String |
IDX_NAME |
static String |
IDX_TYPE |
protected static org.apache.commons.logging.Log |
log |
protected BaseLogEntryProvider |
provider |
static String |
SEQ_NAME |
component, expressionEvaluator| Constructor and Description |
|---|
ESAuditBackend() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLogEntries(List<LogEntry> entries) |
protected org.elasticsearch.index.query.FilterBuilder |
buildFilter(org.nuxeo.ecm.platform.query.api.PredicateDefinition[] predicates,
DocumentModel searchDocumentModel) |
org.elasticsearch.action.search.SearchRequestBuilder |
buildQuery(String query,
Map<String,Object> params) |
org.elasticsearch.action.search.SearchRequestBuilder |
buildSearchQuery(String fixedPart,
org.nuxeo.ecm.platform.query.api.PredicateDefinition[] predicates,
DocumentModel searchDocumentModel) |
void |
deactivate() |
String |
expandQueryVariables(String query,
Map<String,Object> params) |
String |
expandQueryVariables(String query,
Object[] params) |
protected org.elasticsearch.client.Client |
getClient() |
Long |
getEventsCount(String eventId) |
List<LogEntry> |
getLogEntriesFor(String uuid,
Map<String,FilterMapEntry> filterMap,
boolean doDefaultSort) |
LogEntry |
getLogEntryByID(long id) |
protected BaseLogEntryProvider |
getProvider() |
protected boolean |
isNonNullParam(Object[] val) |
String |
migrate(int batchSize) |
List<?> |
nativeQuery(String query,
Map<String,Object> params,
int pageNb,
int pageSize) |
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) |
activate, buildEntryFromEvent, doCreateAndFillEntryFromDocument, doPutExtendedInfos, doSyncNode, getAuditableEventNames, getLogEntriesFor, guardedDocument, guardedDocumentChildren, guardedPrincipal, guardedPrincipal, logEvent, logEvents, nativeQuery, nativeQueryLogs, newExtendedInfo, newLogEntry, queryLogs, queryLogsByPage, queryLogsByPage, syncLogCreationEntriesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivategetLogEntriesFor, nativeQuery, nativeQueryLogs, queryLogs, queryLogsByPage, queryLogsByPagegetAuditableEventNames, logEvent, logEvents, newExtendedInfo, newLogEntrypublic static final String IDX_NAME
public static final String IDX_TYPE
public static final String SEQ_NAME
protected org.elasticsearch.client.Client esClient
protected static final org.apache.commons.logging.Log log
protected BaseLogEntryProvider provider
protected org.elasticsearch.client.Client getClient()
public void deactivate()
throws Exception
deactivate in interface AuditBackendExceptionpublic List<LogEntry> getLogEntriesFor(String uuid, Map<String,FilterMapEntry> filterMap, boolean doDefaultSort)
getLogEntriesFor in interface AuditReaderpublic LogEntry getLogEntryByID(long id)
getLogEntryByID in interface AuditReaderpublic 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)
nativeQuery in interface AuditReaderpublic List<LogEntry> queryLogsByPage(String[] eventIds, Date limit, String[] categories, String path, int pageNb, int pageSize)
queryLogsByPage in interface AuditReaderpublic List<LogEntry> queryLogsByPage(String[] eventIds, String dateRange, String[] categories, String path, int pageNb, int pageSize)
queryLogsByPage in interface AuditReaderpublic void addLogEntries(List<LogEntry> entries)
addLogEntries in interface AuditLoggerpublic Long getEventsCount(String eventId)
getEventsCount in interface AuditAdminprotected BaseLogEntryProvider getProvider()
public long syncLogCreationEntries(String repoId, String path, Boolean recurs)
syncLogCreationEntries in interface AuditAdminprotected org.elasticsearch.index.query.FilterBuilder buildFilter(org.nuxeo.ecm.platform.query.api.PredicateDefinition[] predicates,
DocumentModel searchDocumentModel)
public org.elasticsearch.action.search.SearchRequestBuilder buildSearchQuery(String fixedPart, org.nuxeo.ecm.platform.query.api.PredicateDefinition[] predicates, DocumentModel searchDocumentModel)
protected boolean isNonNullParam(Object[] val)
Copyright © 2019 Nuxeo SA. All rights reserved.