public abstract class AbstractRuleParametersFactory<P> extends Object
RuleParameters for any AbstractLintingRule. the type of POJO embedded within the BuiltInRules object to configure the current rule.
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRuleParametersFactory(BuiltInRules mojoParameters)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
getActivatedParameter(P pojoParameters)
Extracts and returns the value of the
isActivated parameter from a POJO in the BuiltInRules POJO. |
protected abstract P |
getPojoFromBuiltInRules(BuiltInRules mojoParameters)
Retrieves the rule configuration POJO from the
BuiltInRules POJO. |
org.thewonderlemming.c4plantuml.linter.rules.RuleParameters |
getRuleParameters()
Returns the built
RuleParameters instance. |
protected abstract Set<String> |
getRuleParametersKeys()
Returns the parameters names for the current
AbstractLintingRule. |
protected abstract Optional<String> |
getValueForParameter(String key,
P pojoParameters)
Extracts and returns the value of the given parameter
key from a POJO in the BuiltInRules POJO. |
boolean |
isActivated()
Tells whether or not the current
AbstractLintingRule is enabled or disabled. |
protected AbstractRuleParametersFactory(BuiltInRules mojoParameters)
mojoParameters - the PJO containing the configuration from the pom.xml file.public org.thewonderlemming.c4plantuml.linter.rules.RuleParameters getRuleParameters()
RuleParameters instance.RuleParameters.public boolean isActivated()
AbstractLintingRule is enabled or disabled.true is the rule is enabled, false else.protected abstract boolean getActivatedParameter(P pojoParameters)
isActivated parameter from a POJO in the BuiltInRules POJO.pojoParameters - the POJO that holds the pom.xml plugin configuration.isActivated parameter.protected abstract P getPojoFromBuiltInRules(BuiltInRules mojoParameters)
BuiltInRules POJO.mojoParameters - the POJO that hosts the rule configuration object.protected abstract Set<String> getRuleParametersKeys()
AbstractLintingRule.protected abstract Optional<String> getValueForParameter(String key, P pojoParameters)
key from a POJO in the BuiltInRules POJO.key - the name of the parameter to retrieves the value from.pojoParameters - the POJO that holds the pom.xml plugin configuration.key parameter.Copyright © 2020. All rights reserved.