public abstract class AbstractAuditBackend extends Object implements AuditBackend
AuditBackend implementations| Modifier and Type | Field and Description |
|---|---|
protected NXAuditEventsService |
component |
protected ExpressionEvaluator |
expressionEvaluator |
static String |
FORCE_AUDIT_FACET |
protected static org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
AbstractAuditBackend() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(NXAuditEventsService component) |
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) |
void |
logEvent(Event event)
Logs an Event.
|
void |
logEvents(EventBundle eventBundle)
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, waitdeactivate, onApplicationStartedgetLogEntriesFor, getLogEntryByID, nativeQuery, queryLogsByPage, queryLogsByPageaddLogEntriesgetEventsCount, syncLogCreationEntriesprotected static final org.apache.commons.logging.Log log
public static final String FORCE_AUDIT_FACET
protected NXAuditEventsService component
protected final ExpressionEvaluator expressionEvaluator
public AbstractAuditBackend()
public void activate(NXAuditEventsService component)
activate in interface AuditBackendprotected 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 eventBundle)
AuditLoggerlogEvents in interface AuditLoggerpublic void logEvent(Event event)
AuditLoggerlogEvent in interface AuditLoggerpublic 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 © 2015 Nuxeo SA. All rights reserved.