java.lang.Object
com.intellij.internal.statistic.eventLog.validator.rules.beans.DataValidationRules
Direct Known Subclasses:
EventGroupRules

public class DataValidationRules extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • create

      @NotNull public static @NotNull DataValidationRules create(@Nullable @Nullable Map<String,Set<String>> eventDataRules, @NotNull @NotNull com.intellij.internal.statistic.eventLog.validator.storage.GlobalRulesHolder globalRulesHolder, @NotNull @NotNull ValidationSimpleRuleFactory factory, @NotNull @NotNull List<String> excludedFields)
    • validateEventData

      public com.intellij.internal.statistic.eventLog.validator.rules.impl.beans.EventDataField validateEventData(@NotNull @NotNull String key, @Nullable @Nullable Object data, @NotNull @NotNull EventContext context)
      Validates the data for a given event field.
      Parameters:
      key - The name of event field.
      data - The data to be validated.
      context - The event context to store errors.
      Returns:
      validated event data field, incorrect values are replaced with ValidationResultType.getDescription().
    • validateData

      public com.intellij.internal.statistic.eventLog.validator.rules.impl.beans.EventDataField validateData(@NotNull @NotNull String key, @Nullable @Nullable Object data, @NotNull @NotNull EventContext context, @NotNull @NotNull String jsonPath)
      Validates the data inside log event.
      Parameters:
      key - The key used to get the validation rules.
      data - The data to be validated.
      context - The event context to store errors.
      jsonPath - JSON path to validated field inside event, e.g "event.data", "client_data", "system_data", "ids", etc. Used to distinguish error in context.
      Returns:
      validated data, incorrect values are replaced with ValidationResultType.getDescription()
    • areEventDataRulesDefined

      public boolean areEventDataRulesDefined()
    • getEventDataRules

      public Map<String,FUSRule[]> getEventDataRules()