Class SuspensionStatusRuleType
- java.lang.Object
-
- com.atlassian.bamboo.quickfilter.rule.AbstractQuickFilterRuleType
-
- com.atlassian.bamboo.quickfilter.rule.plugin.SuspensionStatusRuleType
-
- All Implemented Interfaces:
InitablePluginModule<QuickFilterRuleTypeModuleDescriptor>
,QuickFilterRuleType
,DescriptionProvider
,NameProvider
,BambooPluginModule
public class SuspensionStatusRuleType extends AbstractQuickFilterRuleType implements QuickFilterRuleType
Quick filter rule that filters plans by suspension status.
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.quickfilter.rule.AbstractQuickFilterRuleType
moduleDescriptor, templateRenderer
-
-
Constructor Summary
Constructors Constructor Description SuspensionStatusRuleType(@NotNull TemplateRenderer templateRenderer, @NotNull com.atlassian.struts.TextProvider textProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDefaults(@NotNull Map<String,Object> configuration)
Add defaults to quick filter rule configuration.@NotNull Set<String>
getConfigurationKeys()
Return all configuration keys which should be persisted for a quick filter rule of this type.@Nullable String
getDescription()
Description of this rule type.@NotNull String
getName()
Name of this rule type.boolean
matches(@NotNull Map<String,Object> configuration, @NotNull ImmutableTopLevelPlan plan)
Checks whether the given plan matches a rule of this type with given configuration.void
populateContextForEdit(@NotNull Map<String,Object> configuration, @NotNull Map<String,Object> context)
Populate edit HTML template's context.@NotNull ErrorCollection
validate(@NotNull Map<String,Object> configuration)
Validate configuration of a rule of this type.-
Methods inherited from class com.atlassian.bamboo.quickfilter.rule.AbstractQuickFilterRuleType
getEditHtml, getKey, init
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.quickfilter.rule.QuickFilterRuleType
getEditHtml, getKey
-
-
-
-
Constructor Detail
-
SuspensionStatusRuleType
@Inject public SuspensionStatusRuleType(@NotNull @NotNull TemplateRenderer templateRenderer, @NotNull @NotNull com.atlassian.struts.TextProvider textProvider)
-
-
Method Detail
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:QuickFilterRuleType
Name of this rule type.- Specified by:
getName
in interfaceDescriptionProvider
- Specified by:
getName
in interfaceNameProvider
- Specified by:
getName
in interfaceQuickFilterRuleType
-
getDescription
@Nullable public @Nullable String getDescription()
Description copied from interface:QuickFilterRuleType
Description of this rule type.- Specified by:
getDescription
in interfaceDescriptionProvider
- Specified by:
getDescription
in interfaceQuickFilterRuleType
-
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 interfaceQuickFilterRuleType
-
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 interfaceQuickFilterRuleType
- 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 interfaceQuickFilterRuleType
- 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 interfaceQuickFilterRuleType
- Parameters:
configuration
- rule configuration; the values may only be strings or lists of stringsplan
- plan to test- Returns:
- true if plan matches this rule, false otherwise
-
populateContextForEdit
public void populateContextForEdit(@NotNull @NotNull Map<String,Object> configuration, @NotNull @NotNull Map<String,Object> context)
Description copied from class:AbstractQuickFilterRuleType
Populate edit HTML template's context. Will be used inAbstractQuickFilterRuleType.getEditHtml(Map)
.- Specified by:
populateContextForEdit
in classAbstractQuickFilterRuleType
- Parameters:
configuration
- rule configuration; the values may only be strings or lists of stringscontext
- initial template's context, might be empty; values may be of any type
-
-