de.esprit.netsuite.server.auth.member

## Class GroupMemberConfig

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.netsuite.server.config.AbstractServerConfig
      - - de.esprit.netsuite.server.auth.member.GroupMemberConfig

- All Implemented Interfaces:
    DeepCloneable, Dumpable, java.io.Serializable, java.lang.Cloneable

      public class GroupMemberConfig
      extends AbstractServerConfig

  This class encapsulates the group-member information read from the members config file.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `groupMemberDocType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GroupMemberConfig()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addGroupMembership(java.lang.String group, java.lang.String... users)`
    `void` | `clear()` Clears all user-group assignments.
    `java.util.List<java.lang.String>` | `getGroupsInUse()`
    `java.util.List<java.lang.String>` | `getGroupsOfUser(java.lang.String user)`
    `java.util.List<java.lang.String>` | `getUsersOfGroup(java.lang.String group)`
    `boolean` | `isEmpty()` Tells whether there are any user-group assignments at all.
    `boolean` | `isUserMemberOf(java.lang.String user, java.lang.String group)`
    `void` | `read(ApplicationContext ctx, java.io.File inputFile)`
    `void` | `removeGroup(java.lang.String group)`
    `void` | `removeGroupIncludingMembers(java.lang.String group)` Removes the group from the
    `boolean` | `removeGroupMember(java.lang.String group, java.lang.String user)`
    `java.util.List<java.lang.String>` | `removeUser(java.lang.String user)` Returns a list of all groups from which the user was removed.
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.
    `void` | `write(ApplicationContext ctx, java.io.File outputFile)`

    - ### Methods inherited from class de.esprit.netsuite.server.config.AbstractServerConfig

      `equals, getConfigFileIn, getConfigFileName, hashCode, read, write`

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

      `clone, deepClone`

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

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

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

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

- - ### Field Detail

    - #### groupMemberDocType

          public static java.lang.String groupMemberDocType

  - ### Constructor Detail

    - #### GroupMemberConfig

          public GroupMemberConfig()

  - ### Method Detail

    - #### getGroupsInUse

          public final java.util.List<java.lang.String> getGroupsInUse()

    - #### getGroupsOfUser

          public final java.util.List<java.lang.String> getGroupsOfUser(java.lang.String user)

    - #### getUsersOfGroup

          public final java.util.List<java.lang.String> getUsersOfGroup(java.lang.String group)

    - #### isUserMemberOf

          public final boolean isUserMemberOf(java.lang.String user,
                               java.lang.String group)

    - #### addGroupMembership

          public final void addGroupMembership(java.lang.String group,
                                java.lang.String... users)

    - #### removeGroupMember

          public final boolean removeGroupMember(java.lang.String group,
                                  java.lang.String user)

    - #### removeGroupIncludingMembers

          public final void removeGroupIncludingMembers(java.lang.String group)

      Removes the group from the

    - #### removeGroup

          public final void removeGroup(java.lang.String group)
                                 throws GroupHasStillMembersException

      Throws:
        `GroupHasStillMembersException`

    - #### removeUser

          public final java.util.List<java.lang.String> removeUser(java.lang.String user)

      Returns a list of all groups from which the user was removed.

    - #### clear

          public final void clear()

      Clears all user-group assignments.

    - #### isEmpty

          public final boolean isEmpty()

      Tells whether there are any user-group assignments at all.

    - #### read

          public final void read(ApplicationContext ctx,
                  java.io.File inputFile)
                          throws java.lang.Exception

      Specified by:
        `read` in class `AbstractServerConfig`
      Throws:
        `java.lang.Exception`

    - #### write

          public final void write(ApplicationContext ctx,
                   java.io.File outputFile)
                           throws java.lang.Exception

      Specified by:
        `write` in class `AbstractServerConfig`
      Throws:
        `java.lang.Exception`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `AbstractServerConfig`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.