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.
  • Field Details Link icon

  • Method Details Link icon

    • getPermissionTrees Link icon

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

      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 Link icon

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

      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.
    • actionId Link icon

      public static String actionId(String action)
      Selects an action's ID (class name or path)
      Parameters:
      action - primary action class and method
      Returns:
      the class name
    • actionMethod Link icon

      public static String actionMethod(String action)
      Selects action method name
      Parameters:
      action - primary action class and method
      Returns:
      the method name or ACTION_METHOD_UNSPECIFIED
    • getAction Link icon

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

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

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

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

      public String getDescription()
    • isAllowAll Link icon

      public boolean isAllowAll()
    • isNotLogging Link icon

      public boolean isNotLogging()
    • getParent Link icon

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

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