iiitToolkit 1.0

de.iiit.ldap
Class LdapGenericObject

java.lang.Object
  |
  +--de.iiit.ldap.LdapGenericObject

public class LdapGenericObject
extends Object

Implements a generic LDAP object to store the information requested from the LDAP server

Version:
$Revision: 1.9 $ $Date: 2003/01/01 21:03:49 $

Constructor Summary
LdapGenericObject()
          Creates a new instance of LdapGenericObject
LdapGenericObject(LdapContext context, String name, String base)
          Creates a new instance of LdapGenericObject
 
Method Summary
 String getAbsoluteName()
          Retrieves the absolute name of object, which is a combination of the base name and the relative name
 Vector getAttribute(String key)
          Retrieves a single named attribute as a Vector of Strings
 Hashtable getAttributes()
          Retrieves the attributes of the object as a HashTable containing Vectors for each attribute.
 String getBase()
          Retrieves the base name of the object.
 String getName()
          Retrieves the object's name relative to the base
 void setAttribute(Attribute attribute)
          Add a attribute with its values to the generic object
 void setAttribute(String key, NamingEnumeration values)
          Add a attribute with its values to the generic object
 void setAttribute(String key, Vector values)
          Add a attribute with its values to the generic object
 void setAttributes(Attributes attributes)
          Add attributes with their values to the generic object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapGenericObject

public LdapGenericObject()
Creates a new instance of LdapGenericObject


LdapGenericObject

public LdapGenericObject(LdapContext context,
                         String name,
                         String base)
Creates a new instance of LdapGenericObject

Parameters:
context - The javax.naming.ldap.LdapContext containig the requested data
name - the name of the object relative to the base
base - the base name of the object
Method Detail

getName

public String getName()
Retrieves the object's name relative to the base

Returns:
the relative name.

getBase

public String getBase()
Retrieves the base name of the object. In most cases this is the search base used to request the objects from the LDAP server

Returns:
the base name

getAbsoluteName

public String getAbsoluteName()
Retrieves the absolute name of object, which is a combination of the base name and the relative name

Returns:
the absolute name.

getAttributes

public Hashtable getAttributes()
Retrieves the attributes of the object as a HashTable containing Vectors for each attribute.

Returns:
the attribute hash

getAttribute

public Vector getAttribute(String key)
Retrieves a single named attribute as a Vector of Strings

Parameters:
key - the name of attribute, eg. "cn"
Returns:
the Vector of all requested attribute values

setAttribute

public void setAttribute(String key,
                         Vector values)
Add a attribute with its values to the generic object

Parameters:
key - The name of the attribute
values - the Vector containing the values of the attribute represented as Strings

setAttribute

public void setAttribute(String key,
                         NamingEnumeration values)
                  throws NamingException
Add a attribute with its values to the generic object

Parameters:
key - The name of the attribute
values - the NamingEnumeration containing the values of the attribute represented as Strings
Throws:
NamingException - if a naming exception is encountered while attempting to retrieve the elements. See javax.naming.NamingException and its subclasses for the possible naming exceptions.

setAttribute

public void setAttribute(Attribute attribute)
                  throws NamingException
Add a attribute with its values to the generic object

Parameters:
attribute - The javax.naming.directory.Attribute to add to the generic object
Throws:
NamingException - if a naming exception is encountered while attempting to retrieve the elements. See javax.naming.NamingException and its subclasses for the possible naming exceptions.

setAttributes

public void setAttributes(Attributes attributes)
                   throws NamingException
Add attributes with their values to the generic object

Parameters:
attributes - The javax.naming.directory.Attributes to add to the generic object
Throws:
NamingException - if a naming exception is encountered while attempting to retrieve the elements. See javax.naming.NamingException and its subclasses for the possible naming exceptions.

iiitToolkit 1.0

Copyright © 2002, 2003 ingeneurbuero fuer innovative informationstechnik, Dipl.-Ing. Joerg Beckmann, Dortmund, Germany. All Rights Reserved.
See Copyright statement