Class AuditEventHelper
java.lang.Object
org.forgerock.audit.events.AuditEventHelper
Helper methods for AuditEvents.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdotNotationToJsonPointer(String fieldName) Converts dotted-path field identifier to JsonPointer form.static JsonValuegetAuditEventProperties(JsonValue auditEvent) Gets the Audit Event schema properties.static JsonValuegetAuditEventSchema(JsonValue auditEvent) Gets the Audit Event schema.getConfiguredAuditEventHandlers(JsonValue auditEvent) Gets the AuditEventHandlers that the audit event is configure to log to.static StringgetPropertyType(JsonValue auditEvent, JsonPointer property) Gets a AuditEvent property type.static booleanisPropertyRequired(JsonValue auditEvent, JsonPointer property) Gets whether a AuditEvent property is required.static StringjsonPointerToDotNotation(String fieldName) Converts JsonPointer field identifier to dotted-path form.
-
Field Details
-
STRING_TYPE
-
OBJECT_TYPE
-
BOOLEAN_TYPE
-
NUMBER_TYPE
-
ARRAY_TYPE
-
-
Method Details
-
isPropertyRequired
Gets whether a AuditEvent property is required.- Parameters:
auditEvent- the audit event to get the property of.property- the property to check if required.- Returns:
- true if the property is required; false otherwise.
-
getPropertyType
public static String getPropertyType(JsonValue auditEvent, JsonPointer property) throws ResourceException Gets a AuditEvent property type.- Parameters:
auditEvent- the audit event to get the property of.property- the property to check if required.- Returns:
- true if the property is required; false otherwise.
- Throws:
ResourceException- if the property is unknown
-
getConfiguredAuditEventHandlers
-
getAuditEventProperties
Gets the Audit Event schema properties.- Parameters:
auditEvent- the audit event JsonValue definition.- Returns:
- JsonValue containing all the properties for the audit event.
- Throws:
ResourceException- if no audit event is defined
-
getAuditEventSchema
Gets the Audit Event schema.- Parameters:
auditEvent- the audit event JsonValue definition.- Returns:
- JsonValue containing the schema object for the audit event.
- Throws:
ResourceException- if no audit event is defined
-
jsonPointerToDotNotation
-
dotNotationToJsonPointer
-