Class EventTopicsMetaData


  • public final class EventTopicsMetaData
    extends Object
    Encapsulates meta-data for event topics.
    • Constructor Detail

      • EventTopicsMetaData

        public EventTopicsMetaData​(Map<String,​JsonValue> eventTopicsMetaData)
        Create a new EventTopicsMetaData.
        Parameters:
        eventTopicsMetaData - Event topic schemas mapped by event topic name.
    • Method Detail

      • containsTopic

        public boolean containsTopic​(String topic)
        Returns true if this object has meta-data for the specified topic.
        Parameters:
        topic - The name of the topic to check.
        Returns:
        true if this object has meta-data for the specified topic; false otherwise.
      • getSchema

        public JsonValue getSchema​(String topic)
        Returns the JSON schema for the requested topic if this object has meta-data for that topic. Otherwise, null is returned.
        Parameters:
        topic - The name of the topic to check.
        Returns:
        JSON schema if this object has meta-data for the specified topic; null otherwise.
      • getIncludeIfFilters

        public List<JsonPointer> getIncludeIfFilters​(String topic)
        Returns JSON Pointers to fields which should be automatically whitelisted for a given topic's schema.

        Returns null if there is no meta-data for the requested topic.

        Parameters:
        topic - The name of the topic to check.
        Returns:
        JSON Pointers if this object has meta-data for the specified topic; null otherwise.
      • getTopics

        public Set<String> getTopics()
        Returns the names of the set of topics for which this object has meta-data.
        Returns:
        set of topic names.
      • filter

        public EventTopicsMetaData filter​(Set<String> topics)
        Returns a new instance of EventTopicsMetaData containing only the meta-data for topics held by this object that are named within provided topics parameter.

        Any entries within topics that are not known to this object will not be included in the resulting EventTopicsMetaData object.

        Parameters:
        topics - The names of topics whose meta-data should be included.
        Returns:
        a new instance of EventTopicsMetaData.