org.ldaptive.provider.netscape
Class NetscapeUtils

java.lang.Object
  extended by org.ldaptive.provider.netscape.NetscapeUtils

public class NetscapeUtils
extends Object

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

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Field Summary
protected static String[] DEFAULT_BINARY_ATTRS
          Default binary attributes.
 
Constructor Summary
NetscapeUtils()
          Default constructor.
NetscapeUtils(org.ldaptive.SortBehavior sb)
          Creates a new netscape util.
 
Method Summary
 netscape.ldap.LDAPModificationSet fromAttributeModification(org.ldaptive.AttributeModification[] am)
          Returns netscape modifications using the supplied attribute modifications.
 netscape.ldap.LDAPAttribute fromLdapAttribute(org.ldaptive.LdapAttribute la)
          Returns a netscape attribute that represents the values in the supplied ldap attribute.
 netscape.ldap.LDAPAttributeSet fromLdapAttributes(Collection<org.ldaptive.LdapAttribute> c)
          Returns a list of netscape attribute that represents the values in the supplied ldap attributes.
 netscape.ldap.LDAPEntry fromLdapEntry(org.ldaptive.LdapEntry le)
          Returns a netscape ldap entry that represents the supplied ldap entry.
static netscape.ldap.LDAPSortKey[] fromSortKey(org.ldaptive.control.SortKey[] sk)
          Returns netscape sort keys using the supplied sort keys.
 List<String> getBinaryAttributes()
          Returns the list of binary attributes.
protected static int getModificationType(org.ldaptive.AttributeModificationType am)
          Returns the netscape modification type for the supplied attribute modification type.
 void setBinaryAttributes(String[] s)
          Sets the list of binary attributes.
 org.ldaptive.LdapAttribute toLdapAttribute(netscape.ldap.LDAPAttribute a)
          Returns an ldap attribute using the supplied netscape attribute.
 org.ldaptive.SearchEntry toSearchEntry(netscape.ldap.LDAPEntry e, org.ldaptive.control.ResponseControl[] c, int id)
          Returns a search entry using the supplied netscape entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BINARY_ATTRS

protected static final String[] DEFAULT_BINARY_ATTRS
Default binary attributes.

Constructor Detail

NetscapeUtils

public NetscapeUtils()
Default constructor.


NetscapeUtils

public NetscapeUtils(org.ldaptive.SortBehavior sb)
Creates a new netscape 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 netscape.ldap.LDAPAttribute fromLdapAttribute(org.ldaptive.LdapAttribute la)
Returns a netscape attribute that represents the values in the supplied ldap attribute.

Parameters:
la - ldap attribute
Returns:
netscape attribute

toLdapAttribute

public org.ldaptive.LdapAttribute toLdapAttribute(netscape.ldap.LDAPAttribute a)
Returns an ldap attribute using the supplied netscape attribute.

Parameters:
a - netscape attribute
Returns:
ldap attribute

fromLdapAttributes

public netscape.ldap.LDAPAttributeSet fromLdapAttributes(Collection<org.ldaptive.LdapAttribute> c)
Returns a list of netscape attribute that represents the values in the supplied ldap attributes.

Parameters:
c - ldap attributes
Returns:
netscape attributes

toSearchEntry

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

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

fromLdapEntry

public netscape.ldap.LDAPEntry fromLdapEntry(org.ldaptive.LdapEntry le)
Returns a netscape ldap entry that represents the supplied ldap entry.

Parameters:
le - ldap entry
Returns:
netscape ldap entry

fromAttributeModification

public netscape.ldap.LDAPModificationSet fromAttributeModification(org.ldaptive.AttributeModification[] am)
Returns netscape modifications using the supplied attribute modifications.

Parameters:
am - attribute modifications
Returns:
netscape modifications

fromSortKey

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

Parameters:
sk - sort keys
Returns:
netscape sort keys

getModificationType

protected static int getModificationType(org.ldaptive.AttributeModificationType am)
Returns the netscape modification type for the supplied attribute modification type.

Parameters:
am - attribute modification type
Returns:
modification type


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