Package io.jmix.flowui.action
Class SecuredBaseAction<A extends SecuredBaseAction<A>>
java.lang.Object
io.jmix.flowui.kit.action.AbstractAction
io.jmix.flowui.kit.action.BaseAction<A>
io.jmix.flowui.action.ObservableBaseAction<A>
io.jmix.flowui.action.SecuredBaseAction<A>
- All Implemented Interfaces:
Action,HasShortcutCombination
- Direct Known Subclasses:
DialogAction,DynamicLocalizedMessageEditAction,FragmentAction,GenericFilterAction,ListDataComponentAction,PickerAction,UserMenuAction,ViewAction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallback interface which is invoked by the action to determine its enabled state. -
Field Summary
FieldsFields inherited from class io.jmix.flowui.action.ObservableBaseAction
uiObservationSupportFields inherited from class io.jmix.flowui.kit.action.BaseAction
enabledExplicitly, visibleExplicitlyFields inherited from class io.jmix.flowui.kit.action.AbstractAction
description, enabled, eventBus, icon, id, shortcutCombination, text, variant, visibleFields inherited from interface io.jmix.flowui.kit.action.Action
PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT_COMBINATION, PROP_TEXT, PROP_VARIANT, PROP_VISIBLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEnabledRule(SecuredBaseAction.EnabledRule enabledRule) Add new enabled rule for the action.protected booleanprotected booleanvoidRefreshes internal state of the action to initialize enabled, visible, text, icon, etc.voidremoveEnabledRule(SecuredBaseAction.EnabledRule enabledRule) Remove enabled rule.Methods inherited from class io.jmix.flowui.action.ObservableBaseAction
actionPerform, getUiObservationSupportMethods inherited from class io.jmix.flowui.kit.action.BaseAction
addActionPerformedListener, isApplicable, self, setEnabled, setEnabledInternal, setVisible, setVisibleInternal, withDescription, withEnabled, withHandler, withIcon, withShortcutCombination, withText, withVariant, withVisibleMethods inherited from class io.jmix.flowui.kit.action.AbstractAction
addPropertyChangeListener, firePropertyChange, getDescription, getEventBus, getIcon, getIconComponent, getId, getShortcutCombination, getText, getVariant, hasListener, isEnabled, isVisible, setDescription, setIcon, setIconComponent, setShortcutCombination, setText, setVariant
-
Field Details
-
enabledRules
-
-
Constructor Details
-
SecuredBaseAction
-
-
Method Details
-
refreshState
public void refreshState()Description copied from interface:ActionRefreshes internal state of the action to initialize enabled, visible, text, icon, etc. properties depending on programmatically set values and user permissions set at runtime.For example, this method is called by visual components holding actions when they are bound to data. At this moment the action can find out what entity it is connected to and change its state according to the user permissions.
- Specified by:
refreshStatein interfaceAction- Overrides:
refreshStatein classBaseAction<A extends SecuredBaseAction<A>>
-
isPermitted
protected boolean isPermitted() -
isEnabledByRule
protected boolean isEnabledByRule() -
addEnabledRule
Add new enabled rule for the action.- Parameters:
enabledRule- boolean rule for the action enabled state
-
removeEnabledRule
Remove enabled rule.- Parameters:
enabledRule- boolean rule for the action enabled state
-