Class EventTopicsMetaDataBuilder

    • Method Detail

      • coreTopicSchemas

        public static EventTopicsMetaDataBuilder coreTopicSchemas()
        Create a new instance of EventTopicsMetaDataBuilder that will populate EventTopicsMetaData 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

        public EventTopicsMetaDataBuilder withAdditionalTopicSchemas​(JsonValue additionalTopicSchemas)
        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.