Class StatusInfoTableUtil

java.lang.Object
com.evolveum.midpoint.gui.impl.util.StatusInfoTableUtil

public class StatusInfoTableUtil extends Object
Utility methods for handling StatusInfo in tables.
  • Method Details

    • setVisibilityBySuggestion

      public static <C extends Containerable, T> void setVisibilityBySuggestion(@NotNull @NotNull InlineMenuItem item, boolean showWhenPresent, @NotNull @NotNull SerializableFunction<PrismContainerValueWrapper<C>,@Nullable com.evolveum.midpoint.smart.api.info.StatusInfo<T>> getStatusInfoFn)
      Sets a visibility checker for an inline menu item based on whether a mapping suggestion is present and optionally on its status.
    • bySuggestion

      @Contract(pure=true) public static <C extends Containerable, T> @NotNull InlineMenuItem.VisibilityChecker bySuggestion(boolean showWhenPresent, @NotNull @NotNull SerializableFunction<PrismContainerValueWrapper<C>,@Nullable com.evolveum.midpoint.smart.api.info.StatusInfo<T>> getStatusInfoFn)
      Returns a InlineMenuItem.VisibilityChecker that controls visibility based on mapping suggestion presence and its status.
    • applySuggestionCss

      public static <C extends Containerable, T> void applySuggestionCss(@NotNull @NotNull org.apache.wicket.Component tile, @NotNull @NotNull PrismContainerValueWrapper<C> value, @NotNull @NotNull String baseCss, @NotNull @NotNull SerializableFunction<PrismContainerValueWrapper<C>,@Nullable com.evolveum.midpoint.smart.api.info.StatusInfo<T>> getStatusInfoFn)
      Applies a suggestion-based CSS style to a tile component.
    • createSuggestionDetailsInlineMenu

      @NotNull public static <C extends Containerable, T> @NotNull ButtonInlineMenuItem createSuggestionDetailsInlineMenu(@NotNull @NotNull PageBase pageBase, @NotNull @NotNull SerializableFunction<PrismContainerValueWrapper<C>,@Nullable com.evolveum.midpoint.smart.api.info.StatusInfo<T>> getStatusInfoFn)
      Creates an inline menu item that shows details about mapping suggestions when clicked. The item is only visible when there is a fatal error in the suggestion status.
    • createSuggestionStopGeneratingInlineMenu

      @NotNull public static <C extends Containerable, T> @NotNull ButtonInlineMenuItem createSuggestionStopGeneratingInlineMenu(@NotNull @NotNull PageBase pageBase, @NotNull @NotNull SerializableFunction<PrismContainerValueWrapper<C>,@Nullable com.evolveum.midpoint.smart.api.info.StatusInfo<T>> getStatusInfoFn, @NotNull @NotNull SerializableConsumer<org.apache.wicket.ajax.AjaxRequestTarget> refreshFn)
      Creates an inline menu item that allows suspending or resuming the generation of mapping suggestions. The item is only visible when the suggestion generation is in progress or suspended.
    • createSuggestionReviewInlineMenu

      @NotNull public static <C extends Containerable, T> @NotNull ButtonInlineMenuItem createSuggestionReviewInlineMenu(@NotNull @NotNull PageBase pageBase, @NotNull @NotNull SerializableFunction<PrismContainerValueWrapper<C>,com.evolveum.midpoint.smart.api.info.StatusInfo<T>> getStatusInfo, @NotNull @NotNull StatusInfoTableUtil.SerializableTriConsumer<org.apache.wicket.ajax.AjaxRequestTarget,PrismContainerValueWrapper<C>,com.evolveum.midpoint.smart.api.info.StatusInfo<T>> performOnReview)
      Creates an inline menu item that allows reviewing mapping suggestions when clicked. The item is only visible when there is a successful suggestion available.
    • applySuggestionAutoRefresh

      public static <C extends Containerable, T> void applySuggestionAutoRefresh(@NotNull @NotNull PrismContainerValueWrapper<C> value, @NotNull @NotNull org.apache.wicket.markup.repeater.Item<PrismContainerValueWrapper<C>> item, @NotNull @NotNull Duration ajaxUpdateDuration, @NotNull @NotNull SerializableFunction<PrismContainerValueWrapper<C>,@Nullable com.evolveum.midpoint.smart.api.info.StatusInfo<T>> getStatusInfo, @NotNull @NotNull SerializableConsumer<org.apache.wicket.ajax.AjaxRequestTarget> refreshFn)
      Adds AJAX timer behavior and CSS class based on suggestion execution status.
    • buildSuggestionNameLabel

      @NotNull public static @NotNull LabelWithBadgePanel buildSuggestionNameLabel(@NotNull @NotNull String componentId, @NotNull @NotNull com.evolveum.midpoint.smart.api.info.StatusInfo<?> suggestionTypeStatusInfo, @NotNull @NotNull org.apache.wicket.model.IModel<String> displayNameModel, @NotNull @NotNull org.apache.wicket.model.IModel<String> suggestionBadgeModel, @NotNull @NotNull OperationResultStatusType status)
      Builds a label with badge panel for displaying suggestion names and statuses.
    • createToggleSuggestionVisibilityButton

      @NotNull public static @NotNull ToggleCheckBoxPanel createToggleSuggestionVisibilityButton(@NotNull @NotNull PageBase pageBase, @NotNull @NotNull String idButton, @NotNull @NotNull org.apache.wicket.model.IModel<Boolean> switchSuggestionModel, @NotNull @NotNull SerializableConsumer<org.apache.wicket.ajax.AjaxRequestTarget> refreshFn, @Nullable @Nullable org.apache.wicket.Component componentToUpdate)
      Creates a toggle checkbox panel for showing/hiding suggestions.
    • createLinkStyleActionsColumn

      @Nullable public static <O extends Serializable> @Nullable org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn<O,String> createLinkStyleActionsColumn(@NotNull @NotNull PageBase pageBase, @NotNull @NotNull List<InlineMenuItem> allItems)
      Creates an actions column with inline menu buttons with link style and ellipsis action button.
    • createConfirmationTitle

      public static org.apache.wicket.model.StringResourceModel createConfirmationTitle(PageBase pageBase, int selectedCount, boolean empty, boolean isAccept)