public interface QuickFilterRuleType extends DescriptionProvider
A type of a QuickFilterRule
which can be used within a QuickFilter
.
Instances of this class should be stateless or at least immutable, as they only represent a type of rule, not the rule itself. All methods invoked on a rule type always pass rules's state as arguments. It is possible that only one instance of each rule type class will be created and shared throughout Bamboo.
Modifier and Type | Method and Description |
---|---|
void |
addDefaults(Map<String,Object> configuration)
Add defaults to quick filter rule configuration.
|
Set<String> |
getConfigurationKeys()
Return all configuration keys which should be persisted for a quick filter rule of this type.
|
String |
getDescription()
Description of this rule type.
|
String |
getEditHtml(Map<String,Object> configuration)
Get rendered HTML snippet for editing configuration of this rule type.
|
String |
getKey()
Complete plugin module key of this rule type.
|
String |
getName()
Name of this rule type.
|
boolean |
matches(Map<String,Object> configuration,
ImmutableTopLevelPlan plan)
Checks whether the given plan matches a rule of this type with given configuration.
|
ErrorCollection |
validate(Map<String,Object> configuration)
Validate configuration of a rule of this type.
|
@NotNull String getKey()
@NotNull String getName()
getName
in interface DescriptionProvider
getName
in interface NameProvider
@Nullable String getDescription()
getDescription
in interface DescriptionProvider
@NotNull Set<String> getConfigurationKeys()
void addDefaults(@NotNull Map<String,Object> configuration)
configuration
- rule configuration; the values may only be strings or lists of strings@NotNull ErrorCollection validate(@NotNull Map<String,Object> configuration)
configuration
- rule configuration; the values may only be strings or lists of stringsboolean matches(@NotNull Map<String,Object> configuration, @NotNull ImmutableTopLevelPlan plan)
configuration
- rule configuration; the values may only be strings or lists of stringsplan
- plan to test@Nullable String getEditHtml(@NotNull Map<String,Object> configuration)
configuration
- configuration of this rule, might be empty (but still non null) on initial call; the values
may only be strings or lists of stringsCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.