Package org.ldaptive.jaas
Class LdapGroup
- java.lang.Object
-
- org.ldaptive.jaas.LdapGroup
-
- All Implemented Interfaces:
Serializable
,Principal
public class LdapGroup extends Object implements Principal, Serializable
Provides a custom implementation for grouping principals.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private String
groupName
LDAP group name.private static int
HASH_CODE_SEED
hash code seed.private Set<Principal>
members
Principal members.private static long
serialVersionUID
serial version uid.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMember(Principal user)
Adds a member to this group.boolean
equals(Object o)
Set<Principal>
getMembers()
Returns an unmodifiable set of the members in this group.String
getName()
int
hashCode()
boolean
isMember(Principal member)
void
removeMember(Principal user)
Removes a member from this group.String
toString()
-
-
-
Field Detail
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
serialVersionUID
private static final long serialVersionUID
serial version uid.- See Also:
- Constant Field Values
-
groupName
private final String groupName
LDAP group name.
-
-
Constructor Detail
-
LdapGroup
public LdapGroup(String name)
Creates a new ldap group with the supplied name.- Parameters:
name
- of the group
-
-
Method Detail
-
addMember
public void addMember(Principal user)
Adds a member to this group.- Parameters:
user
- to add
-
removeMember
public void removeMember(Principal user)
Removes a member from this group.- Parameters:
user
- to remove
-
isMember
public boolean isMember(Principal member)
-
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)
-
hashCode
public int hashCode()
-
-