org.thewonderlemming.c4plantuml.mojo.linting.rules.builtin.parameters

## Class AliasesShouldFollowStandardConventionRuleParametersFactory

- java.lang.Object
- - org.thewonderlemming.c4plantuml.mojo.linting.rules.builtin.AbstractRuleParametersFactory<AliasesShouldFollowStandardConvention>
  - - org.thewonderlemming.c4plantuml.mojo.linting.rules.builtin.parameters.AliasesShouldFollowStandardConventionRuleParametersFactory

-     public class AliasesShouldFollowStandardConventionRuleParametersFactory
      extends AbstractRuleParametersFactory<AliasesShouldFollowStandardConvention>

  An implementation of `AbstractRuleParametersFactory` for the `AliasesShouldFollowStandardConventionRule`.
  Author:
    thewonderlemming

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AliasesShouldFollowStandardConventionRuleParametersFactory(BuiltInRules mojoParameters)` Default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `getActivatedParameter(AliasesShouldFollowStandardConvention pojoParameters)` Extracts and returns the value of the `isActivated` parameter from a POJO in the `BuiltInRules` POJO.
    `protected AliasesShouldFollowStandardConvention` | `getPojoFromBuiltInRules(BuiltInRules mojoParameters)` Retrieves the rule configuration POJO from the `BuiltInRules` POJO.
    `protected Set<String>` | `getRuleParametersKeys()` Returns the parameters names for the current `AbstractLintingRule`.
    `protected Optional<String>` | `getValueForParameter(String key, AliasesShouldFollowStandardConvention pojoParameters)` Extracts and returns the value of the given parameter `key` from a POJO in the `BuiltInRules` POJO.

    - ### Methods inherited from class org.thewonderlemming.c4plantuml.mojo.linting.rules.builtin.AbstractRuleParametersFactory

      `getRuleParameters, isActivated`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AliasesShouldFollowStandardConventionRuleParametersFactory

          public AliasesShouldFollowStandardConventionRuleParametersFactory(BuiltInRules mojoParameters)

      Default constructor.
      Parameters:
        `mojoParameters` - the PJO that contains the `pom.xml` configuration.

  - ### Method Detail

    - #### getActivatedParameter

          protected boolean getActivatedParameter(AliasesShouldFollowStandardConvention pojoParameters)

      Extracts and returns the value of the `isActivated` parameter from a POJO in the `BuiltInRules` POJO.
      Specified by:
        `getActivatedParameter` in class `AbstractRuleParametersFactory<AliasesShouldFollowStandardConvention>`
      Parameters:
        `pojoParameters` - the POJO that holds the `pom.xml` plugin configuration.
      Returns:
        the value of the `isActivated` parameter.

    - #### getPojoFromBuiltInRules

          protected AliasesShouldFollowStandardConvention getPojoFromBuiltInRules(BuiltInRules mojoParameters)

      Retrieves the rule configuration POJO from the `BuiltInRules` POJO.
      Specified by:
        `getPojoFromBuiltInRules` in class `AbstractRuleParametersFactory<AliasesShouldFollowStandardConvention>`
      Parameters:
        `mojoParameters` - the POJO that hosts the rule configuration object.
      Returns:
        the rule configuration object.

    - #### getRuleParametersKeys

          protected Set<String> getRuleParametersKeys()

      Returns the parameters names for the current `AbstractLintingRule`.
      Specified by:
        `getRuleParametersKeys` in class `AbstractRuleParametersFactory<AliasesShouldFollowStandardConvention>`
      Returns:
        the parameters names for the rule.

    - #### getValueForParameter

          protected Optional<String> getValueForParameter(String key,
                                                          AliasesShouldFollowStandardConvention pojoParameters)

      Extracts and returns the value of the given parameter `key` from a POJO in the `BuiltInRules` POJO.
      Specified by:
        `getValueForParameter` in class `AbstractRuleParametersFactory<AliasesShouldFollowStandardConvention>`
      Parameters:
        `key` - the name of the parameter to retrieves the value from.
        `pojoParameters` - the POJO that holds the `pom.xml` plugin configuration.
      Returns:
        the value of the `key` parameter.

Copyright © 2020. All rights reserved.