public class AmbariLdapUtils extends Object
Constructor and Description |
---|
AmbariLdapUtils() |
Modifier and Type | Method and Description |
---|---|
static Name |
getFullDn(Name dn,
Context context)
Ensures the given distinguished name is an absolute value rather than a name relative to the context.
|
static Name |
getFullDn(Name dn,
Name baseDn)
Ensures the given distinguished name is an absolute value rather than a name relative to the context.
|
static Name |
getFullDn(String dn,
Context context)
Ensures the given distinguished name is an absolute value rather than a name relative to the context.
|
static boolean |
isLdapObjectOutOfScopeFromBaseDn(org.springframework.ldap.core.DirContextAdapter adapter,
String baseDn)
Determine that the full DN of an LDAP object is in/out of the base DN scope.
|
static boolean |
isUserPrincipalNameFormat(String loginName)
Returns true if the given user name contains domain name as well (e.g.
|
public static boolean isUserPrincipalNameFormat(String loginName)
loginName
- the login name to verify if it contains domain information.public static boolean isLdapObjectOutOfScopeFromBaseDn(org.springframework.ldap.core.DirContextAdapter adapter, String baseDn)
adapter
- used for get the full dn from the ldap query responsebaseDn
- the base distinguished namepublic static Name getFullDn(String dn, Context context) throws NamingException
dn
- a distinguished namecontext
- the context containing the base distinguished nameNamingException
public static Name getFullDn(Name dn, Context context) throws NamingException
dn
- a distinguished namecontext
- the context containing the base distinguished nameNamingException
Copyright © 2022 Apache Software Foundation. All rights reserved.