Class GroupAnalysisResult

java.lang.Object
org.apache.nifi.flowanalysis.AbstractAnalysisResult
org.apache.nifi.flowanalysis.GroupAnalysisResult

public class GroupAnalysisResult extends AbstractAnalysisResult
Holds information about a FlowAnalysisRule violation after analyzing (a part of) the flow, represented by a process group. One such analysis can result in multiple instances of this class.
  • Field Details

  • Constructor Details

  • Method Details

    • getComponent

      public Optional<VersionedComponent> getComponent()
      Returns:
      the component this result corresponds to or empty if this result corresponds to the entirety of the process group that was analyzed
    • toString

      public String toString()
      Overrides:
      toString in class AbstractAnalysisResult
    • forGroup

      public static GroupAnalysisResult.Builder forGroup(String issueId, String message)
      Build a new analysis result tied to the currently analyzed process group
      Parameters:
      issueId - A rule-defined id that corresponds to a unique type of issue recognized by the rule. Newer analysis runs may produce a result with the same issueId in which case the old one will be overwritten (or recreated if it is the same in other aspects as well). However, if the previous result was disabled the new one will be disabled as well.
      message - A violation message
      Returns:
      a Builder for a new analysis result instance tied to the currently analyzed process group
    • forComponent

      public static GroupAnalysisResult.Builder forComponent(VersionedComponent component, String issueId, String message)
      Build a new analysis result tied to a component. Note that the result will be scoped to the process group of the component and not the currently analyzed group. This means that even when a new analysis is run against that process group, this result will become obsolete.
      Parameters:
      component - The component that this result is tied to
      issueId - A rule-defined id that corresponds to a unique type of issue recognized by the rule. Newer analysis runs may produce a result with the same issueId in which case the old one will be overwritten (or recreated if it is the same in other aspects as well). However, if the previous result was disabled the new one will be disabled as well.
      message - A violation message
      Returns:
      a Builder for a new analysis result tied to a component