Class SubstituteUserAction

java.lang.Object
io.jmix.ui.action.AbstractAction
io.jmix.ui.action.BaseAction
io.jmix.ui.component.mainwindow.impl.SubstituteUserAction
All Implemented Interfaces:
Action, Action.HasPrimaryState, Action.SecuredAction

public class SubstituteUserAction extends BaseAction
Makes UI-specific preparations to user substitution and performs it using UserSubstitutionManager Checks if there are screens that have unsaved changes and shows dialog window with options:
  1. Discard changes (and close all windows, cleanups background tasks, then performs substitution and recreates main window)
  2. Cancel (invokes all cancelActions)
  • Field Details

    • ID

      public static final String ID
      See Also:
    • cancelActions

      protected List<Consumer<org.springframework.security.core.userdetails.UserDetails>> cancelActions
    • newSubstitutedUser

      protected org.springframework.security.core.userdetails.UserDetails newSubstitutedUser
    • prevSubstitutedUser

      protected org.springframework.security.core.userdetails.UserDetails prevSubstitutedUser
    • messages

      protected Messages messages
    • icons

      protected Icons icons
    • substitutionManager

      protected UserSubstitutionManager substitutionManager
  • Constructor Details

    • SubstituteUserAction

      public SubstituteUserAction(org.springframework.security.core.userdetails.UserDetails newSubstitutedUser, org.springframework.security.core.userdetails.UserDetails oldSubstitutedUser, Messages messages, Icons icons, UserSubstitutionManager substitutionManager)
  • Method Details

    • actionPerform

      public void actionPerform(Component component)
      Description copied from interface: Action
      Invoked by owning component to execute the action.
      Specified by:
      actionPerform in interface Action
      Overrides:
      actionPerform in class BaseAction
      Parameters:
      component - invoking component
    • doSubstituteUser

      protected void doSubstituteUser(AppUI currentUI)
    • cancel

      protected void cancel()
    • withCancelAction

      public SubstituteUserAction withCancelAction(Consumer<org.springframework.security.core.userdetails.UserDetails> cancelStep)