Class RemoveAction<E>

All Implemented Interfaces:
AdjustWhenViewReadOnly, ExecutableAction, SecuredAction, SecurityConstraintAction, TargetAction<ListDataComponent<E>>, Action, HasShortcutCombination

@ActionType("list_remove") public class RemoveAction<E> extends SecuredListDataComponentAction<RemoveAction<E>,E> implements AdjustWhenViewReadOnly
  • Field Details

  • Constructor Details

    • RemoveAction

      public RemoveAction()
    • RemoveAction

      public RemoveAction(String id)
  • Method Details

    • initAction

      protected void initAction()
      Overrides:
      initAction in class ListDataComponentAction<RemoveAction<E>,E>
    • setMessages

      @Autowired protected void setMessages(Messages messages)
    • setRemoveOperation

      @Autowired public void setRemoveOperation(RemoveOperation removeOperation)
    • setUiComponentProperties

      @Autowired protected void setUiComponentProperties(UiComponentProperties uiComponentProperties)
    • isConfirmation

      public boolean isConfirmation()
      Returns:
      whether to ask confirmation from the user
    • setConfirmation

      public void setConfirmation(boolean confirmation)
      Sets whether to ask confirmation from the user.
    • getConfirmationText

      @Nullable public String getConfirmationText()
      Returns confirmation dialog text if it was set by setConfirmationText(String) or in the view XML. Otherwise, returns null.
    • setConfirmationText

      public void setConfirmationText(@Nullable String confirmationText)
      Sets confirmation dialog text.
    • getConfirmationHeader

      @Nullable public String getConfirmationHeader()
      Returns confirmation dialog header if it was set by setConfirmationHeader(String) or in the view XML. Otherwise, returns null.
    • setConfirmationHeader

      public void setConfirmationHeader(@Nullable String confirmationHeader)
      Sets confirmation dialog header.
    • setAfterActionPerformedHandler

      public void setAfterActionPerformedHandler(@Nullable Consumer<RemoveOperation.AfterActionPerformedEvent<E>> afterActionPerformedHandler)
      Sets the handler to be invoked after removing entities.
    • setActionCancelledHandler

      public void setActionCancelledHandler(@Nullable Consumer<RemoveOperation.ActionCancelledEvent<E>> actionCancelledHandler)
      Sets the handler to be invoked if the action was cancelled by the user.
    • setDelegate

      public void setDelegate(@Nullable Consumer<Collection<E>> delegate)
      Sets the delegate to be invoked instead of DataManager to remove the entities from a storage.
    • isPermitted

      protected boolean isPermitted()
      Overrides:
      isPermitted in class SecuredListDataComponentAction<RemoveAction<E>,E>
    • checkRemovePermission

      protected boolean checkRemovePermission()
    • execute

      public void execute()
      Executes the action.
      Specified by:
      execute in interface ExecutableAction
    • withConfirmation

      public RemoveAction<E> withConfirmation(boolean confirmation)
    • withConfirmationText

      public RemoveAction<E> withConfirmationText(@Nullable String confirmationText)
    • withConfirmationHeader

      public RemoveAction<E> withConfirmationHeader(@Nullable String confirmationHeader)
    • withAfterActionPerformedHandler

      public RemoveAction<E> withAfterActionPerformedHandler(@Nullable Consumer<RemoveOperation.AfterActionPerformedEvent<E>> afterActionPerformedHandler)
    • withAfterActionCancelledHandler

      public RemoveAction<E> withAfterActionCancelledHandler(@Nullable Consumer<RemoveOperation.ActionCancelledEvent<E>> actionCancelledHandler)