Class PermissionNode

java.lang.Object
ru.bgcrm.model.user.PermissionNode

public class PermissionNode extends Object
Permissions tree node, allowing one or more actions. Each action is a semicolon separated string with action class and method names. For example ru.bgcrm.struts.action.admin.AppAction:status. A node can contains many actions in case of name deprecations, or when all of them have to be handled together. All the node actions are allowed when the node is allowed.
  • Method Details

    • getParent

      public PermissionNode getParent()
      Returns:
      parent node;
    • getChildren

      public List<PermissionNode> getChildren()
      Returns:
      children nodes.
    • getTitle

      public String getTitle()
      Returns:
      node title.
    • getTitlePath

      public String getTitlePath()
      Returns:
      slash separated titles path to the node.
    • getAction

      public String getAction()
      Returns:
      the primary node action, semicolon separated action class and method names.
    • getActions

      public List<String> getActions()
      Returns:
      list of primary and synonym actions (semicolon separated action class and method names).
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • isAllowAll

      public boolean isAllowAll()
    • isNotLogging

      public boolean isNotLogging()
    • getPermissionTrees

      public static List<PermissionNode> getPermissionTrees()
      List with root permission nodes for kernel and other enabled plugins.
      Returns:
    • primaryActions

      public static Map<String,ConfigMap> primaryActions(Map<String,ConfigMap> permMap)
      Gets map with primary actions as keys.
      Parameters:
      permMap - map with any action as key.
      Returns:
    • getPermissionNode

      public static PermissionNode getPermissionNode(String action)
      Finds permission node by action.
      Parameters:
      action - semicolon separated class and method names.
      Returns:
    • getPermissionNodeOrThrow

      public static PermissionNode getPermissionNodeOrThrow(String action) throws javassist.NotFoundException
      Finds permission node by action.
      Parameters:
      action - semicolon separated class and method names.
      Returns:
      not null node value.
      Throws:
      javassist.NotFoundException - not found node.