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 boolean
containsTopic(String topic)
Returnstrue
if this object has meta-data for the specified topic.EventTopicsMetaData
filter(Set<String> topics)
Returns a new instance ofEventTopicsMetaData
containing only the meta-data for topics held by this object that are named within providedtopics
parameter.List<JsonPointer>
getIncludeIfFilters(String topic)
Returns JSON Pointers to fields which should be automatically whitelisted for a given topic's schema.JsonValue
getSchema(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)
Returnstrue
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 ofEventTopicsMetaData
containing only the meta-data for topics held by this object that are named within providedtopics
parameter.Any entries within
topics
that are not known to this object will not be included in the resultingEventTopicsMetaData
object.- Parameters:
topics
- The names of topics whose meta-data should be included.- Returns:
- a new instance of
EventTopicsMetaData
.
-
-