Class QuickFilterRuleTypeUnsafeCodeDecorator
java.lang.Object
com.atlassian.bamboo.plugin.decorator.AbstractUnsafeCodeDecorator<QuickFilterRuleType>
com.atlassian.bamboo.quickfilter.rule.QuickFilterRuleTypeUnsafeCodeDecorator
- All Implemented Interfaces:
QuickFilterRuleType,DescriptionProvider,NameProvider
public class QuickFilterRuleTypeUnsafeCodeDecorator
extends AbstractUnsafeCodeDecorator<QuickFilterRuleType>
implements QuickFilterRuleType
A decorator class for
QuickFilterRuleType that wraps execution of each method with
BambooPluginUtils.callUnsafeCode(BambooPluginUtils.Callable).-
Constructor Summary
ConstructorsConstructorDescriptionQuickFilterRuleTypeUnsafeCodeDecorator(@NotNull QuickFilterRuleType quickFilterRuleType) Creates a new instance of the decorated rule type. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefaults(@NotNull Map<String, Object> configuration) Add defaults to quick filter rule configuration.Return all configuration keys which should be persisted for a quick filter rule of this type.@Nullable StringDescription of this rule type.@Nullable StringgetEditHtml(@NotNull Map<String, Object> configuration) Get rendered HTML snippet for editing configuration of this rule type.@NotNull StringgetKey()Complete plugin module key of this rule type.@NotNull StringgetName()Name of this rule type.booleanmatches(@NotNull Map<String, Object> configuration, @NotNull ImmutableTopLevelPlan plan) Checks whether the given plan matches a rule of this type with given configuration.@NotNull ErrorCollectionValidate configuration of a rule of this type.Methods inherited from class com.atlassian.bamboo.plugin.decorator.AbstractUnsafeCodeDecorator
executeUnsafeCode, executeUnsafeCode, executeUnsafeCode, executeUnsafeCode, getEntity
-
Constructor Details
-
QuickFilterRuleTypeUnsafeCodeDecorator
public QuickFilterRuleTypeUnsafeCodeDecorator(@NotNull @NotNull QuickFilterRuleType quickFilterRuleType) Creates a new instance of the decorated rule type.- Parameters:
quickFilterRuleType- rule type to decorate
-
-
Method Details
-
getKey
Description copied from interface:QuickFilterRuleTypeComplete plugin module key of this rule type.- Specified by:
getKeyin interfaceQuickFilterRuleType
-
getName
Description copied from interface:QuickFilterRuleTypeName of this rule type.- Specified by:
getNamein interfaceDescriptionProvider- Specified by:
getNamein interfaceNameProvider- Specified by:
getNamein interfaceQuickFilterRuleType
-
getDescription
Description copied from interface:QuickFilterRuleTypeDescription of this rule type.- Specified by:
getDescriptionin interfaceDescriptionProvider- Specified by:
getDescriptionin interfaceQuickFilterRuleType
-
getConfigurationKeys
Description copied from interface:QuickFilterRuleTypeReturn 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:
getConfigurationKeysin interfaceQuickFilterRuleType
-
addDefaults
Description copied from interface:QuickFilterRuleTypeAdd defaults to quick filter rule configuration.- Specified by:
addDefaultsin 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:QuickFilterRuleTypeValidate configuration of a rule of this type. Return an empty error collection if the configuration is valid.- Specified by:
validatein 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:QuickFilterRuleTypeChecks whether the given plan matches a rule of this type with given configuration.- Specified by:
matchesin 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
-
getEditHtml
Description copied from interface:QuickFilterRuleTypeGet rendered HTML snippet for editing configuration of this rule type. Return null if this rule doesn't require configuration by user.- Specified by:
getEditHtmlin interfaceQuickFilterRuleType- 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
-