org.ldaptive.provider.opendj
Class OpenDJUtils

java.lang.Object
  extended by org.ldaptive.provider.opendj.OpenDJUtils

public class OpenDJUtils
extends Object

Provides methods for converting between OpenDJ specific objects and ldaptive specific objects.

Version:
$Revision: 3092 $ $Date: 2015-02-16 16:31:47 -0500 (Mon, 16 Feb 2015) $
Author:
Middleware Services

Constructor Summary
OpenDJUtils()
          Default constructor.
OpenDJUtils(org.ldaptive.SortBehavior sb)
          Creates a new opendj util.
 
Method Summary
 org.forgerock.opendj.ldap.Modification[] fromAttributeModification(org.ldaptive.AttributeModification[] am)
          Returns opendj modifications using the supplied attribute modifications.
 org.forgerock.opendj.ldap.ByteString[] fromBinaryValues(Collection<byte[]> values)
          Returns an opendj byte string that represents the values in the supplied collection.
 org.forgerock.opendj.ldap.Attribute fromLdapAttribute(org.ldaptive.LdapAttribute la)
          Returns an opendj attribute that represents the values in the supplied ldap attribute.
 org.forgerock.opendj.ldap.Attribute[] fromLdapAttributes(Collection<org.ldaptive.LdapAttribute> c)
          Returns a list of opendj attribute that represents the values in the supplied ldap attributes.
 org.forgerock.opendj.ldap.Entry fromLdapEntry(org.ldaptive.LdapEntry le)
          Returns an opendj entry that represents the values in the supplied entry.
static org.forgerock.opendj.ldap.SortKey[] fromSortKey(org.ldaptive.control.SortKey[] sk)
          Returns opendj sort keys using the supplied sort keys.
 org.forgerock.opendj.ldap.ByteString[] fromStringValues(Collection<String> values)
          Returns an opendj byte string that represents the values in the supplied collection.
 List<String> getBinaryAttributes()
          Returns the list of binary attributes.
protected static org.forgerock.opendj.ldap.ModificationType getModificationType(org.ldaptive.AttributeModificationType am)
          Returns the opendj modification type for the supplied attribute modification type.
 void setBinaryAttributes(String[] s)
          Sets the list of binary attributes.
 byte[][] toBinaryValues(org.forgerock.opendj.ldap.ByteString[] values)
          Returns byte array values for the supplied byte strings.
 org.ldaptive.LdapAttribute toLdapAttribute(org.forgerock.opendj.ldap.Attribute a)
          Returns an ldap attribute using the supplied opendj attribute.
 org.ldaptive.SearchEntry toSearchEntry(org.forgerock.opendj.ldap.Entry e, org.ldaptive.control.ResponseControl[] c, int id)
          Returns a search entry using the supplied opendj entry.
 String[] toStringValues(org.forgerock.opendj.ldap.ByteString[] values)
          Returns string values for the supplied byte strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenDJUtils

public OpenDJUtils()
Default constructor.


OpenDJUtils

public OpenDJUtils(org.ldaptive.SortBehavior sb)
Creates a new opendj 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

fromStringValues

public org.forgerock.opendj.ldap.ByteString[] fromStringValues(Collection<String> values)
Returns an opendj byte string that represents the values in the supplied collection.

Parameters:
values - to convert to byte strings
Returns:
byte strings

fromBinaryValues

public org.forgerock.opendj.ldap.ByteString[] fromBinaryValues(Collection<byte[]> values)
Returns an opendj byte string that represents the values in the supplied collection.

Parameters:
values - to convert to byte strings
Returns:
byte strings

toStringValues

public String[] toStringValues(org.forgerock.opendj.ldap.ByteString[] values)
Returns string values for the supplied byte strings.

Parameters:
values - to convert to strings
Returns:
string values

toBinaryValues

public byte[][] toBinaryValues(org.forgerock.opendj.ldap.ByteString[] values)
Returns byte array values for the supplied byte strings.

Parameters:
values - to convert to byte arrays
Returns:
byte array values

fromLdapAttribute

public org.forgerock.opendj.ldap.Attribute fromLdapAttribute(org.ldaptive.LdapAttribute la)
Returns an opendj attribute that represents the values in the supplied ldap attribute.

Parameters:
la - ldap attribute
Returns:
opendj attribute

toLdapAttribute

public org.ldaptive.LdapAttribute toLdapAttribute(org.forgerock.opendj.ldap.Attribute a)
Returns an ldap attribute using the supplied opendj attribute.

Parameters:
a - opendj attribute
Returns:
ldap attribute

fromLdapAttributes

public org.forgerock.opendj.ldap.Attribute[] fromLdapAttributes(Collection<org.ldaptive.LdapAttribute> c)
Returns a list of opendj attribute that represents the values in the supplied ldap attributes.

Parameters:
c - ldap attributes
Returns:
opendj attributes

fromLdapEntry

public org.forgerock.opendj.ldap.Entry fromLdapEntry(org.ldaptive.LdapEntry le)
Returns an opendj entry that represents the values in the supplied entry.

Parameters:
le - ldap entry
Returns:
opendj entry

toSearchEntry

public org.ldaptive.SearchEntry toSearchEntry(org.forgerock.opendj.ldap.Entry e,
                                              org.ldaptive.control.ResponseControl[] c,
                                              int id)
Returns a search entry using the supplied opendj entry.

Parameters:
e - opendj entry
c - response controls
id - message id
Returns:
search entry

fromAttributeModification

public org.forgerock.opendj.ldap.Modification[] fromAttributeModification(org.ldaptive.AttributeModification[] am)
Returns opendj modifications using the supplied attribute modifications.

Parameters:
am - attribute modifications
Returns:
opendj modifications

fromSortKey

public static org.forgerock.opendj.ldap.SortKey[] fromSortKey(org.ldaptive.control.SortKey[] sk)
Returns opendj sort keys using the supplied sort keys.

Parameters:
sk - sort keys
Returns:
opendj sort keys

getModificationType

protected static org.forgerock.opendj.ldap.ModificationType getModificationType(org.ldaptive.AttributeModificationType am)
Returns the opendj modification type for the supplied attribute modification type.

Parameters:
am - attribute modification type
Returns:
modification type


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.