Package org.jppf.admin.web.utils
Class AbstractUpdatableAction
java.lang.Object
org.jppf.admin.web.utils.AbstractUpdatableAction
- All Implemented Interfaces:
UpdatableAction
- Direct Known Subclasses:
AbstractAdminRoleAction,AbstractManagerRoleAction,SystemInfoAction,ThreadDumpAction
Abstract super class for all link actions. Enabled and authorized by default.
- Author:
- Laurent Cohen
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine wehtehr this action is autothorized.protected booleanisDriverSelected(List<DefaultMutableTreeNode> selected) Determine whether at least one of the selected elements is a node.booleanprotected booleanisJobSelected(List<DefaultMutableTreeNode> selected) Determine whether at least one of the selected elements is a job.protected booleanisNodeSelected(List<DefaultMutableTreeNode> selected) Determine whether at least one of the selected elements is a node.voidsetAuthorized(org.apache.wicket.authroles.authorization.strategies.role.Roles roles) Determine wehtehr this action is autothorized for the specified roles.voidsetEnabled(List<DefaultMutableTreeNode> selected) Compute the enabled stated of this action.
-
Field Details
-
enabled
protected boolean enabled -
authorized
protected boolean authorized
-
-
Constructor Details
-
AbstractUpdatableAction
public AbstractUpdatableAction()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceUpdatableAction- Returns:
- whether this action is enabled.
-
setEnabled
Description copied from interface:UpdatableActionCompute the enabled stated of this action.- Specified by:
setEnabledin interfaceUpdatableAction- Parameters:
selected- a list of the selected elements, in depth-first traversal order of the tree model.
-
isAuthorized
public boolean isAuthorized()Description copied from interface:UpdatableActionDetermine wehtehr this action is autothorized.- Specified by:
isAuthorizedin interfaceUpdatableAction- Returns:
trueif this action is authroized,falseotherwise.
-
setAuthorized
public void setAuthorized(org.apache.wicket.authroles.authorization.strategies.role.Roles roles) Description copied from interface:UpdatableActionDetermine wehtehr this action is autothorized for the specified roles.- Specified by:
setAuthorizedin interfaceUpdatableAction- Parameters:
roles- the roles to check for authorization.
-
isNodeSelected
Determine whether at least one of the selected elements is a node.- Parameters:
selected- the selected elements.- Returns:
trueif at least one node is selected,falseotherwise.
-
isDriverSelected
Determine whether at least one of the selected elements is a node.- Parameters:
selected- the selected elements.- Returns:
trueif at least one node is selected,falseotherwise.
-
isJobSelected
Determine whether at least one of the selected elements is a job.- Parameters:
selected- the selected elements.- Returns:
trueif at least one node is selected,falseotherwise.
-