Package org.forgerock.audit.events
Class EventTopicsMetaData
- java.lang.Object
-
- org.forgerock.audit.events.EventTopicsMetaData
-
public final class EventTopicsMetaData extends Object
Encapsulates meta-data for event topics.
-
-
Constructor Summary
Constructors Constructor Description EventTopicsMetaData(Map<String,JsonValue> eventTopicsMetaData)Create a new EventTopicsMetaData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsTopic(String topic)Returnstrueif this object has meta-data for the specified topic.EventTopicsMetaDatafilter(Set<String> topics)Returns a new instance ofEventTopicsMetaDatacontaining only the meta-data for topics held by this object that are named within providedtopicsparameter.List<JsonPointer>getIncludeIfFilters(String topic)Returns JSON Pointers to fields which should be automatically whitelisted for a given topic's schema.JsonValuegetSchema(String topic)Returns the JSON schema for the requested topic if this object has meta-data for that topic.Set<String>getTopics()Returns the names of the set of topics for which this object has meta-data.
-
-
-
Method Detail
-
containsTopic
public boolean containsTopic(String topic)
Returnstrueif this object has meta-data for the specified topic.- Parameters:
topic- The name of the topic to check.- Returns:
trueif this object has meta-data for the specified topic;falseotherwise.
-
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;
nullotherwise.
-
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 ofEventTopicsMetaDatacontaining only the meta-data for topics held by this object that are named within providedtopicsparameter.Any entries within
topicsthat are not known to this object will not be included in the resultingEventTopicsMetaDataobject.- Parameters:
topics- The names of topics whose meta-data should be included.- Returns:
- a new instance of
EventTopicsMetaData.
-
-