Interface QuickFilterRuleType

    • Method Detail

      • getKey

        @NotNull
        @NotNull String getKey()
        Complete plugin module key of this rule type.
      • getConfigurationKeys

        @NotNull
        @NotNull Set<String> getConfigurationKeys()
        Return all configuration keys which should be persisted for a quick filter rule of this type. If this rule type doesn't require any configuration, return an empty set. Only values of these keys from rule's configuration will be persisted. Keys not found in rule's configuration will be skipped.
      • addDefaults

        void addDefaults​(@NotNull
                         @NotNull Map<String,​Object> configuration)
        Add defaults to quick filter rule configuration.
        Parameters:
        configuration - rule configuration; the values may only be strings or lists of strings
      • validate

        @NotNull
        @NotNull ErrorCollection validate​(@NotNull
                                          @NotNull Map<String,​Object> configuration)
        Validate configuration of a rule of this type. Return an empty error collection if the configuration is valid.
        Parameters:
        configuration - rule configuration; the values may only be strings or lists of strings
      • matches

        boolean matches​(@NotNull
                        @NotNull Map<String,​Object> configuration,
                        @NotNull
                        @NotNull ImmutableTopLevelPlan plan)
        Checks whether the given plan matches a rule of this type with given configuration.
        Parameters:
        configuration - rule configuration; the values may only be strings or lists of strings
        plan - plan to test
        Returns:
        true if plan matches this rule, false otherwise
      • getEditHtml

        @Nullable
        @Nullable String getEditHtml​(@NotNull
                                     @NotNull Map<String,​Object> configuration)
        Get rendered HTML snippet for editing configuration of this rule type. Return null if this rule doesn't require configuration by user.
        Parameters:
        configuration - configuration of this rule, might be empty (but still non null) on initial call; the values may only be strings or lists of strings