public class EventLog
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DELETE |
Modifier and Type | Method and Description |
---|---|
org.dataone.service.types.v2.Log |
getD1Report(java.lang.String[] ipAddress,
java.lang.String[] principal,
java.lang.String[] docid,
java.lang.String event,
java.sql.Timestamp startDate,
java.sql.Timestamp endDate,
boolean anonymous,
java.lang.Integer start,
java.lang.Integer count) |
java.util.Map<java.lang.String,java.util.List<java.lang.Object>> |
getIndexFields(org.dataone.service.types.v1.Identifier pid,
java.lang.String event) |
static EventLog |
getInstance()
Return the single instance of the event log after initializing it if it
wasn't previously initialized.
|
java.lang.String |
getReport(java.lang.String[] ipAddress,
java.lang.String[] principal,
java.lang.String[] docid,
java.lang.String[] event,
java.sql.Timestamp startDate,
java.sql.Timestamp endDate,
boolean anonymous)
Get a report of the log events that match a set of filters.
|
boolean |
isDeleted(java.lang.String docid)
A utility method to determine if the given docid was deleted.
|
void |
log(java.lang.String ipAddress,
java.lang.String userAgent,
java.lang.String principal,
java.lang.String docid,
java.lang.String event)
Log an event of interest to the application.
|
public static final java.lang.String DELETE
public static EventLog getInstance()
public void log(java.lang.String ipAddress, java.lang.String userAgent, java.lang.String principal, java.lang.String docid, java.lang.String event)
ipAddress
- the internet protocol address for the eventuserAgent
- the agent making the requestprincipal
- the principal for the event (a username, etc)docid
- the identifier of the document to which the event appliesevent
- the string code for the eventpublic java.util.Map<java.lang.String,java.util.List<java.lang.Object>> getIndexFields(org.dataone.service.types.v1.Identifier pid, java.lang.String event)
public java.lang.String getReport(java.lang.String[] ipAddress, java.lang.String[] principal, java.lang.String[] docid, java.lang.String[] event, java.sql.Timestamp startDate, java.sql.Timestamp endDate, boolean anonymous)
ipAddress
- the internet protocol address for the eventprincipal
- the principal for the event (a username, etc)docid
- the identifier of the document to which the event appliesevent
- the string code for the eventstartDate
- beginning of date range for queryendDate
- end of date range for querypublic boolean isDeleted(java.lang.String docid)
docid
- the specified docidpublic org.dataone.service.types.v2.Log getD1Report(java.lang.String[] ipAddress, java.lang.String[] principal, java.lang.String[] docid, java.lang.String event, java.sql.Timestamp startDate, java.sql.Timestamp endDate, boolean anonymous, java.lang.Integer start, java.lang.Integer count)
Copyright © 2020 Regents of the University of California. All Rights Reserved.