Class UnboundIDUtils


  • public class UnboundIDUtils
    extends Object
    Provides methods for converting between Unbound ID specific objects and ldaptive specific objects.
    • Field Detail

      • sortBehavior

        private final SortBehavior sortBehavior
        Ldap result sort behavior.
      • binaryAttrs

        private List<String> binaryAttrs
        Attributes that should be treated as binary.
    • 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 entry
        c - response controls
        id - 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