|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.runtime.model.DefaultComponent org.nuxeo.ecm.platform.audit.service.NXAuditEventsService
public class NXAuditEventsService
Event service configuration.
Field Summary | |
---|---|
static ComponentName |
NAME
|
Constructor Summary | |
---|---|
NXAuditEventsService()
|
Method Summary | |
---|---|
void |
addLogEntries(EntityManager em,
List<LogEntry> entries)
|
void |
addLogEntries(List<LogEntry> entries)
Adds given log entries. |
void |
addLogEntry(EntityManager em,
LogEntry entry)
|
void |
addLogEntry(LogEntry entry)
|
void |
deactivate(ComponentContext context)
Deactivates the component. |
Set<String> |
getAuditableEventNames()
Returns the list of auditable event names. |
Long |
getEventsCount(EntityManager em,
String eventId)
|
Long |
getEventsCount(String eventId)
|
List<LogEntry> |
getLogEntriesFor(EntityManager em,
String uuid)
|
List<LogEntry> |
getLogEntriesFor(EntityManager em,
String uuid,
Map<String,FilterMapEntry> filterMap,
boolean doDefaultSort)
|
List<LogEntry> |
getLogEntriesFor(String uuid)
Returns the logs given a doc uuid. |
List<LogEntry> |
getLogEntriesFor(String uuid,
Map<String,FilterMapEntry> filterMap,
boolean doDefaultSort)
|
LogEntry |
getLogEntryByID(EntityManager em,
long id)
|
LogEntry |
getLogEntryByID(long id)
Returns a given log entry given its id. |
List<String> |
getLoggedEventIds()
|
List<String> |
getLoggedEventIds(EntityManager em)
|
PersistenceProvider |
getOrCreatePersistenceProvider()
|
AdapterDescriptor[] |
getRegisteredAdapters()
|
void |
logEvent(EntityManager em,
Event event)
|
void |
logEvent(Event event)
Logs an Event. |
void |
logEvents(EntityManager em,
EventBundle eventBundle)
|
void |
logEvents(EventBundle eventBundle)
Logs a bundle of events |
List<?> |
nativeQuery(EntityManager em,
String query,
int pageNb,
int pageSize)
|
List<?> |
nativeQuery(EntityManager em,
String query,
Map<String,Object> params,
int pageNb,
int pageSize)
|
List<?> |
nativeQuery(String query,
int pageNb,
int pageSize)
Returns a batched list of entries. |
List<?> |
nativeQuery(String query,
Map<String,Object> params,
int pageNb,
int pageSize)
Returns a batched list of entries. |
List<LogEntry> |
nativeQueryLogs(EntityManager em,
String whereClause,
int pageNb,
int pageSize)
|
List<LogEntry> |
nativeQueryLogs(String whereClause,
int pageNb,
int pageSize)
Returns a batched list of log entries. |
ExtendedInfo |
newExtendedInfo(Serializable value)
Create a new ExtendedInfo instance |
LogEntry |
newLogEntry()
Create a new LogEntry instance. |
List<LogEntry> |
queryLogs(EntityManager em,
String[] eventIds,
String dateRange)
|
List<LogEntry> |
queryLogs(String[] eventIds,
String dateRange)
Returns the list of log entries. |
List<LogEntry> |
queryLogsByPage(EntityManager em,
String[] eventIds,
Date limit,
String[] category,
String path,
int pageNb,
int pageSize)
|
List<LogEntry> |
queryLogsByPage(EntityManager em,
String[] eventIds,
Date limit,
String category,
String path,
int pageNb,
int pageSize)
|
List<LogEntry> |
queryLogsByPage(EntityManager em,
String[] eventIds,
String dateRange,
String[] category,
String path,
int pageNb,
int pageSize)
|
List<LogEntry> |
queryLogsByPage(EntityManager em,
String[] eventIds,
String dateRange,
String category,
String path,
int pageNb,
int pageSize)
|
List<LogEntry> |
queryLogsByPage(String[] eventIds,
Date limit,
String[] category,
String path,
int pageNb,
int pageSize)
|
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)
|
List<LogEntry> |
queryLogsByPage(String[] eventIds,
String dateRange,
String category,
String path,
int pageNb,
int pageSize)
Returns the batched list of log entries. |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor)
|
long |
syncLogCreationEntries(EntityManager em,
String repoId,
String path,
Boolean recurs)
|
long |
syncLogCreationEntries(String repoId,
String path,
Boolean recurs)
Forces log Synchronisation for a branch of the repository. |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor)
|
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent |
---|
activate, applicationStarted, getAdapter, registerExtension, unregisterExtension |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ComponentName NAME
Constructor Detail |
---|
public NXAuditEventsService()
Method Detail |
---|
public PersistenceProvider getOrCreatePersistenceProvider()
public void deactivate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime context
Exception
- if an error occurs during activationpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution
in class DefaultComponent
Exception
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution
in class DefaultComponent
Exception
public Set<String> getAuditableEventNames()
NXAuditEvents
getAuditableEventNames
in interface NXAuditEvents
public AdapterDescriptor[] getRegisteredAdapters()
public void addLogEntries(List<LogEntry> entries)
AuditLogger
addLogEntries
in interface AuditLogger
entries
- the list of log entries.public void addLogEntries(EntityManager em, List<LogEntry> entries)
public List<LogEntry> getLogEntriesFor(String uuid)
AuditReader
:XXX: add parameters to this method for paging.
getLogEntriesFor
in interface AuditReader
uuid
- the document uuid
public List<LogEntry> getLogEntriesFor(EntityManager em, String uuid)
public List<LogEntry> getLogEntriesFor(String uuid, Map<String,FilterMapEntry> filterMap, boolean doDefaultSort)
getLogEntriesFor
in interface AuditReader
public List<LogEntry> getLogEntriesFor(EntityManager em, String uuid, Map<String,FilterMapEntry> filterMap, boolean doDefaultSort)
public LogEntry getLogEntryByID(long id)
AuditReader
getLogEntryByID
in interface AuditReader
id
- the log entry identifier
public LogEntry getLogEntryByID(EntityManager em, long id)
public List<LogEntry> nativeQueryLogs(String whereClause, int pageNb, int pageSize)
AuditReader
nativeQueryLogs
in interface AuditReader
public List<LogEntry> nativeQueryLogs(EntityManager em, String whereClause, int pageNb, int pageSize)
public List<?> nativeQuery(String query, int pageNb, int pageSize)
AuditReader
nativeQuery
in interface AuditReader
public List<?> nativeQuery(EntityManager em, String query, int pageNb, int pageSize)
public List<?> nativeQuery(String query, Map<String,Object> params, int pageNb, int pageSize)
AuditReader
nativeQuery
in interface AuditReader
query
- a JPA query language queryparams
- parameters for the querypageNb
- the page number (starts at 1)pageSize
- the number of results per pagepublic List<?> nativeQuery(EntityManager em, String query, Map<String,Object> params, int pageNb, int pageSize)
public List<LogEntry> queryLogs(String[] eventIds, String dateRange)
AuditReader
Note we will use NXQL in the future when the search engine will index history.
queryLogs
in interface AuditReader
eventIds
- the event ids.dateRange
- a preset date range.
DateRangeQueryConstants
public List<LogEntry> queryLogs(EntityManager em, String[] eventIds, String dateRange)
public List<LogEntry> queryLogsByPage(String[] eventIds, String dateRange, String[] category, String path, int pageNb, int pageSize)
queryLogsByPage
in interface AuditReader
public List<LogEntry> queryLogsByPage(EntityManager em, String[] eventIds, String dateRange, String[] category, String path, int pageNb, int pageSize)
public List<LogEntry> queryLogsByPage(String[] eventIds, Date limit, String[] category, String path, int pageNb, int pageSize)
queryLogsByPage
in interface AuditReader
public List<LogEntry> queryLogsByPage(EntityManager em, String[] eventIds, Date limit, String[] category, String path, int pageNb, int pageSize)
public long syncLogCreationEntries(String repoId, String path, Boolean recurs)
AuditAdmin
syncLogCreationEntries
in interface AuditAdmin
public long syncLogCreationEntries(EntityManager em, String repoId, String path, Boolean recurs)
public void addLogEntry(LogEntry entry)
public void addLogEntry(EntityManager em, LogEntry entry)
public Long getEventsCount(String eventId)
public Long getEventsCount(EntityManager em, String eventId)
public List<String> getLoggedEventIds()
public List<String> getLoggedEventIds(EntityManager em)
public void logEvent(Event event)
AuditLogger
logEvent
in interface AuditLogger
public void logEvents(EventBundle eventBundle)
AuditLogger
logEvents
in interface AuditLogger
public void logEvents(EntityManager em, EventBundle eventBundle)
public void logEvent(EntityManager em, Event event)
public List<LogEntry> queryLogsByPage(EntityManager em, String[] eventIds, String dateRange, String category, String path, int pageNb, int pageSize)
public List<LogEntry> queryLogsByPage(String[] eventIds, String dateRange, String category, String path, int pageNb, int pageSize)
AuditReader
Note we will use NXQL in the future when the search engine will index history.
queryLogsByPage
in interface AuditReader
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
DateRangeQueryConstants
public List<LogEntry> queryLogsByPage(String[] eventIds, Date limit, String category, String path, int pageNb, int pageSize)
AuditReader
Note we will use NXQL in the future when the search engine will index history.
queryLogsByPage
in interface AuditReader
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
DateRangeQueryConstants
public List<LogEntry> queryLogsByPage(EntityManager em, String[] eventIds, Date limit, String category, String path, int pageNb, int pageSize)
public LogEntry newLogEntry()
AuditLogger
newLogEntry
in interface AuditLogger
public ExtendedInfo newExtendedInfo(Serializable value)
AuditLogger
newExtendedInfo
in interface AuditLogger
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |