public class AuditUtil
extends java.lang.Object
Constructor and Description |
---|
AuditUtil() |
Modifier and Type | Method and Description |
---|---|
static OCAuditEvent |
buildAuditEventObject(java.lang.String objectId,
java.lang.String userName,
java.lang.String displayName,
java.lang.String eventName,
java.lang.String eventDescription,
java.util.Map<java.lang.String,java.lang.String> extrasMap)
This method is used to build up an audit object.
|
static void |
createAuditEvent(java.lang.String ticket,
java.lang.String objectId,
java.lang.String eventDescription,
java.lang.String eventName)
Helper-method that starts an audit event.
|
static java.lang.String |
mapToString(java.util.Map<java.lang.String,java.lang.String> extras)
Converts a map of extras to an string to be stored in AuditEventObject's attribute list.
|
static java.lang.String[] |
mapToStringList(java.util.Map<java.lang.String,java.lang.String> extras)
Converts a map of extras to an string to be stored in AuditEventObject's attribute list.
|
static java.util.Map<java.lang.String,java.lang.String> |
stringListToMap(java.lang.String[] stringList)
Splits a String array into a map.
|
static java.util.Map<java.lang.String,java.lang.String> |
stringToMap(java.lang.String attrList)
Splits a String on a pipe delimiter and separates each resulting pair into a map.
|
public static java.util.Map<java.lang.String,java.lang.String> stringToMap(java.lang.String attrList)
attrList
- the string representation of the list to separate into our map.public static java.util.Map<java.lang.String,java.lang.String> stringListToMap(java.lang.String[] stringList)
stringList
- the string array with paris to separate into our map.public static java.lang.String mapToString(java.util.Map<java.lang.String,java.lang.String> extras)
extras
- the map of extras to convert into a string.public static java.lang.String[] mapToStringList(java.util.Map<java.lang.String,java.lang.String> extras)
extras
- the map of extras to convert into a string.public static OCAuditEvent buildAuditEventObject(java.lang.String objectId, java.lang.String userName, java.lang.String displayName, java.lang.String eventName, java.lang.String eventDescription, java.util.Map<java.lang.String,java.lang.String> extrasMap)
objectId
- The objectId of the object we are auditinguserName
- The user name of the user involved with the auditdisplayName
- The Display name of the user involved with the auditextrasMap
- The map of extra propertieseventName
- The name of the audit eventeventDescription
- The description of the audit eventextrasMap
- The map of extra properties. Now you have the option to set the audit event date from the source by passing the value under
the key auditDate in the extras map.public static void createAuditEvent(java.lang.String ticket, java.lang.String objectId, java.lang.String eventDescription, java.lang.String eventName)
ticket
- A valid OC ticket.objectId
- The objectId of the redacted document.eventDescription
- the event descriptioneventName
- the event name