public class LdapRole
extends java.lang.Object
implements java.security.Principal, java.io.Serializable, java.lang.Comparable<java.security.Principal>
| Modifier and Type | Field and Description |
|---|---|
private static int |
HASH_CODE_SEED
hash code seed.
|
private java.lang.String |
roleName
LDAP role name.
|
private static long |
serialVersionUID
serial version uid.
|
| Constructor and Description |
|---|
LdapRole(java.lang.String name)
Creates a new ldap role with the supplied name.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.security.Principal p) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getName() |
int |
hashCode() |
static java.util.Set<LdapRole> |
toRoles(java.util.Collection<LdapAttribute> attributes)
Iterates over the supplied attributes and returns all values as a set of ldap roles.
|
static java.util.Set<LdapRole> |
toRoles(LdapEntry entry)
Iterates over the supplied entry and returns all attributes as a set of ldap roles.
|
static java.util.Set<LdapRole> |
toRoles(SearchResult result)
Iterates over the supplied result and returns all attributes as a set of ldap roles.
|
java.lang.String |
toString() |
private static final int HASH_CODE_SEED
private static final long serialVersionUID
private final java.lang.String roleName
public LdapRole(java.lang.String name)
name - of this rolepublic java.lang.String getName()
getName in interface java.security.Principalpublic boolean equals(java.lang.Object o)
equals in interface java.security.Principalequals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.security.PrincipalhashCode in class java.lang.Objectpublic java.lang.String toString()
toString in interface java.security.PrincipaltoString in class java.lang.Objectpublic int compareTo(java.security.Principal p)
compareTo in interface java.lang.Comparable<java.security.Principal>public static java.util.Set<LdapRole> toRoles(SearchResult result)
result - to readpublic static java.util.Set<LdapRole> toRoles(LdapEntry entry)
entry - to readpublic static java.util.Set<LdapRole> toRoles(java.util.Collection<LdapAttribute> attributes)
attributes - to read