Package org.apache.nifi.flowanalysis
Class GroupAnalysisResult
java.lang.Object
org.apache.nifi.flowanalysis.AbstractAnalysisResult
org.apache.nifi.flowanalysis.GroupAnalysisResult
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.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.apache.nifi.flowanalysis.AbstractAnalysisResult
explanation, issueId, message
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
GroupAnalysisResult
(String issueId, String message, String explanation, Optional<VersionedComponent> component) -
Method Summary
Modifier and TypeMethodDescriptionstatic GroupAnalysisResult.Builder
forComponent
(VersionedComponent component, String issueId, String message) Build a new analysis result tied to a component.static GroupAnalysisResult.Builder
Build a new analysis result tied to the currently analyzed process grouptoString()
Methods inherited from class org.apache.nifi.flowanalysis.AbstractAnalysisResult
getExplanation, getIssueId, getMessage
-
Field Details
-
component
-
-
Constructor Details
-
GroupAnalysisResult
private GroupAnalysisResult(String issueId, String message, String explanation, Optional<VersionedComponent> component)
-
-
Method Details
-
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
- Overrides:
toString
in classAbstractAnalysisResult
-
forGroup
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 toissueId
- 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
-