Class LdapGroup

java.lang.Object
org.ldaptive.jaas.LdapGroup
All Implemented Interfaces:
Principal

public class LdapGroup extends Object implements Principal
Provides a custom implementation for grouping principals.
  • Field Details

    • HASH_CODE_SEED

      private static final int HASH_CODE_SEED
      hash code seed.
      See Also:
    • groupName

      private final String groupName
      LDAP group name.
    • members

      private final Set<Principal> members
      Principal members.
  • Constructor Details

    • LdapGroup

      public LdapGroup(String name, Set<Principal> principals)
      Creates a new ldap group with the supplied name.
      Parameters:
      name - of the group
      principals - that are members of the group
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface Principal
    • isMember

      public boolean isMember(Principal member)
      Returns whether the supplied member is in this group.
      Parameters:
      member - to check
      Returns:
      whether the supplied member is in this group
    • getMembers

      public Set<Principal> getMembers()
      Returns an unmodifiable set of the members in this group.
      Returns:
      set of member principals
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Principal
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Principal
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Specified by:
      toString in interface Principal
      Overrides:
      toString in class Object