com.tibbo.aggregate.common.security

## Class Permissions

- java.lang.Object
- - com.tibbo.aggregate.common.security.Permissions

- All Implemented Interfaces:
    java.lang.Iterable<Permission>

      public class Permissions
      extends java.lang.Object
      implements java.lang.Iterable<Permission>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static char` | `PERMISSIONS_SEPARATOR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Permissions()`
    `Permissions(java.util.List<Permission> permissions, boolean isWritePermissions)`
    `Permissions(java.lang.String data)`
    `Permissions(java.lang.String data, boolean isWritePermissions)`
    `Permissions(java.lang.String data, PermissionChecker checker)`
    `Permissions(java.lang.String context, java.lang.String type)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Permissions` | `add(Permission permission)` Note: Permissions class is not thread-safe.
    `Permissions` | `addAll(Permissions permissions)`
    `java.lang.String` | `encode()`
    `boolean` | `equals(java.lang.Object obj)`
    `Permission` | `get(int index)`
    `java.util.List<Permission>` | `getPermissions()`
    `java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>>` | `getRoleBasedProhibitions()`
    `java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>>` | `getRoleBasedRWXPermissions()`
    `java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>>` | `getRoleBasedRXPermissions()`
    `int` | `hashCode()`
    `boolean` | `isUseRoleBasedPermissions()`
    `boolean` | `isWritePermissions()`
    `java.util.Iterator<Permission>` | `iterator()`
    `void` | `setRoleBasedProhibitions(java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>> roleBasedProhibitions)`
    `void` | `setRoleBasedRWXPermissions(java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>> roleBasedPermissions)`
    `void` | `setRoleBasedRXPermissions(java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>> roleBasedPermissions)`
    `void` | `setUseRoleBasedPermissions(boolean useRoleBasedPermissions)`
    `void` | `setWritePermissions(boolean isWritePermissions)`
    `int` | `size()`
    `java.lang.String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Field Detail

    - #### PERMISSIONS_SEPARATOR

          public static final char PERMISSIONS_SEPARATOR

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Permissions

          public Permissions()

    - #### Permissions

          public Permissions(java.lang.String data,
                             PermissionChecker checker)

    - #### Permissions

          public Permissions(java.lang.String context,
                             java.lang.String type)

    - #### Permissions

          public Permissions(java.util.List<Permission> permissions,
                             boolean isWritePermissions)

    - #### Permissions

          public Permissions(java.lang.String data,
                             boolean isWritePermissions)

    - #### Permissions

          public Permissions(java.lang.String data)

  - ### Method Detail

    - #### encode

          public java.lang.String encode()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### size

          public int size()

    - #### get

          public Permission get(int index)

    - #### add

          public Permissions add(Permission permission)

      Note: Permissions class is not thread-safe. Don't add new Permission objects to Permissions after initialization is finished.

    - #### addAll

          public Permissions addAll(Permissions permissions)

    - #### isWritePermissions

          public boolean isWritePermissions()

    - #### setWritePermissions

          public void setWritePermissions(boolean isWritePermissions)

    - #### getRoleBasedRXPermissions

          public java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>> getRoleBasedRXPermissions()

    - #### getRoleBasedRWXPermissions

          public java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>> getRoleBasedRWXPermissions()

    - #### getPermissions

          public java.util.List<Permission> getPermissions()

    - #### setRoleBasedRXPermissions

          public void setRoleBasedRXPermissions(java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>> roleBasedPermissions)

    - #### setRoleBasedRWXPermissions

          public void setRoleBasedRWXPermissions(java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>> roleBasedPermissions)

    - #### getRoleBasedProhibitions

          public java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>> getRoleBasedProhibitions()

    - #### setRoleBasedProhibitions

          public void setRoleBasedProhibitions(java.util.Map<java.lang.String,java.util.LinkedList<RoleRule>> roleBasedProhibitions)

    - #### isUseRoleBasedPermissions

          public boolean isUseRoleBasedPermissions()

    - #### setUseRoleBasedPermissions

          public void setUseRoleBasedPermissions(boolean useRoleBasedPermissions)

    - #### iterator

          public java.util.Iterator<Permission> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<Permission>`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`