Package io.jmix.flowui.action
Class SecuredBaseAction
java.lang.Object
io.jmix.flowui.kit.action.AbstractAction
io.jmix.flowui.kit.action.BaseAction
io.jmix.flowui.action.SecuredBaseAction
- All Implemented Interfaces:
SecuredAction
,Action
,HasShortcutCombination
- Direct Known Subclasses:
DialogAction
,ListDataComponentAction
,PickerAction
,ViewAction
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Callback interface which is invoked by the action to determine its enabled state. -
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected List<SecuredBaseAction.EnabledRule>
protected boolean
Fields inherited from class io.jmix.flowui.kit.action.BaseAction
enabledExplicitly, visibleExplicitly
Fields inherited from class io.jmix.flowui.kit.action.AbstractAction
description, enabled, eventBus, icon, id, shortcutCombination, text, variant, visible
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEnabledRule
(SecuredBaseAction.EnabledRule enabledRule) Add new enabled rule for the action.protected boolean
boolean
protected boolean
boolean
void
void
removeEnabledRule
(SecuredBaseAction.EnabledRule enabledRule) Remove enabled rule.void
setEnabledByUiPermissions
(boolean enabledByUiPermissions) void
setVisibleByUiPermissions
(boolean visibleByUiPermissions) withEnabled
(boolean enabled) withEnabledByUiPermissions
(boolean enabledByUiPermissions) withHandler
(Consumer<ActionPerformedEvent> handler) withIcon
(com.vaadin.flow.component.icon.Icon icon) withIcon
(com.vaadin.flow.component.icon.VaadinIcon icon) withShortcutCombination
(KeyCombination shortcutCombination) withVariant
(ActionVariant actionVariant) withVisible
(boolean visible) withVisibleByUiPermissions
(boolean visibleByUiPermissions) Methods inherited from class io.jmix.flowui.kit.action.BaseAction
actionPerform, addActionPerformedListener, isApplicable, setEnabled, setEnabledInternal, setVisible, setVisibleInternal
Methods inherited from class io.jmix.flowui.kit.action.AbstractAction
addPropertyChangeListener, firePropertyChange, getDescription, getEventBus, getIcon, getId, getShortcutCombination, getText, getVariant, hasListener, isEnabled, isVisible, setDescription, setIcon, setShortcutCombination, setText, setVariant
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.flowui.kit.action.Action
actionPerform, addPropertyChangeListener, getDescription, getIcon, getId, getText, getVariant, isEnabled, isVisible, setDescription, setEnabled, setIcon, setText, setVariant, setVisible
Methods inherited from interface io.jmix.flowui.kit.component.HasShortcutCombination
getShortcutCombination, setShortcutCombination
-
Field Details
-
enabledByUiPermissions
protected boolean enabledByUiPermissions -
visibleByUiPermissions
protected boolean visibleByUiPermissions -
enabledRules
-
-
Constructor Details
-
SecuredBaseAction
-
-
Method Details
-
refreshState
public void refreshState()- Specified by:
refreshState
in interfaceAction
- Overrides:
refreshState
in classBaseAction
-
isEnabledByUiPermissions
public boolean isEnabledByUiPermissions()- Specified by:
isEnabledByUiPermissions
in interfaceSecuredAction
-
setEnabledByUiPermissions
public void setEnabledByUiPermissions(boolean enabledByUiPermissions) - Specified by:
setEnabledByUiPermissions
in interfaceSecuredAction
-
isVisibleByUiPermissions
public boolean isVisibleByUiPermissions()- Specified by:
isVisibleByUiPermissions
in interfaceSecuredAction
-
setVisibleByUiPermissions
public void setVisibleByUiPermissions(boolean visibleByUiPermissions) - Specified by:
setVisibleByUiPermissions
in interfaceSecuredAction
-
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
-
withText
- Overrides:
withText
in classBaseAction
-
withEnabled
- Overrides:
withEnabled
in classBaseAction
-
withVisible
- Overrides:
withVisible
in classBaseAction
-
withIcon
- Overrides:
withIcon
in classBaseAction
-
withIcon
- Overrides:
withIcon
in classBaseAction
-
withTitle
- Overrides:
withTitle
in classBaseAction
-
withVariant
- Overrides:
withVariant
in classBaseAction
-
withShortcutCombination
- Overrides:
withShortcutCombination
in classBaseAction
-
withHandler
- Overrides:
withHandler
in classBaseAction
-
withEnabledByUiPermissions
-
withVisibleByUiPermissions
-