Package ru.bgcrm.model.user

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ACTION_METHOD_UNSPECIFIED`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `actionId(String action)`
  Selects an action's ID (class name or path)
  `static String`
  `actionMethod(String action)`
  Selects action method name
  `String`
  `getAction()`
  `List<String>`
  `getActions()`
  `List<PermissionNode>`
  `getChildren()`
  `String`
  `getDescription()`
  `PermissionNode`
  `getParent()`
  `static PermissionNode`
  `getPermissionNode(String action)`
  Finds permission node by action.
  `static PermissionNode`
  `getPermissionNodeOrThrow(String action)`
  Finds permission node by action.
  `static List<PermissionNode>`
  `getPermissionTrees()`
  List with root permission nodes for kernel and other enabled plugins.
  `String`
  `getTitle()`
  `String`
  `getTitlePath()`
  `boolean`
  `isAllowAll()`
  `boolean`
  `isNotLogging()`
  `static Map<String,ConfigMap>`
  `primaryActions(Map<String,ConfigMap> permMap)`
  Gets map with primary actions as keys.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### ACTION_METHOD_UNSPECIFIED

    public static final String ACTION_METHOD_UNSPECIFIED
    See Also:
      - Constant Field Values

- ## Method Details

  - ### 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.

  - ### actionId

    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

    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

    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).

  - ### getTitle

    public String getTitle()
    Returns:
      node title.

  - ### getTitlePath

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

  - ### getDescription

    public String getDescription()

  - ### isAllowAll

    public boolean isAllowAll()

  - ### isNotLogging

    public boolean isNotLogging()

  - ### getParent

    public PermissionNode getParent()
    Returns:
      parent node;

  - ### getChildren

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