Package org.ldaptive.jaas
Class LdapRole
java.lang.Object
org.ldaptive.jaas.LdapRole
- All Implemented Interfaces:
Comparable<Principal>,Principal
Provides a custom implementation for adding LDAP principals to a subject that represent roles.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final inthash code seed.private final StringLDAP role name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleangetName()inthashCode()toRoles(Collection<LdapAttribute> attributes) Iterates over the supplied attributes and returns all values as a set of ldap roles.Iterates over the supplied entry and returns all attributes as a set of ldap roles.toRoles(SearchResponse result) Iterates over the supplied result and returns all attributes as a set of ldap roles.toString()
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
roleName
LDAP role name.
-
-
Constructor Details
-
LdapRole
Creates a new ldap role with the supplied name.- Parameters:
name- of this role
-
-
Method Details
-
getName
-
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<Principal>
-
toRoles
Iterates over the supplied result and returns all attributes as a set of ldap roles.- Parameters:
result- to read- Returns:
- ldap roles
-
toRoles
Iterates over the supplied entry and returns all attributes as a set of ldap roles.- Parameters:
entry- to read- Returns:
- ldap roles
-
toRoles
Iterates over the supplied attributes and returns all values as a set of ldap roles.- Parameters:
attributes- to read- Returns:
- ldap roles
-