Package org.ldaptive.provider.jldap
Class JLdapUtils
- java.lang.Object
-
- org.ldaptive.provider.jldap.JLdapUtils
-
public class JLdapUtils extends Object
Provides methods for converting between JLDAP specific objects and ldaptive specific objects.
-
-
Field Summary
Fields Modifier and Type Field Description private List<String>binaryAttrsAttributes that should be treated as binary.private SortBehaviorsortBehaviorLdap result sort behavior.
-
Constructor Summary
Constructors Constructor Description JLdapUtils()Default constructor.JLdapUtils(SortBehavior sb)Creates a new jldap util.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.novell.ldap.LDAPModification[]fromAttributeModification(AttributeModification[] am)Returns jldap ldap modifications using the supplied attribute modifications.com.novell.ldap.LDAPAttributefromLdapAttribute(LdapAttribute la)Returns a jldap attribute that represents the values in the supplied ldap attribute.com.novell.ldap.LDAPAttributeSetfromLdapAttributes(Collection<LdapAttribute> c)Returns a jldap attribute set that represents the values in the supplied ldap attributes.com.novell.ldap.LDAPEntryfromLdapEntry(LdapEntry le)Returns a jldap ldap entry that represents the supplied ldap entry.static com.novell.ldap.controls.LDAPSortKey[]fromSortKey(SortKey[] sk)Returns jldap sort keys using the supplied sort keys.protected static intgetAttributeModification(AttributeModificationType am)Returns the jldap modification integer constant for the supplied attribute modification type.List<String>getBinaryAttributes()Returns the list of binary attributes.voidsetBinaryAttributes(String[] s)Sets the list of binary attributes.LdapAttributetoLdapAttribute(com.novell.ldap.LDAPAttribute a)Returns an ldap attribute using the supplied jldap attribute.SearchEntrytoSearchEntry(com.novell.ldap.LDAPEntry entry, ResponseControl[] c, int id)Returns a search entry using the supplied jldap ldap entry.
-
-
-
Field Detail
-
sortBehavior
private final SortBehavior sortBehavior
Ldap result sort behavior.
-
-
Constructor Detail
-
JLdapUtils
public JLdapUtils()
Default constructor.
-
JLdapUtils
public JLdapUtils(SortBehavior sb)
Creates a new jldap util.- Parameters:
sb- sort behavior
-
-
Method Detail
-
getBinaryAttributes
public List<String> getBinaryAttributes()
Returns the list of binary attributes.- Returns:
- list of binary attributes
-
setBinaryAttributes
public void setBinaryAttributes(String[] s)
Sets the list of binary attributes.- Parameters:
s- binary attributes
-
fromLdapAttribute
public com.novell.ldap.LDAPAttribute fromLdapAttribute(LdapAttribute la)
Returns a jldap attribute that represents the values in the supplied ldap attribute.- Parameters:
la- ldap attribute- Returns:
- jldap attribute
-
toLdapAttribute
public LdapAttribute toLdapAttribute(com.novell.ldap.LDAPAttribute a)
Returns an ldap attribute using the supplied jldap attribute.- Parameters:
a- jldap attribute- Returns:
- ldap attribute
-
fromLdapAttributes
public com.novell.ldap.LDAPAttributeSet fromLdapAttributes(Collection<LdapAttribute> c)
Returns a jldap attribute set that represents the values in the supplied ldap attributes.- Parameters:
c- ldap attributes- Returns:
- jldap attributes
-
fromLdapEntry
public com.novell.ldap.LDAPEntry fromLdapEntry(LdapEntry le)
Returns a jldap ldap entry that represents the supplied ldap entry.- Parameters:
le- ldap entry- Returns:
- jldap ldap entry
-
toSearchEntry
public SearchEntry toSearchEntry(com.novell.ldap.LDAPEntry entry, ResponseControl[] c, int id)
Returns a search entry using the supplied jldap ldap entry.- Parameters:
entry- jldap ldap entryc- response controlsid- message id- Returns:
- search entry
-
fromAttributeModification
public com.novell.ldap.LDAPModification[] fromAttributeModification(AttributeModification[] am)
Returns jldap ldap modifications using the supplied attribute modifications.- Parameters:
am- attribute modifications- Returns:
- jldap ldap modifications
-
fromSortKey
public static com.novell.ldap.controls.LDAPSortKey[] fromSortKey(SortKey[] sk)
Returns jldap sort keys using the supplied sort keys.- Parameters:
sk- sort keys- Returns:
- jldap sort keys
-
getAttributeModification
protected static int getAttributeModification(AttributeModificationType am)
Returns the jldap modification integer constant for the supplied attribute modification type.- Parameters:
am- attribute modification type- Returns:
- integer constant
-
-