Package org.springframework.ldap.core
Class LdapEntryIdentification
java.lang.Object
org.springframework.ldap.core.LdapEntryIdentification
Wrapper class to handle the full identification of an LDAP entry. An LDAP entry is
identified by its Distinguished Name, in Spring LDAP represented by the
DistinguishedName
class. A Distinguished Name can be absolute - i.e. complete
including the very root (base) of the LDAP tree - or relative - i.e relative to the
base LDAP path of the current LDAP connection (specified as base
to the
ContextSource
).
The different representations are needed on different occasions, e.g. the relative DN is typically what is needed to perform lookups and searches in the LDAP tree, whereas the absolute DN is needed when authenticating and when an LDAP entry is referred to in e.g. a group. This wrapper class contains both of these representations.
-
Constructor Summary
ConstructorDescriptionLdapEntryIdentification
(LdapName absoluteDn, LdapName relativeDn) Construct an LdapEntryIdentification instance.LdapEntryIdentification
(DistinguishedName absoluteDn, DistinguishedName relativeDn) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.DistinguishedName
and associated classes and methods are deprecated as of 2.0.Get the DN of the identified entry relative to the base LDAP path, e.g.Deprecated.DistinguishedName
and associated classes and methods are deprecated as of 2.0.Get the absolute DN of the identified entry, e.g.int
hashCode()
-
Constructor Details
-
LdapEntryIdentification
@Deprecated public LdapEntryIdentification(DistinguishedName absoluteDn, DistinguishedName relativeDn) Deprecated.DistinguishedName
and associated classes and methods are deprecated as of 2.0. useLdapEntryIdentification(javax.naming.ldap.LdapName, javax.naming.ldap.LdapName)
instead.Construct an LdapEntryIdentification instance.- Parameters:
absoluteDn
- the absolute DN of the identified entry, e.g. as returned byContext.getNameInNamespace()
.relativeDn
- the DN of the identified entry relative to the base LDAP path, e.g. as returned byLdapDataEntry.getDn()
.
-
LdapEntryIdentification
Construct an LdapEntryIdentification instance.- Parameters:
absoluteDn
- the absolute DN of the identified entry, e.g. as returned byContext.getNameInNamespace()
.relativeDn
- the DN of the identified entry relative to the base LDAP path, e.g. as returned byLdapDataEntry.getDn()
.- Since:
- 2.0
-
-
Method Details
-
getAbsoluteName
Get the DN of the identified entry relative to the base LDAP path, e.g. as returned byLdapDataEntry.getDn()
.- Returns:
- the relative DN.
- Since:
- 2.0
-
getRelativeName
Get the absolute DN of the identified entry, e.g. as returned byContext.getNameInNamespace()
.- Returns:
- the absolute DN.
- Since:
- 2.0
-
getRelativeDn
Deprecated.DistinguishedName
and associated classes and methods are deprecated as of 2.0. usegetRelativeName()
instead.Get the DN of the identified entry relative to the base LDAP path, e.g. as returned byLdapDataEntry.getDn()
.- Returns:
- the relative DN.
-
getAbsoluteDn
Deprecated.DistinguishedName
and associated classes and methods are deprecated as of 2.0. usegetAbsoluteName()
instead.Get the absolute DN of the identified entry, e.g. as returned byContext.getNameInNamespace()
.- Returns:
- the absolute DN.
-
equals
-
hashCode
public int hashCode()
-
DistinguishedName
and associated classes and methods are deprecated as of 2.0.