Class AbstractLdapAttributes<T extends java.util.Map<java.lang.String,​LdapAttribute>>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAttribute​(LdapAttribute a)
      This adds a new attribute to this LdapAttributes.
      void addAttribute​(java.lang.String name, java.lang.Object value)
      This adds a new attribute to this LdapAttributes with the supplied name and value.
      void addAttribute​(java.lang.String name, java.util.List<?> values)
      This adds a new attribute to this LdapAttributes with the supplied name and values.
      void addAttributes​(java.util.Collection<LdapAttribute> c)
      This adds a Collection of attributes to this LdapAttributes.
      void addAttributes​(javax.naming.directory.Attributes a)
      This adds the attributes in the supplied Attributes to this LdapAttributes.
      void clear()
      This removes all attributes from this LdapAttributes.
      LdapAttribute getAttribute​(java.lang.String name)
      This returns the LdapAttribute for this LdapAttributes with the supplied name.
      java.lang.String[] getAttributeNames()
      This returns an array of all the attribute names for this LdapAttributes.
      java.util.Collection<LdapAttribute> getAttributes()
      This returns a Collection of LdapAttribute for this LdapAttributes.
      int hashCode()
      This returns the hash code for this object.
      void removeAttribute​(LdapAttribute a)
      This removes an attribute from this LdapAttributes.
      void removeAttribute​(java.lang.String name)
      This removes the attribute with the supplied name.
      void removeAttributes​(java.util.Collection<LdapAttribute> c)
      This removes a Collection of attributes from this LdapAttributes.
      void removeAttributes​(javax.naming.directory.Attributes a)
      This removes the attributes in the supplied Attributes from this LdapAttributes.
      int size()
      This returns the number of attributes in this attributes.
      javax.naming.directory.Attributes toAttributes()
      This returns an Attributes that represents this entry.
      java.lang.String toString()
      This returns a string representation of this object.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DEFAULT_IGNORE_CASE

        public static final boolean DEFAULT_IGNORE_CASE
        Whether to ignore case when creating BasicAttributes.
        See Also:
        Constant Field Values
      • HASH_CODE_SEED

        protected static final int HASH_CODE_SEED
        hash code seed.
        See Also:
        Constant Field Values
      • attributes

        protected T extends java.util.Map<java.lang.String,​LdapAttribute> attributes
        Attributes contained in this bean.
    • Constructor Detail

      • AbstractLdapAttributes

        public AbstractLdapAttributes​(LdapBeanFactory lbf)
        Creates a new AbstractLdapAttributes with the supplied ldap bean factory.
        Parameters:
        lbf - LdapBeanFactory
    • Method Detail

      • getAttributes

        public java.util.Collection<LdapAttribute> getAttributes()
        This returns a Collection of LdapAttribute for this LdapAttributes.
        Specified by:
        getAttributes in interface LdapAttributes
        Returns:
        List
      • getAttribute

        public LdapAttribute getAttribute​(java.lang.String name)
        This returns the LdapAttribute for this LdapAttributes with the supplied name.
        Specified by:
        getAttribute in interface LdapAttributes
        Parameters:
        name - String
        Returns:
        LdapAttribute
      • getAttributeNames

        public java.lang.String[] getAttributeNames()
        This returns an array of all the attribute names for this LdapAttributes.
        Specified by:
        getAttributeNames in interface LdapAttributes
        Returns:
        String[]
      • addAttribute

        public void addAttribute​(LdapAttribute a)
        This adds a new attribute to this LdapAttributes.
        Specified by:
        addAttribute in interface LdapAttributes
        Parameters:
        a - LdapAttribute
      • addAttribute

        public void addAttribute​(java.lang.String name,
                                 java.lang.Object value)
        This adds a new attribute to this LdapAttributes with the supplied name and value.
        Specified by:
        addAttribute in interface LdapAttributes
        Parameters:
        name - String
        value - Object
      • addAttribute

        public void addAttribute​(java.lang.String name,
                                 java.util.List<?> values)
        This adds a new attribute to this LdapAttributes with the supplied name and values.
        Specified by:
        addAttribute in interface LdapAttributes
        Parameters:
        name - String
        values - List
      • addAttributes

        public void addAttributes​(java.util.Collection<LdapAttribute> c)
        This adds a Collection of attributes to this LdapAttributes. The collection should contain LdapAttribute objects.
        Specified by:
        addAttributes in interface LdapAttributes
        Parameters:
        c - Collection
      • addAttributes

        public void addAttributes​(javax.naming.directory.Attributes a)
                           throws javax.naming.NamingException
        This adds the attributes in the supplied Attributes to this LdapAttributes.
        Specified by:
        addAttributes in interface LdapAttributes
        Parameters:
        a - Attributes
        Throws:
        javax.naming.NamingException - if the attributes cannot be read
      • removeAttribute

        public void removeAttribute​(LdapAttribute a)
        This removes an attribute from this LdapAttributes.
        Specified by:
        removeAttribute in interface LdapAttributes
        Parameters:
        a - LdapAttribute
      • removeAttribute

        public void removeAttribute​(java.lang.String name)
        This removes the attribute with the supplied name.
        Specified by:
        removeAttribute in interface LdapAttributes
        Parameters:
        name - String
      • removeAttributes

        public void removeAttributes​(java.util.Collection<LdapAttribute> c)
        This removes a Collection of attributes from this LdapAttributes. The collection should contain LdapAttribute objects.
        Specified by:
        removeAttributes in interface LdapAttributes
        Parameters:
        c - Collection
      • removeAttributes

        public void removeAttributes​(javax.naming.directory.Attributes a)
                              throws javax.naming.NamingException
        This removes the attributes in the supplied Attributes from this LdapAttributes.
        Specified by:
        removeAttributes in interface LdapAttributes
        Parameters:
        a - Attributes
        Throws:
        javax.naming.NamingException - if the attributes cannot be read
      • size

        public int size()
        This returns the number of attributes in this attributes.
        Specified by:
        size in interface LdapAttributes
        Returns:
        int
      • clear

        public void clear()
        This removes all attributes from this LdapAttributes.
        Specified by:
        clear in interface LdapAttributes
      • hashCode

        public int hashCode()
        This returns the hash code for this object.
        Specified by:
        hashCode in class AbstractLdapBean
        Returns:
        int
      • toString

        public java.lang.String toString()
        This returns a string representation of this object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String
      • toAttributes

        public javax.naming.directory.Attributes toAttributes()
        This returns an Attributes that represents this entry.
        Specified by:
        toAttributes in interface LdapAttributes
        Returns:
        Attributes