Interface Profile


public interface Profile
Interface describing a Profile.

It is a set of ConfiguredRules, some of which are enabled.

Author:
Damien Carbonne
  • Method Details

    • getName

      String getName()
      Returns:
      The profile name.
    • getDescription

      String getDescription()
      Returns:
      The profile description.
    • getMetas

      Params getMetas()
      Returns:
      The meta data associated to this profile.
    • getLabels

      Labels getLabels()
      Returns:
      The labels associated to this profile.
    • getRules

      Set<Rule> getRules()
      Returns:
      The set of rules in this profile.
    • hasRule

      default boolean hasRule(Rule rule)
    • getEnabledRules

      default Set<Rule> getEnabledRules()
      Returns:
      The set of rules that are enabled in this profile.
    • getProfileConfig

      ProfileConfig getProfileConfig()
    • hasRule

      default boolean hasRule(RuleId ruleId)
    • getConfiguredRule

      ConfiguredRule getConfiguredRule(Rule rule)
      Parameters:
      rule - The rule.
      Returns:
      The configured rule corresponding to rule.
    • getRuleConfig

      default RuleConfig getRuleConfig(Rule rule)
      Parameters:
      rule - The rule.
      Returns:
      The rule config.
    • isEnabled

      default boolean isEnabled(Rule rule)
      Parameters:
      rule - The rule.
      Returns:
      true if rule is enabled in this profile.
      Throws:
      IllegalArgumentException - When rule is null or is unknown.
    • getCustomizedSeverity

      default Optional<IssueSeverity> getCustomizedSeverity(Rule rule)
      Parameters:
      rule - The rule.
      Returns:
      The optional customized severity.
    • getEffectiveSeverity

      default IssueSeverity getEffectiveSeverity(Rule rule)
      Parameters:
      rule - The rule.
      Returns:
      The effective severity of rule.
      Throws:
      IllegalArgumentException - When rule is null or is unknown.
    • getParams

      default Params getParams(Rule rule)
      Returns the parameters to use for a rule.
      Parameters:
      rule - The rule.
      Returns:
      The parameters that are used to configure rule in this profile.
      Throws:
      IllegalArgumentException - When rule is null or is unknown.