de.esprit.netsuite.server.perm

## Interface PermissionConfig

- All Superinterfaces:
    Clearable
  All Known Implementing Classes:
    ServerPermissionConfig

      public interface PermissionConfig
      extends Clearable

  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
    --- | ---
    `boolean` | `addGroupPermission(Group group, PermissionDefinition control, UserPermission action)` Adds a new permission, whereas a `PermissionEntry` is created from the given arguments.
    `boolean` | `addUserPermission(UserId userId, PermissionDefinition control, UserPermission action)` Adds a new permission, whereas a `PermissionEntry` is created from the given arguments.
    `void` | `checkGroupPermission(Group group, PermissionControlled accessedObj, UserPermission action)` Same as `hasGroupPermission(Group, PermissionControlled, UserPermission)` but throws an exception if the permission was not granted.
    `void` | `checkUserPermission(UserId userId, PermissionControlled accessedObj, UserPermission action)` Same as `hasUserPermission(UserId, PermissionControlled, UserPermission)` but throws an exception if the permission was not granted.
    `boolean` | `hasGroupPermission(Group group, PermissionControlled accessedObj, UserPermission action)` Tells whether the given group may perform the given action on the given object.
    `boolean` | `hasUserPermission(UserId userId, PermissionControlled accessedObj, UserPermission action)` Tells whether the given user may perform the given action on the given object.

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

      `clear`

- - ### Method Detail

    - #### addUserPermission

          boolean addUserPermission(UserId userId,
                                  PermissionDefinition control,
                                  UserPermission action)

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

    - #### hasUserPermission

          boolean hasUserPermission(UserId userId,
                                  PermissionControlled accessedObj,
                                  UserPermission action)

      Tells whether the given user may perform the given action on the given object.
      See Also:
        `checkUserPermission(UserId, PermissionControlled, UserPermission)`

    - #### checkUserPermission

          void checkUserPermission(UserId userId,
                                 PermissionControlled accessedObj,
                                 UserPermission action)
                                   throws PermissionException

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

    - #### addGroupPermission

          boolean addGroupPermission(Group group,
                                   PermissionDefinition control,
                                   UserPermission action)

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

    - #### hasGroupPermission

          boolean hasGroupPermission(Group group,
                                   PermissionControlled accessedObj,
                                   UserPermission action)
                                     throws PermissionException

      Tells whether the given group may perform the given action on the given object.
      Throws:
        `PermissionException`
      See Also:
        `checkGroupPermission(Group, PermissionControlled, UserPermission)`

    - #### checkGroupPermission

          void checkGroupPermission(Group group,
                                  PermissionControlled accessedObj,
                                  UserPermission action)
                                    throws PermissionException

      Same as `hasGroupPermission(Group, PermissionControlled, UserPermission)` but throws an exception if the permission was not granted.
      Throws:
        `PermissionException`

Copyright © 2013 EsprIT-Systems. All Rights Reserved.