Class QuickFilterRuleTypeUnsafeCodeDecorator

    • Constructor Detail

      • QuickFilterRuleTypeUnsafeCodeDecorator

        public QuickFilterRuleTypeUnsafeCodeDecorator​(@NotNull
                                                      @NotNull QuickFilterRuleType quickFilterRuleType)
        Creates a new instance of the decorated rule type.
        Parameters:
        quickFilterRuleType - rule type to decorate
    • Method Detail

      • getConfigurationKeys

        @NotNull
        public @NotNull Set<String> getConfigurationKeys()
        Description copied from interface: QuickFilterRuleType
        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.
        Specified by:
        getConfigurationKeys in interface QuickFilterRuleType
      • addDefaults

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

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

        public boolean matches​(@NotNull
                               @NotNull Map<String,​Object> configuration,
                               @NotNull
                               @NotNull ImmutableTopLevelPlan plan)
        Description copied from interface: QuickFilterRuleType
        Checks whether the given plan matches a rule of this type with given configuration.
        Specified by:
        matches in interface QuickFilterRuleType
        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
        public @Nullable String getEditHtml​(@NotNull
                                            @NotNull Map<String,​Object> configuration)
        Description copied from interface: QuickFilterRuleType
        Get rendered HTML snippet for editing configuration of this rule type. Return null if this rule doesn't require configuration by user.
        Specified by:
        getEditHtml in interface QuickFilterRuleType
        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