com.tibbo.aggregate.common.security

## Class NullPermissionChecker

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

- All Implemented Interfaces:
    PermissionChecker

      public class NullPermissionChecker
      extends java.lang.Object
      implements PermissionChecker

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NullPermissionChecker()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `canActivate(Permissions has, Permissions need, ContextManager cm)` Checks whether the calling party (those permissions are identified by `has`) can set permissions of some other party to `need`.
    `boolean` | `canSee(Permissions perms, java.lang.String context, ContextManager cm)` Returns true if the calling party (those permissions are identified by `perms`) can see `context` among children of its parent context because it has non-null permissions for one or more direct/nested children of `context`.
    `java.lang.String` | `getLevel(Permissions permissions, java.lang.String accessedContext, java.lang.Integer accessedEntityType, java.lang.String accessedEntity, java.lang.String accessedEntityGroup, ContextManager cm)` Returns the effective permission level of the calling party (those permissions are identified by `permissions`) for the entity.
    `java.util.Map` | `getPermissionLevels()` Returns a map of all permission levels supported by the checker.
    `java.util.Map<java.lang.String,java.lang.String>` | `getRolePermissionLevels(int entityType)` Returns a map of all supported permission levels for the specified entity type.
    `boolean` | `has(CallerController caller, Permissions requiredPermissions, Context accessedContext, EntityDefinition accessedEntityDefinition)` Returns true if `caller` is allowed to access an entity those permissions are `requiredPermissions`.
    `boolean` | `isValid(java.lang.String permType)` Returns true if permission level `permissionLevel` is supported by the checker.

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

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

- - ### Constructor Detail

    - #### NullPermissionChecker

          public NullPermissionChecker()

  - ### Method Detail

    - #### getPermissionLevels

          public java.util.Map getPermissionLevels()

      Description copied from interface: `PermissionChecker`
      Returns a map of all permission levels supported by the checker. Each level is defined by a name string and description string.
      Specified by:
        `getPermissionLevels` in interface `PermissionChecker`

    - #### getRolePermissionLevels

          public java.util.Map<java.lang.String,java.lang.String> getRolePermissionLevels(int entityType)

      Description copied from interface: `PermissionChecker`
      Returns a map of all supported permission levels for the specified entity type. Each level is defined by a name and a description.
      Specified by:
        `getRolePermissionLevels` in interface `PermissionChecker`

    - #### has

          public boolean has(CallerController caller,
                             Permissions requiredPermissions,
                             Context accessedContext,
                             EntityDefinition accessedEntityDefinition)

      Description copied from interface: `PermissionChecker`
      Returns true if `caller` is allowed to access an entity those permissions are `requiredPermissions`.
      Specified by:
        `has` in interface `PermissionChecker`

    - #### canSee

          public boolean canSee(Permissions perms,
                                java.lang.String context,
                                ContextManager cm)

      Description copied from interface: `PermissionChecker`
      Returns true if the calling party (those permissions are identified by `perms`) can see `context` among children of its parent context because it has non-null permissions for one or more direct/nested children of `context`.
      Specified by:
        `canSee` in interface `PermissionChecker`

    - #### getLevel

          public java.lang.String getLevel(Permissions permissions,
                                           java.lang.String accessedContext,
                                           java.lang.Integer accessedEntityType,
                                           java.lang.String accessedEntity,
                                           java.lang.String accessedEntityGroup,
                                           ContextManager cm)

      Description copied from interface: `PermissionChecker`
      Returns the effective permission level of the calling party (those permissions are identified by `permissions`) for the entity.
      Specified by:
        `getLevel` in interface `PermissionChecker`

    - #### isValid

          public boolean isValid(java.lang.String permType)

      Description copied from interface: `PermissionChecker`
      Returns true if permission level `permissionLevel` is supported by the checker.
      Specified by:
        `isValid` in interface `PermissionChecker`

    - #### canActivate

          public java.lang.String canActivate(Permissions has,
                                              Permissions need,
                                              ContextManager cm)

      Description copied from interface: `PermissionChecker`
      Checks whether the calling party (those permissions are identified by `has`) can set permissions of some other party to `need`.
      Specified by:
        `canActivate` in interface `PermissionChecker`