Package org.ldaptive.jaas
Class LdapRole
java.lang.Object
org.ldaptive.jaas.LdapRole
- All Implemented Interfaces:
Serializable
,Comparable<Principal>
,Principal
Provides a custom implementation for adding LDAP principals to a subject that represent roles.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
hash code seed.private final String
LDAP role name.private static final long
serial version uid. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
getName()
int
hashCode()
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:
-
serialVersionUID
private static final long serialVersionUIDserial version uid.- 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:
compareTo
in 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
-