Class PanelCheckResultHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CheckResultfilterCheckResultForErrorsPrioritized(CheckResult checkResult) Filters the check result to prioritize errors over warnings.<I> Istatic PanelCheckResultHelpermakeHelper(PanelCheckResult panelCheckResult) <I,O> boolean showPanelIfNeeded(CheckableEvent<I, O> checkableEvent, O output) <I,O> boolean showPanelIfNeeded(CheckableEvent<I, O> checkableEvent, O output, Consumer<UIMessage> confirmConsumer) booleanshowPanelIfNeeded(CheckResult checkResult) booleanshowPanelIfNeeded(CheckResult checkResult, Consumer<UIMessage> confirmConsumer) <I,O> boolean showPanelWithErrorsPrioritized(CheckableEvent<I, O> checkableEvent, O output) Shows the panel with errors prioritized over warnings.<I,O> boolean showPanelWithErrorsPrioritized(CheckableEvent<I, O> checkableEvent, O output, Consumer<UIMessage> confirmConsumer) Shows the panel with errors prioritized over warnings, with a custom confirm consumer.booleanshowPanelWithErrorsPrioritized(CheckResult checkResult) Shows the panel with errors prioritized over warnings.booleanshowPanelWithErrorsPrioritized(CheckResult checkResult, Consumer<UIMessage> confirmConsumer) Shows the panel with errors prioritized over warnings, with a custom confirm consumer.
-
Field Details
-
panelCheckResult
-
-
Constructor Details
-
PanelCheckResultHelper
public PanelCheckResultHelper()
-
-
Method Details
-
makeHelper
-
showPanelIfNeeded
-
showPanelIfNeeded
public <I,O> boolean showPanelIfNeeded(CheckableEvent<I, O> checkableEvent, O output, Consumer<UIMessage> confirmConsumer) -
showPanelIfNeeded
-
showPanelIfNeeded
-
getCheckResultFromPanel
-
getEventInputFromPanel
public <I> I getEventInputFromPanel() -
showPanelWithErrorsPrioritized
Shows the panel with errors prioritized over warnings.This method filters the check result to display only error issues if any errors are present. If no errors exist, all issues (including warnings) are displayed. This ensures that critical errors are always shown first without being obscured by warnings.
- Type Parameters:
I- the type of the event inputO- the type of the event output- Parameters:
checkableEvent- theCheckableEventcontaining the check resultoutput- the event output- Returns:
- true if the panel was shown, false otherwise
-
showPanelWithErrorsPrioritized
public <I,O> boolean showPanelWithErrorsPrioritized(CheckableEvent<I, O> checkableEvent, O output, Consumer<UIMessage> confirmConsumer) Shows the panel with errors prioritized over warnings, with a custom confirm consumer.This method filters the check result to display only error issues if any errors are present. If no errors exist, all issues (including warnings) are displayed. This ensures that critical errors are always shown first without being obscured by warnings.
- Type Parameters:
I- the type of the event inputO- the type of the event output- Parameters:
checkableEvent- theCheckableEventcontaining the check resultoutput- the event outputconfirmConsumer- the consumer to be called when the user confirms (can be null)- Returns:
- true if the panel was shown, false otherwise
-
showPanelWithErrorsPrioritized
Shows the panel with errors prioritized over warnings.This method filters the check result to display only error issues if any errors are present. If no errors exist, all issues (including warnings) are displayed. This ensures that critical errors are always shown first without being obscured by warnings.
- Parameters:
checkResult- theCheckResultto display- Returns:
- true if the panel was shown, false otherwise
-
showPanelWithErrorsPrioritized
public boolean showPanelWithErrorsPrioritized(CheckResult checkResult, Consumer<UIMessage> confirmConsumer) Shows the panel with errors prioritized over warnings, with a custom confirm consumer.This method filters the check result to display only error issues if any errors are present. If no errors exist, all issues (including warnings) are displayed. This ensures that critical errors are always shown first without being obscured by warnings.
- Parameters:
checkResult- theCheckResultto displayconfirmConsumer- the consumer to be called when the user confirms (can be null)- Returns:
- true if the panel was shown, false otherwise
-
filterCheckResultForErrorsPrioritized
Filters the check result to prioritize errors over warnings.If the check result contains error issues, all warning issues are removed. If no errors are present, the check result is returned as-is.
- Parameters:
checkResult- theCheckResultto filter- Returns:
- a new
CheckResultwith only errors if errors exist, otherwise the original check result
-