Package org.forgerock.audit.events
Class EventTopicsMetaDataBuilder
java.lang.Object
org.forgerock.audit.events.EventTopicsMetaDataBuilder
Builder for
EventTopicsMetaData
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a new instance ofEventTopicsMetaData
.static EventTopicsMetaDataBuilder
Create a new instance of EventTopicsMetaDataBuilder that will populateEventTopicsMetaData
objects its creates with the schema meta-data for core topics.withAdditionalTopicSchemas
(JsonValue additionalTopicSchemas) Specifies schemas for additional topics.withCoreTopicSchemaExtensions
(JsonValue coreTopicSchemaExtensions) Specifies additional fields that should be added to the schemas for core event topics.
-
Method Details
-
coreTopicSchemas
Create a new instance of EventTopicsMetaDataBuilder that will populateEventTopicsMetaData
objects its creates with the schema meta-data for core topics.- Returns:
- a new instance of EventTopicsMetaDataBuilder.
-
withCoreTopicSchemaExtensions
public EventTopicsMetaDataBuilder withCoreTopicSchemaExtensions(JsonValue coreTopicSchemaExtensions) Specifies additional fields that should be added to the schemas for core event topics.The extension must not redefine a property already defined in the core event topics.
Example of a valid extension:
{ "access": { "schema": { "$schema": "http://json-schema.org/draft-04/schema#", "id": "/", "type": "object", "properties": { "extraField": { "type": "string" } } } } }
- Parameters:
coreTopicSchemaExtensions
- the extension of the core event topics.- Returns:
- this builder for method-chaining.
-
withAdditionalTopicSchemas
Specifies schemas for additional topics.Custom schema must always include _id, timestamp, transactionId and eventName fields.
Example of a valid schema:
"customTopic": { "schema": { "$schema": "http://json-schema.org/draft-04/schema#", "id": "/", "type": "object", "properties": { "_id": { "type": "string" }, "timestamp": { "type": "string" }, "transactionId": { "type": "string" }, "eventName": { "type": "string" }, "customField": { "type": "string" } } } }
- Parameters:
additionalTopicSchemas
- the schemas of the additional event topics.- Returns:
- this builder for method-chaining.
-
build
Create a new instance ofEventTopicsMetaData
.- Returns:
- a new instance of
EventTopicsMetaData
.
-