public abstract class AbstractAuditBackend extends Object implements AuditBackend
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.commons.logging.Log |
log |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAuditBackend(NXAuditEventsService component,
AuditBackendDescriptor config) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
await(long time,
TimeUnit unit) |
protected LogEntry |
buildEntryFromEvent(Event event) |
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.
|
List<LogEntry> |
getLogEntriesFor(String uuid)
Returns the logs given a doc uuid.
|
protected DocumentModel |
guardedDocument(CoreSession session,
DocumentRef reference) |
protected DocumentModelList |
guardedDocumentChildren(CoreSession session,
DocumentRef reference) |
protected boolean |
isAuditable(EventBundle eventBundle) |
void |
logEvent(Event event)
Logs an Event.
|
void |
logEvents(EventBundle bundle)
Logs a bundle of events
|
List<?> |
nativeQuery(String query,
int pageNb,
int pageSize)
Returns a batched list of entries.
|
List<LogEntry> |
nativeQueryLogs(String whereClause,
int pageNb,
int pageSize)
Returns a batched list of log entries.
|
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> |
queryLogs(String[] eventIds,
String dateRange)
Returns the list of log entries.
|
List<LogEntry> |
queryLogsByPage(String[] eventIds,
Date limit,
String category,
String path,
int pageNb,
int pageSize)
Returns the batched list of log entries.
|
List<LogEntry> |
queryLogsByPage(String[] eventIds,
String dateRange,
String category,
String path,
int pageNb,
int pageSize)
Returns the batched list of log entries.
|
protected long |
syncLogCreationEntries(BaseLogEntryProvider provider,
String repoId,
String path,
Boolean recurs) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetApplicationStartedOrder, onApplicationStarted, onShutdowngetLogEntriesFor, getLogEntryByID, nativeQuery, queryLogsByPage, queryLogsByPageaddLogEntriesgetEventsCount, syncLogCreationEntriesprotected static final org.apache.commons.logging.Log 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 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 AuditLoggerprotected LogEntry buildEntryFromEvent(Event event)
public List<LogEntry> queryLogsByPage(String[] eventIds, String dateRange, String category, String path, int pageNb, int pageSize)
AuditReaderNote we will use NXQL in the future when the search engine will index history.
queryLogsByPage in interface AuditReadereventIds - 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 pageDateRangeQueryConstantspublic List<LogEntry> queryLogsByPage(String[] eventIds, Date limit, String category, String path, int pageNb, int pageSize)
AuditReaderNote we will use NXQL in the future when the search engine will index history.
queryLogsByPage in interface AuditReadereventIds - 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 pageDateRangeQueryConstantspublic 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)
public void logEvents(EventBundle bundle)
AuditLoggerlogEvents in interface AuditLoggerprotected boolean isAuditable(EventBundle eventBundle)
public void logEvent(Event event)
AuditLoggerlogEvent in interface AuditLoggerpublic boolean await(long time, TimeUnit unit) throws InterruptedException
await in interface AuditLoggerInterruptedExceptionpublic List<LogEntry> getLogEntriesFor(String uuid)
AuditReadergetLogEntriesFor in interface AuditReaderuuid - the document uuidpublic List<?> nativeQuery(String query, int pageNb, int pageSize)
AuditReadernativeQuery in interface AuditReaderpublic List<LogEntry> queryLogs(String[] eventIds, String dateRange)
AuditReaderNote we will use NXQL in the future when the search engine will index history.
queryLogs in interface AuditReadereventIds - the event ids.dateRange - a preset date range.DateRangeQueryConstantspublic List<LogEntry> nativeQueryLogs(String whereClause, int pageNb, int pageSize)
AuditReadernativeQueryLogs in interface AuditReaderCopyright © 2016 Nuxeo SA. All rights reserved.