All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.vt.middleware.ldap.bean.LdapAttributes Maven / Gradle / Ivy

There is a newer version: 3.3.9
Show newest version
/*
  $Id: LdapAttributes.java 1330 2010-05-23 22:10:53Z dfisher $

  Copyright (C) 2003-2010 Virginia Tech.
  All rights reserved.

  SEE LICENSE FOR MORE INFORMATION

  Author:  Middleware Services
  Email:   [email protected]
  Version: $Revision: 1330 $
  Updated: $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
*/
package edu.vt.middleware.ldap.bean;

import java.util.Collection;
import java.util.List;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;

/**
 * LdapAttributes represents a collection of ldap attribute.
 *
 * @author  Middleware Services
 * @version  $Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
 */
public interface LdapAttributes
{


  /**
   * This returns a Collection of LdapAttribute for
   * this LdapAttributes.
   *
   * @return  List
   */
  Collection getAttributes();


  /**
   * This returns the LdapAttribute for this 
   * LdapAttributes with the supplied name.
   *
   * @param  name  String
   *
   * @return  LdapAttribute
   */
  LdapAttribute getAttribute(final String name);


  /**
   * This returns an array of all the attribute names for this 
   * LdapAttributes.
   *
   * @return  String[]
   */
  String[] getAttributeNames();


  /**
   * This adds a new attribute to this LdapAttributes.
   *
   * @param  a  LdapAttribute
   */
  void addAttribute(final LdapAttribute a);


  /**
   * This adds a new attribute to this LdapAttributes with the
   * supplied name and value.
   *
   * @param  name  String
   * @param  value  Object
   */
  void addAttribute(final String name, final Object value);


  /**
   * This adds a new attribute to this LdapAttributes with the
   * supplied name and values.
   *
   * @param  name  String
   * @param  values  List
   */
  void addAttribute(final String name, final List values);


  /**
   * This adds a Collection of attributes to this 
   * LdapAttributes. The collection should contain 
   * LdapAttribute objects.
   *
   * @param  c  Collection
   */
  void addAttributes(final Collection c);


  /**
   * This adds the attributes in the supplied Attributes to this
   * LdapAttributes.
   *
   * @param  a  Attributes
   *
   * @throws  NamingException  if the attributes cannot be read
   */
  void addAttributes(final Attributes a)
    throws NamingException;


  /**
   * This removes an attribute from this LdapAttributes.
   *
   * @param  a  LdapAttribute
   */
  void removeAttribute(final LdapAttribute a);


  /**
   * This removes the attribute with the supplied name.
   *
   * @param  name  String
   */
  void removeAttribute(final String name);


  /**
   * This removes a Collection of attributes from this 
   * LdapAttributes. The collection should contain 
   * LdapAttribute objects.
   *
   * @param  c  Collection
   */
  void removeAttributes(final Collection c);


  /**
   * This removes the attributes in the supplied Attributes from
   * this LdapAttributes.
   *
   * @param  a  Attributes
   *
   * @throws  NamingException  if the attributes cannot be read
   */
  void removeAttributes(final Attributes a)
    throws NamingException;


  /**
   * This returns the number of attributes in this attributes.
   *
   * @return  int
   */
  int size();


  /** This removes all attributes from this LdapAttributes. */
  void clear();


  /**
   * This returns an Attributes that represents this entry.
   *
   * @return  Attributes
   */
  Attributes toAttributes();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy