Package org.nuxeo.ecm.platform.audit.api
Interface AuditReader<L extends LogEntry>
- Type Parameters:
L- to give the log entry type for the newAuditBackendinterface that defines a new entry type.
- All Known Subinterfaces:
AuditBackend,AuditBackend<L>,Logs<L>,LogsRemote
- All Known Implementing Classes:
AbstractAuditBackend,AbstractAuditBackend,DefaultAuditBackend,MemAuditBackend,MongoDBAuditBackend,OpenSearchAuditBackend,SQLAuditBackend
Deprecated, for removal: This API element is subject to removal in a future version.
Interface for reading data from the Audit service.
- Author:
- tiry
-
Method Summary
Modifier and TypeMethodDescriptiondefault longgetLatestLogId(String repositoryId, String... eventIds) Deprecated, for removal: This API element is subject to removal in a future version.Returns the latest log id matching events and repository or 0 when no match found.getLogEntriesAfter(long logIdOffset, int limit, String repositoryId, String... eventIds) Deprecated, for removal: This API element is subject to removal in a future version.Returns up to limit log entries matching events and repository with log id greater or equal to logIdOffset.getLogEntriesFor(String uuid, String repositoryId) Deprecated, for removal: This API element is subject to removal in a future version.Returns the logs given a doc uuid and a repository id.getLogEntryByID(long id) Deprecated, for removal: This API element is subject to removal in a future version.Returns a given log entry given its id.default List<?> nativeQuery(String query, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.Returns a batched list of entries. query string is a native query clause for the backend : here EJBQL 3.0 must be used if implementation of audit backend is JPA (< 7.3 or audit.elasticsearch.enabled=false) and JSON if implementation is Elasticsearch.List<?> nativeQuery(String query, Map<String, Object> params, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.Returns a batched list of entries.nativeQueryLogs(String whereClause, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.Returns a batched list of log entries.Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, usequeryLogs(QueryBuilder)insteadqueryLogs(QueryBuilder builder) Deprecated, for removal: This API element is subject to removal in a future version.Returns the logs given a collection of predicates and a default sort.queryLogsByPage(String[] eventIds, String dateRange, String[] categories, String path, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, usequeryLogs(QueryBuilder)insteadqueryLogsByPage(String[] eventIds, String dateRange, String category, String path, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, usequeryLogs(QueryBuilder)insteadqueryLogsByPage(String[] eventIds, Date limit, String[] categories, String path, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, usequeryLogs(QueryBuilder)insteadqueryLogsByPage(String[] eventIds, Date limit, String category, String path, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, usequeryLogs(QueryBuilder)instead
-
Method Details
-
getLogEntriesFor
Deprecated, for removal: This API element is subject to removal in a future version.Returns the logs given a doc uuid and a repository id.- Parameters:
uuid- the document uuidrepositoryId- the repository id- Returns:
- a list of log entries
- Since:
- 8.4
-
getLogEntryByID
Deprecated, for removal: This API element is subject to removal in a future version.Returns a given log entry given its id.- Parameters:
id- the log entry identifier- Returns:
- a LogEntry instance
-
queryLogs
Deprecated, for removal: This API element is subject to removal in a future version.Returns the logs given a collection of predicates and a default sort.- Parameters:
builder- the query builder to fetch log entries- Returns:
- a list of log entries
- Since:
- 9.3
-
queryLogs
@Deprecated(since="2025.0", forRemoval=true) default List<L> queryLogs(String[] eventIds, String dateRange) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, usequeryLogs(QueryBuilder)insteadReturns the list of log entries.Note we will use NXQL in the future when the search engine will index history.
- Parameters:
eventIds- the event ids.dateRange- a preset date range.- Returns:
- a list of log entries.
- See Also:
-
queryLogsByPage
@Deprecated(since="2025.0", forRemoval=true) default List<L> queryLogsByPage(String[] eventIds, String dateRange, String category, String path, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, usequeryLogs(QueryBuilder)insteadReturns the batched list of log entries.Note we will use NXQL in the future when the search engine will index history.
- Parameters:
eventIds- the event ids.dateRange- a preset date range.category- add filter on events categorypath- add filter on document pathpageNb- page number (ignore if <=1)pageSize- number of results per page- Returns:
- a list of log entries.
- See Also:
-
queryLogsByPage
@Deprecated(since="2025.0", forRemoval=true) default List<L> queryLogsByPage(String[] eventIds, String dateRange, String[] categories, String path, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, usequeryLogs(QueryBuilder)instead -
queryLogsByPage
@Deprecated(since="2025.0", forRemoval=true) default List<L> queryLogsByPage(String[] eventIds, Date limit, String category, String path, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, usequeryLogs(QueryBuilder)insteadReturns the batched list of log entries.Note we will use NXQL in the future when the search engine will index history.
- Parameters:
eventIds- the event ids.limit- filter events by date from limit to nowcategory- add filter on events categorypath- add filter on document pathpageNb- page number (ignore if <=1)pageSize- number of results per page- Returns:
- a list of log entries.
- See Also:
-
queryLogsByPage
@Deprecated(since="2025.0", forRemoval=true) default List<L> queryLogsByPage(String[] eventIds, Date limit, String[] categories, String path, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, usequeryLogs(QueryBuilder)instead -
nativeQueryLogs
Deprecated, for removal: This API element is subject to removal in a future version.Returns a batched list of log entries. WhereClause is a native where clause for the backend: here EJBQL 3.0 must be used if implementation of audit backend is JPA (< 7.3 or audit.elasticsearch.enabled=false) and JSON if implementation is Elasticsearch. -
nativeQuery
Deprecated, for removal: This API element is subject to removal in a future version.Returns a batched list of entries. query string is a native query clause for the backend : here EJBQL 3.0 must be used if implementation of audit backend is JPA (< 7.3 or audit.elasticsearch.enabled=false) and JSON if implementation is Elasticsearch. -
nativeQuery
Deprecated, for removal: This API element is subject to removal in a future version.Returns a batched list of entries.- Parameters:
query- a JPA query language query if implementation of audit backend is JPA (< 7.3 or audit.elasticsearch.enabled=false) and JSON if implementation is Elasticsearchparams- parameters for the querypageNb- the page number (starts at 1)pageSize- the number of results per page
-
getLatestLogId
Deprecated, for removal: This API element is subject to removal in a future version.Returns the latest log id matching events and repository or 0 when no match found.- Since:
- 9.3
-
getLogEntriesAfter
default List<L> getLogEntriesAfter(long logIdOffset, int limit, String repositoryId, String... eventIds) Deprecated, for removal: This API element is subject to removal in a future version.Returns up to limit log entries matching events and repository with log id greater or equal to logIdOffset.- Since:
- 9.3
-
AuditBackendinstead