com.candle.roma.kxc
Class RomaDirectoryItem

java.lang.Object
  |
  +--com.candle.roma.kxc.RomaDirectoryItem

public class RomaDirectoryItem
extends java.lang.Object

This class encapsalates a Roma directory item that has been retrieved from the Roma directory using the RomaDirectoryAgent class.

The class is constructed by calling the item()method on RomaDirectoryAgent.

See Also:
RomaDirectoryAgent

Field Summary
static int BUF_HEADER_SIZE
           
static int BUF_RES_SIZE
           
 
Constructor Summary
RomaDirectoryItem(java.lang.String dn, java.lang.String objectClass)
          Constructor All new items must have an objectclass attribute, so this is mandated in the constructor.
 
Method Summary
 void addAttribute(java.lang.String name, java.lang.String value)
          Add attribute to item.
 java.lang.String attributeName()
          Returns name of the first attribute
 java.lang.String attributeName(int attribute)
          Returns name of nth attribute.
 int attributes()
          Returns the number of attributes
 java.lang.String attributeValue()
          Returns value of the first attribute
 java.lang.String attributeValue(int attribute)
          Returns value of nth attribute.
 java.lang.String attributeValue(java.lang.String name)
          Returns value of first occurrence of named attribute
 java.lang.String attributeValue(java.lang.String name, int attribute)
          Returns value of nth occurrence of named attribute
 java.lang.String dn()
          Retrieves the distinguished name
 void setDN(java.lang.String disname)
          Set the distinguished name
 void setItemMustExist(boolean f)
          Specify if an item with the same DN must or must not exist at the time that a DirectoryAgent attempts to store this item By default, the update is forced through.
 void setItemMustNotExist(boolean f)
          Specify if an item with the same DN must or must not exist at the time that a DirectoryAgent attempts to store this item By default, the update is forced through.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUF_HEADER_SIZE

public static final int BUF_HEADER_SIZE

BUF_RES_SIZE

public static final int BUF_RES_SIZE
Constructor Detail

RomaDirectoryItem

public RomaDirectoryItem(java.lang.String dn,
                         java.lang.String objectClass)
Constructor All new items must have an objectclass attribute, so this is mandated in the constructor. The dn and all the added attributes must be consistent with any LDAP scheme which is in force.
Method Detail

dn

public java.lang.String dn()
Retrieves the distinguished name
Returns:
String containing distinguished name

setDN

public void setDN(java.lang.String disname)
Set the distinguished name
Parameters:
name - distiguished name.

addAttribute

public void addAttribute(java.lang.String name,
                         java.lang.String value)
Add attribute to item. setDN() must be called prior to addAttribute().
Parameters:
name - attribute name.
value - attribute value.

attributes

public int attributes()
Returns the number of attributes
Returns:
number of attributes

attributeValue

public java.lang.String attributeValue()
Returns value of the first attribute
Returns:
value of attribute

attributeValue

public java.lang.String attributeValue(int attribute)
Returns value of nth attribute. The attributes are number from 0
Parameters:
attribute - number of attribute
Returns:
value of attribute

attributeName

public java.lang.String attributeName()
Returns name of the first attribute
Returns:
value of attribute

attributeName

public java.lang.String attributeName(int attribute)
Returns name of nth attribute. The attributes are number from 0.
Parameters:
attribute - number of attribute
Returns:
value of attribute

attributeValue

public java.lang.String attributeValue(java.lang.String name)
Returns value of first occurrence of named attribute
Parameters:
name - name of attribute
Returns:
value of attribute

attributeValue

public java.lang.String attributeValue(java.lang.String name,
                                       int attribute)
Returns value of nth occurrence of named attribute
Parameters:
name - name of attribute
attribute - number of occurrence attribute
Returns:
value of attribute

setItemMustExist

public void setItemMustExist(boolean f)
Specify if an item with the same DN must or must not exist at the time that a DirectoryAgent attempts to store this item By default, the update is forced through.
Parameters:
f - if true an item with the same DN must exist, if false an item with the same DN must not exist

setItemMustNotExist

public void setItemMustNotExist(boolean f)
Specify if an item with the same DN must or must not exist at the time that a DirectoryAgent attempts to store this item By default, the update is forced through.
Parameters:
f - if true an item with the same DN must not exist, if false an item with the same DN must exist