public class AuditChangeFinder extends Object implements FileSystemChangeFinder
FileSystemChangeFinder using the AuditReader.| Modifier and Type | Field and Description | 
|---|---|
protected Map<String,String> | 
parameters  | 
| Constructor and Description | 
|---|
AuditChangeFinder()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected long | 
getClusteringDelay(Set<String> repositoryNames)
Returns the longest clustering delay among the given repositories for which clustering is enabled. 
 | 
protected String | 
getCollectionSyncRootFilteringClause(Set<String> collectionSyncRootMemberIds,
                                    Map<String,Object> params)  | 
protected String | 
getCurrentRootFilteringClause(Set<String> rootPaths,
                             Map<String,Object> params)  | 
List<FileSystemItemChange> | 
getFileSystemChanges(CoreSession session,
                    Set<IdRef> lastActiveRootRefs,
                    SynchronizationRoots activeRoots,
                    Set<String> collectionSyncRootMemberIds,
                    long lowerBound,
                    long upperBound,
                    int limit)
Gets the changes in the repository against which the given session is bound for the given synchronization root
 paths, between the given lower and upper integer bounds and without exceeding the given limit. 
 | 
protected FileSystemItemChange | 
getFileSystemItemChange(CoreSession session,
                       DocumentRef docRef,
                       LogEntry entry,
                       String expectedFileSystemItemId)  | 
protected String | 
getJPARangeClause(long lowerBound,
                 long upperBound,
                 Map<String,Object> params)
Using event log id to ensure consistency, see https://jira.nuxeo.com/browse/NXP-14826. 
 | 
long | 
getUpperBound()
Returns 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. 
 | 
long | 
getUpperBound(Set<String> repositoryNames)
Returns the last available log id in the audit log table (primary key) considering events older than the last
 clustering invalidation date if clustering is enabled for at least one of the given repositories. 
 | 
void | 
handleParameters(Map<String,String> parameters)
Handles the parameters contributed through the  
changeFinder contribution. | 
protected List<LogEntry> | 
queryAuditEntries(CoreSession session,
                 SynchronizationRoots activeRoots,
                 Set<String> collectionSyncRootMemberIds,
                 long lowerBound,
                 long upperBound,
                 int limit)  | 
protected Map<String,String> parameters
public AuditChangeFinder()
public void handleParameters(Map<String,String> parameters)
FileSystemChangeFinderchangeFinder contribution.handleParameters in interface FileSystemChangeFinderpublic List<FileSystemItemChange> getFileSystemChanges(CoreSession session, Set<IdRef> lastActiveRootRefs, SynchronizationRoots activeRoots, Set<String> collectionSyncRootMemberIds, long lowerBound, long upperBound, int limit)
FileSystemChangeFindergetFileSystemChanges in interface FileSystemChangeFindersession - the session bound to a specific repositorylastActiveRootRefs - docrefs of the roots as reported by the last successful synchronization (can be empty
            or null)activeRoots - the currently active synchronization rootscollectionSyncRootMemberIds - the collection sync root member idslowerBound - the lower integer bound of the range clause in the change queryupperBound - the upper integer bound of the range clause in the change query. This id is typically obtained
            by calling #getUpperBound())limit - the maximum number of changes to fetchpublic long getUpperBound()
getUpperBound in interface FileSystemChangeFinderpublic long getUpperBound(Set<String> repositoryNames)
DocumentModel further fetched from the session using the audit entry doc id is fresh.getUpperBound in interface FileSystemChangeFinderprotected long getClusteringDelay(Set<String> repositoryNames)
protected List<LogEntry> queryAuditEntries(CoreSession session, SynchronizationRoots activeRoots, Set<String> collectionSyncRootMemberIds, long lowerBound, long upperBound, int limit)
protected String getCurrentRootFilteringClause(Set<String> rootPaths, Map<String,Object> params)
protected String getCollectionSyncRootFilteringClause(Set<String> collectionSyncRootMemberIds, Map<String,Object> params)
protected String getJPARangeClause(long lowerBound, long upperBound, Map<String,Object> params)
protected FileSystemItemChange getFileSystemItemChange(CoreSession session, DocumentRef docRef, LogEntry entry, String expectedFileSystemItemId)
Copyright © 2019 Nuxeo. All rights reserved.