Package io.jmix.ui.action.list
Class SecuredListAction
java.lang.Object
io.jmix.ui.action.AbstractAction
io.jmix.ui.action.BaseAction
io.jmix.ui.action.ListAction
io.jmix.ui.action.list.SecuredListAction
- All Implemented Interfaces:
Action,Action.HasPrimaryState,Action.HasSecurityConstraint,Action.HasTarget,Action.SecuredAction
- Direct Known Subclasses:
AssignToUsersAction,BulkEditAction,ChangePasswordAction,EditAction,ExcludeAction,ItemOrderableAction,ItemTrackingAction,RelatedAction,RemoveAction,ResetPasswordAction,ShowEntityInfoAction,ShowRoleAssignmentsAction,ShowUserSubstitutionsAction,ViewAction
Action that changes its
enabled property depending on a selected item in a bound ListComponent.-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.action.BaseAction
BaseAction.EnabledRuleNested classes/interfaces inherited from interface io.jmix.ui.action.Action
Action.ActionPerformedEvent, Action.AdjustWhenScreenReadOnly, Action.ExecutableAction, Action.HasPrimaryState, Action.HasSecurityConstraint, Action.HasTarget, Action.MainTabSheetAction, Action.ScreenOpeningAction, Action.SecuredAction, Action.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AccessManagerprotected org.springframework.context.ApplicationContextprotected EntityOpprotected MetadataFields inherited from class io.jmix.ui.action.ListAction
targetFields inherited from class io.jmix.ui.action.AbstractAction
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visibleFields inherited from interface io.jmix.ui.action.Action
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanCallback method which is invoked by the action to determine its enabled state.protected booleanCallback method which is invoked by the action to determine its enabled state.protected voidsetAccessManager(AccessManager accessManager) protected voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetConstraintEntityOp(EntityOp entityOp) protected voidsetMetadata(Metadata metadata) Methods inherited from class io.jmix.ui.action.ListAction
getTarget, setTarget, withCaption, withDescription, withHandler, withIcon, withPrimary, withShortcutMethods inherited from class io.jmix.ui.action.BaseAction
actionPerform, addActionPerformedListener, addEnabledRule, isEnabledByRule, isEnabledByUiPermissions, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setEnabledInternal, setVisible, setVisibleByUiPermissions, setVisibleInternalMethods inherited from class io.jmix.ui.action.AbstractAction
addOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setPrimary, setShortcut, setShortcutCombinationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.action.Action
actionPerform, addOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setShortcut, setShortcutCombination, setVisible
-
Field Details
-
constraintEntityOp
-
accessManager
-
metadata
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
SecuredListAction
-
SecuredListAction
-
-
Method Details
-
setAccessManager
-
setMetadata
-
setApplicationContext
@Autowired protected void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) -
isApplicable
protected boolean isApplicable()Description copied from class:BaseActionCallback method which is invoked by the action to determine its enabled state.- Overrides:
isApplicablein classBaseAction- Returns:
- true if the action is enabled for the current context, e.g. there is a selected row in a table
-
isPermitted
protected boolean isPermitted()Description copied from class:BaseActionCallback method which is invoked by the action to determine its enabled state.- Overrides:
isPermittedin classBaseAction- Returns:
- true if the action is enabled for the current user
-
setConstraintEntityOp
- Specified by:
setConstraintEntityOpin interfaceAction.HasSecurityConstraint
-
getConstraintEntityOp
- Specified by:
getConstraintEntityOpin interfaceAction.HasSecurityConstraint
-