Class DefaultAuditBackend
java.lang.Object
org.nuxeo.ecm.platform.audit.service.AbstractAuditBackend<LogEntry>
org.nuxeo.ecm.platform.audit.service.DefaultAuditBackend
- All Implemented Interfaces:
AuditAdmin,AuditLogger<LogEntry>,AuditReader<LogEntry>,AuditStorage,Logs<LogEntry>,AuditBackend<LogEntry>
@Deprecated(since="2025.0",
forRemoval=true)
public class DefaultAuditBackend
extends AbstractAuditBackend<LogEntry>
Deprecated, for removal: This API element is subject to removal in a future version.
Contains the Hibernate based (legacy) implementation
- Author:
- tiry
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassDeprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CursorService<Iterator<LogEntry>, LogEntry, String> Deprecated, for removal: This API element is subject to removal in a future version.protected static final com.fasterxml.jackson.databind.ObjectMapperDeprecated, for removal: This API element is subject to removal in a future version.protected PersistenceProviderDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class org.nuxeo.ecm.platform.audit.service.AbstractAuditBackend
component, config, expressionEvaluator, FORCE_AUDIT_FACET, log -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.DefaultAuditBackend(NXAuditEventsService component, AuditBackendDescriptor config) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaccept(boolean needActivateSession, Consumer<LogEntryProvider> consumer) Deprecated, for removal: This API element is subject to removal in a future version.protected voidDeprecated, for removal: This API element is subject to removal in a future version.voidaddLogEntries(List<LogEntry> entries) Deprecated, for removal: This API element is subject to removal in a future version.Adds given log entries.voidDeprecated, for removal: This API element is subject to removal in a future version.protected <T> Tapply(boolean needActivateSession, Function<LogEntryProvider, T> function) Deprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.getEventsCount(String eventId) Deprecated, for removal: This API element is subject to removal in a future version.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.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.protected StringgetParamNames(String[] eventId) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.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.newExtendedInfo(Serializable value) Deprecated, for removal: This API element is subject to removal in a future version.Create a new ExtendedInfo instancevoidDeprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns the list of log entries.queryLogs(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, Date limit, String[] category, String path, int pageNb, int pageSize) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.scroll(QueryBuilder builder, int batchSize, int keepAliveSeconds) Deprecated, for removal: This API element is subject to removal in a future version.longsyncLogCreationEntries(String repoId, String path, Boolean recurs) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, seems unusedMethods inherited from class org.nuxeo.ecm.platform.audit.service.AbstractAuditBackend
await, buildEntryFromEvent, doCreateAndFillEntryFromDocument, doPutExtendedInfos, doSyncNode, getAuditableEventNames, guardedDocument, guardedDocumentChildren, isAuditable, newLogEntry, populateExtendedInfo, restore, syncLogCreationEntriesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.ecm.platform.audit.api.AuditReader
queryLogsByPage, queryLogsByPage, queryLogsByPage
-
Field Details
-
OBJECT_MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPERDeprecated, for removal: This API element is subject to removal in a future version. -
persistenceProvider
Deprecated, for removal: This API element is subject to removal in a future version. -
cursorService
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
DefaultAuditBackend
Deprecated, for removal: This API element is subject to removal in a future version. -
DefaultAuditBackend
public DefaultAuditBackend()Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 9.3
-
-
Method Details
-
getApplicationStartedOrder
public int getApplicationStartedOrder()Deprecated, for removal: This API element is subject to removal in a future version. -
onApplicationStarted
public void onApplicationStarted()Deprecated, for removal: This API element is subject to removal in a future version. -
onApplicationStopped
public void onApplicationStopped()Deprecated, for removal: This API element is subject to removal in a future version. -
getOrCreatePersistenceProvider
Deprecated, for removal: This API element is subject to removal in a future version. -
activatePersistenceProvider
protected void activatePersistenceProvider()Deprecated, for removal: This API element is subject to removal in a future version. -
apply
Deprecated, for removal: This API element is subject to removal in a future version. -
accept
Deprecated, for removal: This API element is subject to removal in a future version. -
addLogEntries
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AuditLoggerAdds given log entries.- Parameters:
entries- the list of log entries.
-
getLogEntriesFor
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AuditReaderReturns the logs given a doc uuid and a repository id.- Parameters:
uuid- the document uuidrepositoryId- the repository id- Returns:
- a list of log entries
-
getLogEntryByID
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AuditReaderReturns a given log entry given its id.- Parameters:
id- the log entry identifier- Returns:
- a LogEntry instance
-
nativeQueryLogs
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AuditReaderReturns 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.Description copied from interface:AuditReaderReturns 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.Description copied from interface:AuditReaderReturns 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
-
queryLogs
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AuditReaderReturns 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
-
queryLogs
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AuditReaderReturns 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
public List<LogEntry> 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. -
syncLogCreationEntries
@Deprecated(since="2025.0", forRemoval=true) public long syncLogCreationEntries(String repoId, String path, Boolean recurs) Deprecated, for removal: This API element is subject to removal in a future version.since 2025.0, seems unusedDescription copied from interface:AuditAdminForces log Synchronisation for a branch of the repository. This can be useful to add the create entries if DB was initialized from a bulk import. -
getEventsCount
Deprecated, for removal: This API element is subject to removal in a future version. -
getLoggedEventIds
Deprecated, for removal: This API element is subject to removal in a future version. -
newExtendedInfo
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AuditLoggerCreate a new ExtendedInfo instance- Specified by:
newExtendedInfoin interfaceAuditLogger<LogEntry>- Specified by:
newExtendedInfoin classAbstractAuditBackend<LogEntry>
-
getLatestLogId
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AuditReaderReturns the latest log id matching events and repository or 0 when no match found. -
getLogEntriesAfter
public List<LogEntry> getLogEntriesAfter(long logIdOffset, int limit, String repositoryId, String... eventIds) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AuditReaderReturns up to limit log entries matching events and repository with log id greater or equal to logIdOffset. -
getParamNames
Deprecated, for removal: This API element is subject to removal in a future version. -
getParams
Deprecated, for removal: This API element is subject to removal in a future version. -
append
Deprecated, for removal: This API element is subject to removal in a future version. -
scroll
Deprecated, for removal: This API element is subject to removal in a future version. -
scroll
Deprecated, for removal: This API element is subject to removal in a future version.
-
org.nuxeo.sql.audit.SQLAuditBackendinstead