public final class LdapPrincipal extends Object implements Principal, Cloneable, Externalizable
| Modifier and Type | Field and Description |
|---|---|
static LdapPrincipal |
ANONYMOUS
the no name anonymous user whose DN is the empty String
|
| Constructor and Description |
|---|
LdapPrincipal()
Creates a principal for the no name anonymous user whose DN is the empty
String.
|
LdapPrincipal(org.apache.directory.shared.ldap.name.DN name,
org.apache.directory.shared.ldap.constants.AuthenticationLevel authenticationLevel)
Creates a new LDAP/X500 principal without any group associations.
|
LdapPrincipal(org.apache.directory.shared.ldap.name.DN name,
org.apache.directory.shared.ldap.constants.AuthenticationLevel authenticationLevel,
byte[] userPassword)
Creates a new LDAP/X500 principal without any group associations.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Clone the object.
|
org.apache.directory.shared.ldap.constants.AuthenticationLevel |
getAuthenticationLevel()
Gets the authentication level associated with this LDAP principle.
|
org.apache.directory.shared.ldap.name.DN |
getClonedName()
Gets a cloned copy of the normalized distinguished name of this
principal as a
DN. |
String |
getName()
Returns the normalized distinguished name of the principal as a String.
|
byte[] |
getUserPassword() |
void |
readExternal(ObjectInput in) |
void |
setUserPassword(byte[] userPassword) |
String |
toString()
Returns string representation of the normalized distinguished name
of this principal.
|
void |
writeExternal(ObjectOutput out) |
public static final LdapPrincipal ANONYMOUS
public LdapPrincipal(org.apache.directory.shared.ldap.name.DN name,
org.apache.directory.shared.ldap.constants.AuthenticationLevel authenticationLevel)
name - the normalized distinguished name of the principalauthenticationLevel - the authentication level for this principalpublic LdapPrincipal(org.apache.directory.shared.ldap.name.DN name,
org.apache.directory.shared.ldap.constants.AuthenticationLevel authenticationLevel,
byte[] userPassword)
name - the normalized distinguished name of the principalauthenticationLevel - the authentication level for this principaluserPassword - The user passwordpublic LdapPrincipal()
public org.apache.directory.shared.ldap.name.DN getClonedName()
DN.DNpublic String getName()
public org.apache.directory.shared.ldap.constants.AuthenticationLevel getAuthenticationLevel()
public String toString()
public byte[] getUserPassword()
public void setUserPassword(byte[] userPassword)
public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface Externalizablein - The stream from which the LdapPrincipal is readIOException - If the stream can't be readClassNotFoundException - If the LdapPrincipal can't be createdExternalizable.readExternal(ObjectInput)public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface Externalizableout - The stream in which the LdapPrincipal will be serialized.
The password won't be written !IOException - If the serialization failExternalizable#readExternal(ObjectInput)Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.