com.ibm.b2bi.im
Class DirectoryServices
java.lang.Object
|
+--com.ibm.b2bi.im.DirectoryServices
- public class DirectoryServices
- extends java.lang.Object
Method Summary |
void |
createEntry(java.lang.Object dnString,
java.lang.Object objectClass,
java.lang.Object attrValues)
Creates an entry into LDAP. |
void |
modifyEntry(java.lang.Object dnString,
java.lang.Object addList,
java.lang.Object modifyList,
java.lang.Object deleteList)
Modifies an entry in LDAP for a given DN string or a Vector of DN strings. |
java.util.Hashtable |
queryEntry(java.lang.String dn)
Queries the LDAP and returns the dataset for the given DN string. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
copyrightNotice
public static final java.lang.String copyrightNotice
DirectoryServices
public DirectoryServices()
throws DirectoryServicesException
- DirectoryServices constructor.
createEntry
public void createEntry(java.lang.Object dnString,
java.lang.Object objectClass,
java.lang.Object attrValues)
throws DirectoryServicesException
- Creates an entry into LDAP. You can either insert data for one LDAP object in a single call or
insert multiple objects, not necessarily of same type.
If the data types of the parameters received are Vector, then it assumes that multiple object instances
are to be inserted.
- Parameters:
dnString
- Of type String when only one object is to be inserted. This is the 'dn' string required to identify the node in the LDAP data tree where this should be added.
If more than one object needs to be inserted, it should be Vector of Strings.objectClass
- This is a String containing the name of the LDAP object being inserted to LDAP.
If more than one object instance needs to be referred in single insert, this should be a Vector of Strings.
If more than one entry needs to be inserted, it should be Vector. Individual values in the Vector should either
be a String or a Vector depending on the list of LDAP object that needs to be referred to insert that single entry.attrValues
- This is a Hashtable containing name value pairs of attributes of the object. If a specific attribute can hold a list of values, then the value for the corresponding
key in the Hashtable should be of type Vector of Strings.
If more than one object needs to be inserted, this should be a Vector of Hashtables.
modifyEntry
public void modifyEntry(java.lang.Object dnString,
java.lang.Object addList,
java.lang.Object modifyList,
java.lang.Object deleteList)
throws DirectoryServicesException
- Modifies an entry in LDAP for a given DN string or a Vector of DN strings. In addition to the DN string you have to
provide three sets of name/value pairs one each for adding list of attributes to the object, modify values for existing
attributes and to delete an attribute's value in the object.
These name/value pairs can either be a Hashtable or Vector of Hashtables. Each entry in a Hashtable can either be a String
or a Vector of Strings. Vector of Strings is used in case the attribute is a multi value type.
- Parameters:
dnString
- java.lang.ObjectaddList
- java.lang.ObjectmodifyList
- java.lang.ObjectdeleteList
- java.lang.Object
queryEntry
public java.util.Hashtable queryEntry(java.lang.String dn)
throws DirectoryServicesException
- Queries the LDAP and returns the dataset for the given DN string.
- Parameters:
dn
- java.lang.String- Returns:
- java.util.Hashtable Returns name value pairs with value being
a Vector of Strings depending on the number of values
for each attribute. Returns an empty Hashtable if no entries are found.