public class ESAuditChangeFinder extends AuditChangeFinder
The structure of the query executed by the AuditChangeFinder
is:
from LogEntry log where log.repositoryId = :repositoryId + AND if ActiveRoots (activeRoots) NOT empty from LogEntry log where log.repositoryId = :repositoryId and ( LIST_DOC_EVENTS_IDS_QUERY and ( ROOT_PATHS or COLECTIONS_PATHS) or (log.category = 'NuxeoDrive' and log.eventId != 'rootUnregistered') ) if ActiveRoots EMPTY: from LogEntry log where log.repositoryId = :repositoryId and ((log.category = 'NuxeoDrive' and log.eventId != 'rootUnregistered')) + AND (log.id > :lowerBound and log.id <= :upperBound) + order by log.repositoryId asc, log.eventDate desc
Modifier and Type | Field and Description |
---|---|
protected org.elasticsearch.client.Client |
esClient |
static org.apache.commons.logging.Log |
log |
parameters
Constructor and Description |
---|
ESAuditChangeFinder() |
Modifier and Type | Method and Description |
---|---|
protected org.elasticsearch.index.query.FilterBuilder |
buildFilterClauses(CoreSession session,
SynchronizationRoots activeRoots,
Set<String> collectionSyncRootMemberIds,
long lowerBound,
long upperBound,
boolean integerBounds,
int limit) |
protected org.elasticsearch.client.Client |
getClient() |
protected org.elasticsearch.index.query.TermsFilterBuilder |
getCollectionSyncRootClause(Set<String> collectionSyncRootMemberIds) |
protected org.elasticsearch.index.query.OrFilterBuilder |
getCurrentRootsClause(Set<String> rootPaths) |
protected org.elasticsearch.index.query.BoolFilterBuilder |
getDriveLogsQueryClause() |
protected String |
getESIndexName() |
protected org.elasticsearch.index.query.BoolFilterBuilder |
getEventsClause(String category,
String[] eventIds,
boolean shouldMatch) |
protected org.elasticsearch.index.query.RangeFilterBuilder |
getLogIdBoundsClause(long lowerBound,
long upperBound) |
long |
getUpperBound()
Return the last available log id in the audit log table (primary key) to be used as the upper bound of the event
log id range clause in the change query.
|
protected List<LogEntry> |
queryAuditEntries(CoreSession session,
SynchronizationRoots activeRoots,
Set<String> collectionSyncRootMemberIds,
long lowerBound,
long upperBound,
boolean integerBounds,
int limit) |
protected List<LogEntry> |
queryESAuditEntries(CoreSession session,
SynchronizationRoots activeRoots,
Set<String> collectionSyncRootMemberIds,
long lowerBound,
long upperBound,
boolean integerBounds,
int limit) |
getCollectionSyncRootFilteringClause, getCurrentDate, getCurrentRootFilteringClause, getFileSystemChanges, getFileSystemChanges, getFileSystemChangesIntegerBounds, getFileSystemItemChange, getJPARangeClause, handleParameters
public static final org.apache.commons.logging.Log log
protected org.elasticsearch.client.Client esClient
public ESAuditChangeFinder()
protected List<LogEntry> queryESAuditEntries(CoreSession session, SynchronizationRoots activeRoots, Set<String> collectionSyncRootMemberIds, long lowerBound, long upperBound, boolean integerBounds, int limit)
protected org.elasticsearch.index.query.FilterBuilder buildFilterClauses(CoreSession session, SynchronizationRoots activeRoots, Set<String> collectionSyncRootMemberIds, long lowerBound, long upperBound, boolean integerBounds, int limit)
protected org.elasticsearch.index.query.RangeFilterBuilder getLogIdBoundsClause(long lowerBound, long upperBound)
protected org.elasticsearch.index.query.TermsFilterBuilder getCollectionSyncRootClause(Set<String> collectionSyncRootMemberIds)
protected org.elasticsearch.index.query.OrFilterBuilder getCurrentRootsClause(Set<String> rootPaths)
protected org.elasticsearch.index.query.BoolFilterBuilder getDriveLogsQueryClause()
protected org.elasticsearch.index.query.BoolFilterBuilder getEventsClause(String category, String[] eventIds, boolean shouldMatch)
public long getUpperBound()
AuditChangeFinder
getUpperBound
in interface FileSystemChangeFinder
getUpperBound
in class AuditChangeFinder
protected List<LogEntry> queryAuditEntries(CoreSession session, SynchronizationRoots activeRoots, Set<String> collectionSyncRootMemberIds, long lowerBound, long upperBound, boolean integerBounds, int limit)
queryAuditEntries
in class AuditChangeFinder
protected org.elasticsearch.client.Client getClient()
protected String getESIndexName()
Copyright © 2016 Nuxeo SA. All rights reserved.