Class AbstractUpdatableAction

java.lang.Object
org.jppf.admin.web.utils.AbstractUpdatableAction
All Implemented Interfaces:
UpdatableAction
Direct Known Subclasses:
AbstractAdminRoleAction, AbstractManagerRoleAction, SystemInfoAction, ThreadDumpAction

public abstract class AbstractUpdatableAction extends Object implements UpdatableAction
Abstract super class for all link actions. Enabled and authorized by default.
Author:
Laurent Cohen
  • Field Details

    • enabled

      protected boolean enabled
    • authorized

      protected boolean authorized
  • Constructor Details

    • AbstractUpdatableAction

      public AbstractUpdatableAction()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface UpdatableAction
      Returns:
      whether this action is enabled.
    • setEnabled

      public void setEnabled(List<DefaultMutableTreeNode> selected)
      Description copied from interface: UpdatableAction
      Compute the enabled stated of this action.
      Specified by:
      setEnabled in interface UpdatableAction
      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: UpdatableAction
      Determine wehtehr this action is autothorized.
      Specified by:
      isAuthorized in interface UpdatableAction
      Returns:
      true if this action is authroized, false otherwise.
    • setAuthorized

      public void setAuthorized(org.apache.wicket.authroles.authorization.strategies.role.Roles roles)
      Description copied from interface: UpdatableAction
      Determine wehtehr this action is autothorized for the specified roles.
      Specified by:
      setAuthorized in interface UpdatableAction
      Parameters:
      roles - the roles to check for authorization.
    • isNodeSelected

      protected boolean isNodeSelected(List<DefaultMutableTreeNode> selected)
      Determine whether at least one of the selected elements is a node.
      Parameters:
      selected - the selected elements.
      Returns:
      true if at least one node is selected, false otherwise.
    • isDriverSelected

      protected boolean isDriverSelected(List<DefaultMutableTreeNode> selected)
      Determine whether at least one of the selected elements is a node.
      Parameters:
      selected - the selected elements.
      Returns:
      true if at least one node is selected, false otherwise.
    • isJobSelected

      protected boolean isJobSelected(List<DefaultMutableTreeNode> selected)
      Determine whether at least one of the selected elements is a job.
      Parameters:
      selected - the selected elements.
      Returns:
      true if at least one node is selected, false otherwise.