Oracle Email Java API Reference
Release 2(9.0.4)

B10724-01

oracle.mail.sdk.ldap
Class DirectoryObject

java.lang.Object
  |
  +--oracle.mail.sdk.ldap.DirectoryObject

public class DirectoryObject
extends java.lang.Object

This class represents a email server ldap object (eg., mailuser, list etc). It contains the of the list of mandatory and optional attributes such an email server ldap object can have. From this object, the metadata for the attributes can be retrieved. This class also contains methods for setting the values of attributes for add and modify operations for that particular type of ldap object.


Method Summary
 java.util.Vector getAttributeValue(java.lang.String attribName)
          This method returns the value of an attribute for an add or lookup operation.
 java.util.Vector getMandatoryAttribs()
          This method returns the mandatory attributes for an email server ldap object, for example, mailuser, distribution list etc.
 DirectoryAttributeMetaData getMetaData(java.lang.String attribName)
          This method returns the meta data associated with an attribute.
 java.util.Vector getOptionalAttribs()
          This method returns the optional attributes for an email server ldap object, for example, mailuser, distribution list etc.
 void modifyAttributeValue(java.lang.String attribName, java.util.Vector attribValues, java.lang.String modType)
          This method is used to set the attribute values and the modification type (Add, Delete or Replace).
 void setAttributeValue(java.lang.String attribName, java.lang.String attribValue)
          This method is used to set the attribute values for an add operation.
 void setAttributeValue(java.lang.String attribName, java.util.Vector attribValues)
          This method is used to set the attribute values for an add operation.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

getMandatoryAttribs

public java.util.Vector getMandatoryAttribs()
This method returns the mandatory attributes for an email server ldap object, for example, mailuser, distribution list etc.
Parameters:
void -  
Returns:
a Vector of Strings where each String is the name of the mandatory attribute, null if the ldap entry doesn't have any mandatory attribute

getOptionalAttribs

public java.util.Vector getOptionalAttribs()
This method returns the optional attributes for an email server ldap object, for example, mailuser, distribution list etc.
Parameters:
void -  
Returns:
a Vector of Strings where each String is the name of the optional attribute, null if the ldap entry doesn't have any optional attribute

getMetaData

public DirectoryAttributeMetaData getMetaData(java.lang.String attribName)
                                       throws DirectoryException
This method returns the meta data associated with an attribute.
Parameters:
attribName - The name of the attribute
Returns:
attribute meta data
Throws:
DirectoryException - Throws DirectoryException if it doesn't contain the attribute or any error is encountered.

getAttributeValue

public java.util.Vector getAttributeValue(java.lang.String attribName)
                                   throws DirectoryException
This method returns the value of an attribute for an add or lookup operation. Refer DirectoryAccess class method documentation for details.
Parameters:
attribName - The name of the attribute
Returns:
A Vector of Strings containing the values of the attribute, null if no value is set
Throws:
DirectoryException - Throws DirectoryException if it doesn't contain the attribute or any error is encountered.

setAttributeValue

public void setAttributeValue(java.lang.String attribName,
                              java.util.Vector attribValues)
                       throws DirectoryException
This method is used to set the attribute values for an add operation.
Parameters:
attribName - The name of the attribute
attribValues - A Vector of Strings containing the values of the attribute
Returns:
void
Throws:
DirectoryException - Throws DirectoryException if it doesn't contain the attribute or any error is encountered.

setAttributeValue

public void setAttributeValue(java.lang.String attribName,
                              java.lang.String attribValue)
                       throws DirectoryException
This method is used to set the attribute values for an add operation. When this method is called multiple times, it keeps adding values to the same attribute. For eg., if it's called twice setAttributeValue("mail","1") and setAttributeValue("mail","2"), then it adds values "1" and "2" to the same "mail" attribute.
Parameters:
attribName - The name of the attribute
attribValue - The value of the attribute
Returns:
void
Throws:
DirectoryException - Throws DirectoryException if it doesn't contain the attribute or any error is encountered.

modifyAttributeValue

public void modifyAttributeValue(java.lang.String attribName,
                                 java.util.Vector attribValues,
                                 java.lang.String modType)
                          throws DirectoryException
This method is used to set the attribute values and the modification type (Add, Delete or Replace).
Parameters:
attribName - The name of the attribute
attribValues - The values of the attribute
modType - The type of modification. Possible values for this are the following.
DirectoryConstants.DS_MODIFY_ADD : This adds the new values to the existing values of the attribute
DirectoryConstants.DS_MODIFY_DELETE) : This deletes a particular value from the existing values of the attribute
DirectoryConstants.DS_MODIFY_REPLACE : This replaces the existing values of the attribute with the given new value
Returns:
void
Throws:
DirectoryException - Throws DirectoryException if it doesn't contain the attribute or any error is encountered.

Oracle Email Java API Reference
Release 2(9.0.4)

B10724-01

Copyright © 1988, 2003 Oracle Corporation. All Rights Reserved.