public class AuditChangeFinder extends Object implements FileSystemChangeFinder
FileSystemChangeFinder
using the
AuditReader
.Constructor and Description |
---|
AuditChangeFinder() |
Modifier and Type | Method and Description |
---|---|
long |
getCurrentDate()
To be deprecated (in fact make throw
UnsupportedOperationException ), keeping for backward
compatibility. |
List<FileSystemItemChange> |
getFileSystemChanges(CoreSession session,
Set<IdRef> lastActiveRootRefs,
SynchronizationRoots activeRoots,
long lastSuccessfulSyncDate,
long syncDate,
int limit)
To be deprecated (in fact make throw
UnsupportedOperationException ), keeping old method based on log
date for backward compatibility. |
List<FileSystemItemChange> |
getFileSystemChangesIntegerBounds(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.
|
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.
|
public List<FileSystemItemChange> getFileSystemChanges(CoreSession session, Set<IdRef> lastActiveRootRefs, SynchronizationRoots activeRoots, long lastSuccessfulSyncDate, long syncDate, int limit) throws ClientException, TooManyChangesException
UnsupportedOperationException
), keeping old method based on log
date for backward compatibility.
Now using event log id for lower and upper bounds to ensure consistency.
getFileSystemChanges
in interface FileSystemChangeFinder
session
- 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 rootslastSuccessfulSyncDate
- the last successful synchronization date as
measured on the server for this user device.syncDate
- the current synchronization date (upper bound on the date
of the changes to return). This date is typically obtained by
calling FileSystemChangeFinder.getCurrentDate()
limit
- the maximum number of changes to fetchTooManyChangesException
- if the number of changes found has
exceeded the limitClientException
- if the access to the repository fails for another
reason.https://jira.nuxeo.com/browse/NXP-14826
,
getFileSystemChangesIntegerBounds(CoreSession, Set,
SynchronizationRoots, Set, long, long, int)
public List<FileSystemItemChange> getFileSystemChangesIntegerBounds(CoreSession session, Set<IdRef> lastActiveRootRefs, SynchronizationRoots activeRoots, Set<String> collectionSyncRootMemberIds, long lowerBound, long upperBound, int limit) throws ClientException, TooManyChangesException
FileSystemChangeFinder
getFileSystemChangesIntegerBounds
in interface FileSystemChangeFinder
session
- 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 fetchTooManyChangesException
- if the number of changes found has
exceeded the limitClientException
- if the access to the repository fails for another
reason.public long getCurrentDate()
UnsupportedOperationException
), keeping for backward
compatibility.
Return the current time to query the logDate field of the audit log. This time intentionally truncated to 0 milliseconds to have a consistent behavior across databases.
Should now use last available log id in the audit log table as upper bound.
getCurrentDate
in interface FileSystemChangeFinder
https://jira.nuxeo.com/browse/NXP-14826
,
getUpperBound()
public long getUpperBound()
getUpperBound
in interface FileSystemChangeFinder
Copyright © 2014 Nuxeo SA. All rights reserved.