public class JndiUtils extends Object
| Modifier and Type | Field and Description | 
|---|---|
static boolean | 
DEFAULT_IGNORE_CASE
Whether to ignore case when creating basic attributes. 
 | 
private SortBehavior | 
sortBehavior
Ldap result sort behavior. 
 | 
| Constructor and Description | 
|---|
JndiUtils()
Default constructor. 
 | 
JndiUtils(SortBehavior sb)
Creates a new jndi util. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
ModificationItem[] | 
fromAttributeModification(AttributeModification[] mods)
Returns jndi modification items using the supplied attribute modifications. 
 | 
Attribute | 
fromLdapAttribute(LdapAttribute attr)
Returns a jndi attribute that represents the values in the supplied ldap attribute. 
 | 
Attributes | 
fromLdapAttributes(Collection<LdapAttribute> attrs)
Returns a jndi attributes that represents the values in the supplied ldap attributes. 
 | 
SearchResult | 
fromSearchEntry(SearchEntry entry)
Returns a jndi search result that represents the supplied search entry. 
 | 
static SortKey[] | 
fromSortKey(SortKey[] keys)
Returns jndi sort keys using the supplied sort keys. 
 | 
protected static int | 
getAttributeModification(AttributeModificationType type)
Returns the jndi modification integer constant for the supplied attribute modification type. 
 | 
static String | 
getAuthenticationType(Mechanism m)
Returns the JNDI authentication string for the supplied authentication type. 
 | 
static String | 
getQualityOfProtection(QualityOfProtection qop)
Returns the SASL quality of protection string for the supplied enum. 
 | 
static String | 
getSecurityStrength(SecurityStrength ss)
Returns the SASL security strength string for the supplied enum. 
 | 
LdapAttribute | 
toLdapAttribute(Attribute attr)
Returns an ldap attribute using the supplied jndi attribute. 
 | 
SearchEntry | 
toSearchEntry(SearchResult result)
Returns a search entry using the supplied jndi search result. 
 | 
public static final boolean DEFAULT_IGNORE_CASE
private final SortBehavior sortBehavior
public JndiUtils()
public JndiUtils(SortBehavior sb)
sb - sort behaviorpublic Attribute fromLdapAttribute(LdapAttribute attr)
attr - ldap attributepublic LdapAttribute toLdapAttribute(Attribute attr) throws NamingException
attr - jndi attributeNamingException - if the attribute values cannot be readpublic Attributes fromLdapAttributes(Collection<LdapAttribute> attrs)
attrs - ldap attributespublic SearchResult fromSearchEntry(SearchEntry entry)
entry - search entrypublic SearchEntry toSearchEntry(SearchResult result) throws NamingException
result - jndi search resultNamingException - if the search result cannot be readpublic ModificationItem[] fromAttributeModification(AttributeModification[] mods)
mods - attribute modificationspublic static SortKey[] fromSortKey(SortKey[] keys)
keys - sort keysprotected static int getAttributeModification(AttributeModificationType type)
type - attribute modification typepublic static String getQualityOfProtection(QualityOfProtection qop)
qop - quality of protection enumpublic static String getSecurityStrength(SecurityStrength ss)
ss - security strength enumCopyright © 2003-2019 Virginia Tech. All Rights Reserved.