de.esprit.netsuite.server.auth.member

## Class DefaultGroupMemberManager<S extends ServerContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<S>
    - - de.esprit.netsuite.server.AbstractServerObject<S>
      - - de.esprit.netsuite.server.AbstractInitializableServerObject<S>
        - - de.esprit.netsuite.server.auth.member.DefaultGroupMemberManager<S>

- All Implemented Interfaces:
    ApplicationObject<S>, Initializable, SimpleLogSupport, Dumpable, GroupMemberManager<S>, GroupMemberResolver, PermissionControlled, ServerObject<S>

      public class DefaultGroupMemberManager<S extends ServerContext>
      extends AbstractInitializableServerObject<S>
      implements GroupMemberManager<S>

  This is the default implementation of a `GroupMemberManager`. It uses a `GroupMemberConfig` object for storing the group member assignments in the server config file ServerConfigFile.MEMBER. Note that all data changing methods flush the server config file.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultGroupMemberManager(S serverCtx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addGroupMember(SessionId sessionId, Group group, UserId userId)`
    `java.util.List<Group>` | `getGroupsOfUser(UserId user)` Returns all groups the given user is member of.
    `PermissionDefinition` | `getPermissionDefinition()` Returns an object that identifies a `PermissionControlled` object with a unique name and provides a list of supported assignable permissions.
    `java.util.List<UserId>` | `getUsersOfGroup(Group group)`
    `void` | `init()` Performs the initialization of this class.
    `void` | `removeGroupMember(SessionId sessionId, Group group, UserId userId)`
    `void` | `setGroupsForUser(SessionId sessionId, UserId userId, java.util.List<Group> groups)`

    - ### Methods inherited from class de.esprit.netsuite.server.AbstractInitializableServerObject

      `checkInitialized, isInitialized, setInitialized, toString`

    - ### Methods inherited from class de.esprit.netsuite.server.AbstractServerObject

      `checkPermission, getServerConfig, getServerContext, getStatisticManager`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString`

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

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

- - ### Constructor Detail

    - #### DefaultGroupMemberManager

          public DefaultGroupMemberManager(S serverCtx)

  - ### Method Detail

    - #### init

          public void init()
                    throws java.lang.Exception

      Description copied from interface: `Initializable`
      Performs the initialization of this class. Note that the implementation should maintain an isInitialized flag which must be set when initialization has completed.
      Specified by:
        `init` in interface `Initializable`
      Specified by:
        `init` in interface `GroupMemberManager<S extends ServerContext>`
      Throws:
        `java.lang.Exception`

    - #### getPermissionDefinition

          public final PermissionDefinition getPermissionDefinition()

      Description copied from interface: `PermissionControlled`
      Returns an object that identifies a `PermissionControlled` object with a unique name and provides a list of supported assignable permissions.
      Specified by:
        `getPermissionDefinition` in interface `PermissionControlled`

    - #### getGroupsOfUser

          public final java.util.List<Group> getGroupsOfUser(UserId user)

      Description copied from interface: `GroupMemberResolver`
      Returns all groups the given user is member of.
      Specified by:
        `getGroupsOfUser` in interface `GroupMemberManager<S extends ServerContext>`
      Specified by:
        `getGroupsOfUser` in interface `GroupMemberResolver`

    - #### getUsersOfGroup

          public final java.util.List<UserId> getUsersOfGroup(Group group)

      Specified by:
        `getUsersOfGroup` in interface `GroupMemberManager<S extends ServerContext>`

    - #### setGroupsForUser

          public final void setGroupsForUser(SessionId sessionId,
                              UserId userId,
                              java.util.List<Group> groups)
                                      throws java.lang.Exception

      Specified by:
        `setGroupsForUser` in interface `GroupMemberManager<S extends ServerContext>`
      Throws:
        `java.lang.Exception`

    - #### addGroupMember

          public final void addGroupMember(SessionId sessionId,
                            Group group,
                            UserId userId)
                                    throws java.lang.Exception

      Specified by:
        `addGroupMember` in interface `GroupMemberManager<S extends ServerContext>`
      Throws:
        `java.lang.Exception`

    - #### removeGroupMember

          public final void removeGroupMember(SessionId sessionId,
                               Group group,
                               UserId userId)
                                       throws java.lang.Exception

      Specified by:
        `removeGroupMember` in interface `GroupMemberManager<S extends ServerContext>`
      Throws:
        `java.lang.Exception`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.