public abstract class AbstractAuditBackend extends Object implements AuditBackend, AuditStorage
AuditBackend implementations| Modifier and Type | Field and Description | 
|---|---|
protected NXAuditEventsService | 
component  | 
protected AuditBackendDescriptor | 
config  | 
protected ExpressionEvaluator | 
expressionEvaluator  | 
static String | 
FORCE_AUDIT_FACET  | 
protected static org.apache.logging.log4j.Logger | 
log  | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
AbstractAuditBackend()  | 
protected  | 
AbstractAuditBackend(NXAuditEventsService component,
                    AuditBackendDescriptor config)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
await(long time,
     TimeUnit unit)  | 
LogEntry | 
buildEntryFromEvent(Event event)
Returns a log entry representation of an event. 
 | 
protected Predicate | 
convert(FilterMapEntry entry)  | 
protected LogEntry | 
doCreateAndFillEntryFromDocument(DocumentModel doc,
                                Principal principal)  | 
protected void | 
doPutExtendedInfos(LogEntry entry,
                  EventContext eventContext,
                  DocumentModel source,
                  Principal principal)  | 
protected long | 
doSyncNode(BaseLogEntryProvider provider,
          CoreSession session,
          DocumentModel node,
          boolean recurs)  | 
Set<String> | 
getAuditableEventNames()
Returns the list of auditable event names. 
 | 
long | 
getLatestLogId(String repositoryId,
              String... eventIds)
Returns the latest log id matching events and repository or 0 when no match found. 
 | 
List<LogEntry> | 
getLogEntriesAfter(long logIdOffset,
                  int limit,
                  String repositoryId,
                  String... eventIds)
Returns up to limit log entries matching events and repository with log id greater or equal to logIdOffset. 
 | 
List<LogEntry> | 
getLogEntriesFor(String uuid,
                Map<String,FilterMapEntry> filterMap,
                boolean doDefaultSort)
Deprecated.  
 | 
protected DocumentModel | 
guardedDocument(CoreSession session,
               DocumentRef reference)  | 
protected DocumentModelList | 
guardedDocumentChildren(CoreSession session,
                       DocumentRef reference)  | 
protected boolean | 
isAuditable(EventBundle eventBundle)  | 
void | 
logEvent(Event event)
Deprecated.  
 | 
void | 
logEvents(EventBundle bundle)
Deprecated.  
 | 
abstract ExtendedInfo | 
newExtendedInfo(Serializable value)
Create a new ExtendedInfo instance 
 | 
LogEntry | 
newLogEntry()
Create a new LogEntry instance. 
 | 
protected void | 
populateExtendedInfo(LogEntry entry,
                    DocumentModel source,
                    ExpressionContext context,
                    Collection<ExtendedInfoDescriptor> extInfos)  | 
List<LogEntry> | 
queryLogsByPage(String[] eventIds,
               Date limit,
               String[] categories,
               String path,
               int pageNb,
               int pageSize)  | 
void | 
restore(AuditStorage auditStorage,
       int batchSize,
       int keepAlive)
Restore the backend from the given  
AuditStorage | 
protected long | 
syncLogCreationEntries(BaseLogEntryProvider provider,
                      String repoId,
                      String path,
                      Boolean recurs)  | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetApplicationStartedOrder, onApplicationStarted, onApplicationStopped, onShutdowngetLogEntriesFor, getLogEntriesFor, getLogEntryByID, nativeQuery, nativeQuery, nativeQueryLogs, queryLogs, queryLogs, queryLogsByPage, queryLogsByPage, queryLogsByPageaddLogEntriesgetEventsCount, syncLogCreationEntriesappend, scroll, scrollprotected static final org.apache.logging.log4j.Logger log
public static final String FORCE_AUDIT_FACET
protected final NXAuditEventsService component
protected final AuditBackendDescriptor config
protected final ExpressionEvaluator expressionEvaluator
protected AbstractAuditBackend(NXAuditEventsService component, AuditBackendDescriptor config)
protected AbstractAuditBackend()
protected DocumentModel guardedDocument(CoreSession session, DocumentRef reference)
protected DocumentModelList guardedDocumentChildren(CoreSession session, DocumentRef reference)
protected LogEntry doCreateAndFillEntryFromDocument(DocumentModel doc, Principal principal)
protected void doPutExtendedInfos(LogEntry entry, EventContext eventContext, DocumentModel source, Principal principal)
protected void populateExtendedInfo(LogEntry entry, DocumentModel source, ExpressionContext context, Collection<ExtendedInfoDescriptor> extInfos)
public Set<String> getAuditableEventNames()
AuditLoggergetAuditableEventNames in interface AuditLoggerpublic LogEntry buildEntryFromEvent(Event event)
AuditLoggerbuildEntryFromEvent in interface AuditLoggerpublic LogEntry newLogEntry()
AuditLoggernewLogEntry in interface AuditLoggerpublic abstract ExtendedInfo newExtendedInfo(Serializable value)
AuditLoggernewExtendedInfo in interface AuditLoggerprotected long syncLogCreationEntries(BaseLogEntryProvider provider, String repoId, String path, Boolean recurs)
protected long doSyncNode(BaseLogEntryProvider provider, CoreSession session, DocumentModel node, boolean recurs)
@Deprecated public void logEvents(EventBundle bundle)
AuditLoggerlogEvents in interface AuditLoggerprotected boolean isAuditable(EventBundle eventBundle)
@Deprecated public void logEvent(Event event)
AuditLoggerlogEvent in interface AuditLoggerpublic boolean await(long time, TimeUnit unit) throws InterruptedException
await in interface AuditLoggerInterruptedException@Deprecated public List<LogEntry> getLogEntriesFor(String uuid, Map<String,FilterMapEntry> filterMap, boolean doDefaultSort)
AuditReadergetLogEntriesFor in interface AuditReaderuuid - the document uuidfilterMap - the map of filters to applydoDefaultSort - the default sort to set (eventDate desc)protected Predicate convert(FilterMapEntry entry)
public List<LogEntry> queryLogsByPage(String[] eventIds, Date limit, String[] categories, String path, int pageNb, int pageSize)
queryLogsByPage in interface AuditReaderpublic long getLatestLogId(String repositoryId, String... eventIds)
AuditReadergetLatestLogId in interface AuditReaderpublic List<LogEntry> getLogEntriesAfter(long logIdOffset, int limit, String repositoryId, String... eventIds)
AuditReadergetLogEntriesAfter in interface AuditReaderpublic void restore(AuditStorage auditStorage, int batchSize, int keepAlive)
AuditBackendAuditStoragerestore in interface AuditBackendauditStorage - the audit storagebatchSize - the batch sizekeepAlive - the keep alive durationCopyright © 2019 Nuxeo. All rights reserved.