de.esprit.netsuite.server.permission

## Interface PermissionConfig

- All Superinterfaces:
    Clearable, Dumpable, java.io.Serializable
  All Known Implementing Classes:
    AbstractPermissionConfig, DefaultPermissionConfig, FilePermissionConfig

      public interface PermissionConfig
      extends Clearable, Dumpable, java.io.Serializable

  This interface defines what makes up the user and group access permission system.
  Author:
    Rainer Buesch

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkUserPermission(UserId userId, PermissionControlled accessedObj, EspritPermission permission)` Same as `hasUserPermission(UserId, PermissionControlled, EspritPermission)` but throws an exception if the permission was not granted.
    `boolean` | `hasGroupPermission(Group group, PermissionControlled accessedObj, EspritPermission permission)` Tells whether the given group has the given permission on the given object.
    `boolean` | `hasGroupPermission(Group group, PermissionDefinition obj, EspritPermission permission)` Tells whether the given group has the given permission on the given object.
    `boolean` | `hasUserPermission(UserId userId, PermissionControlled accessedObj, EspritPermission permission)` Tells whether the given user has the given permission on the given object.
    `boolean` | `hasUserPermission(UserId userId, PermissionDefinition permDef, EspritPermission permission)` Tells whether the given user has the given permission on the given object.
    `void` | `setGroupMemberResolver(GroupMembershipResolver resolver)` Sets a `GroupMembershipResolver` which resolves the groups for a given user.
    `boolean` | `setGroupPermissions(Group group, PermissionDefinition control, EspritPermission... permission)` Adds a new permission, whereas a `PermissionEntry` is created from the given arguments.
    `boolean` | `setUserPermissions(UserId userId, PermissionDefinition control, EspritPermission... permissions)` Adds a new permission, whereas a `PermissionEntry` is created from the given arguments.

    - ### Methods inherited from interface de.esprit.common.type.Clearable

      `clear`

    - ### Methods inherited from interface de.esprit.common.type.Dumpable

      `toDumpString, toDumpString, toString, toString`

- - ### Method Detail

    - #### setUserPermissions

          boolean setUserPermissions(UserId userId,
                                   PermissionDefinition control,
                                   EspritPermission... permissions)

      Adds a new permission, whereas a `PermissionEntry` is created from the given arguments.

    - #### hasUserPermission

          boolean hasUserPermission(UserId userId,
                                  PermissionControlled accessedObj,
                                  EspritPermission permission)

      Tells whether the given user has the given permission on the given object.
      See Also:
        `checkUserPermission(UserId, PermissionControlled, EspritPermission)`

    - #### hasUserPermission

          boolean hasUserPermission(UserId userId,
                                  PermissionDefinition permDef,
                                  EspritPermission permission)

      Tells whether the given user has the given permission on the given object. Note that this method allows for a client side check of a permission.

    - #### checkUserPermission

          void checkUserPermission(UserId userId,
                                 PermissionControlled accessedObj,
                                 EspritPermission permission)
                                   throws PermissionException

      Same as `hasUserPermission(UserId, PermissionControlled, EspritPermission)` but throws an exception if the permission was not granted.
      Throws:
        `PermissionException`

    - #### setGroupPermissions

          boolean setGroupPermissions(Group group,
                                    PermissionDefinition control,
                                    EspritPermission... permission)

      Adds a new permission, whereas a `PermissionEntry` is created from the given arguments.

    - #### hasGroupPermission

          boolean hasGroupPermission(Group group,
                                   PermissionControlled accessedObj,
                                   EspritPermission permission)
                                     throws PermissionException

      Tells whether the given group has the given permission on the given object.
      Throws:
        `PermissionException`

    - #### hasGroupPermission

          boolean hasGroupPermission(Group group,
                                   PermissionDefinition obj,
                                   EspritPermission permission)

      Tells whether the given group has the given permission on the given object. Note that this method allows for a client side check of a permission.

    - #### setGroupMemberResolver

          void setGroupMemberResolver(GroupMembershipResolver resolver)

      Sets a `GroupMembershipResolver` which resolves the groups for a given user.

Copyright © 2014 EsprIT-Systems. All Rights Reserved.