Package org.ldaptive.provider.unboundid
Class UnboundIDUtils
- java.lang.Object
-
- org.ldaptive.provider.unboundid.UnboundIDUtils
-
public class UnboundIDUtils extends Object
Provides methods for converting between Unbound ID specific objects and ldaptive specific objects.
-
-
Field Summary
Fields Modifier and Type Field Description private List<String>
binaryAttrs
Attributes that should be treated as binary.private SortBehavior
sortBehavior
Ldap result sort behavior.
-
Constructor Summary
Constructors Constructor Description UnboundIDUtils()
Default constructor.UnboundIDUtils(SortBehavior sb)
Creates a new unboundid util.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.unboundid.ldap.sdk.Modification[]
fromAttributeModification(AttributeModification[] am)
Returns unbound id modifications using the supplied attribute modifications.com.unboundid.ldap.sdk.Attribute
fromLdapAttribute(LdapAttribute la)
Returns an unbound id attribute that represents the values in the supplied ldap attribute.com.unboundid.ldap.sdk.Attribute[]
fromLdapAttributes(Collection<LdapAttribute> c)
Returns a list of unbound id attribute that represents the values in the supplied ldap attributes.static com.unboundid.ldap.sdk.controls.SortKey[]
fromSortKey(SortKey[] sk)
Returns unbound id sort keys using the supplied sort keys.List<String>
getBinaryAttributes()
Returns the list of binary attributes.protected static com.unboundid.ldap.sdk.ModificationType
getModificationType(AttributeModificationType am)
Returns the unbound id modification type for the supplied attribute modification type.void
setBinaryAttributes(String[] s)
Sets the list of binary attributes.LdapAttribute
toLdapAttribute(com.unboundid.ldap.sdk.Attribute a)
Returns an ldap attribute using the supplied unbound id attribute.SearchEntry
toSearchEntry(com.unboundid.ldap.sdk.Entry e, ResponseControl[] c, int id)
Returns a search entry using the supplied unbound id entry.
-
-
-
Field Detail
-
sortBehavior
private final SortBehavior sortBehavior
Ldap result sort behavior.
-
-
Constructor Detail
-
UnboundIDUtils
public UnboundIDUtils()
Default constructor.
-
UnboundIDUtils
public UnboundIDUtils(SortBehavior sb)
Creates a new unboundid 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.unboundid.ldap.sdk.Attribute fromLdapAttribute(LdapAttribute la)
Returns an unbound id attribute that represents the values in the supplied ldap attribute.- Parameters:
la
- ldap attribute- Returns:
- unbound id attribute
-
toLdapAttribute
public LdapAttribute toLdapAttribute(com.unboundid.ldap.sdk.Attribute a)
Returns an ldap attribute using the supplied unbound id attribute.- Parameters:
a
- unbound id attribute- Returns:
- ldap attribute
-
fromLdapAttributes
public com.unboundid.ldap.sdk.Attribute[] fromLdapAttributes(Collection<LdapAttribute> c)
Returns a list of unbound id attribute that represents the values in the supplied ldap attributes.- Parameters:
c
- ldap attributes- Returns:
- unbound id attributes
-
toSearchEntry
public SearchEntry toSearchEntry(com.unboundid.ldap.sdk.Entry e, ResponseControl[] c, int id)
Returns a search entry using the supplied unbound id entry.- Parameters:
e
- unbound id entryc
- response controlsid
- message id- Returns:
- search entry
-
fromAttributeModification
public com.unboundid.ldap.sdk.Modification[] fromAttributeModification(AttributeModification[] am)
Returns unbound id modifications using the supplied attribute modifications.- Parameters:
am
- attribute modifications- Returns:
- unbound id modifications
-
fromSortKey
public static com.unboundid.ldap.sdk.controls.SortKey[] fromSortKey(SortKey[] sk)
Returns unbound id sort keys using the supplied sort keys.- Parameters:
sk
- sort keys- Returns:
- unbound id sort keys
-
getModificationType
protected static com.unboundid.ldap.sdk.ModificationType getModificationType(AttributeModificationType am)
Returns the unbound id modification type for the supplied attribute modification type.- Parameters:
am
- attribute modification type- Returns:
- modification type
-
-