us.openinternet.luge.transformer.LDAPobjectclass
Class Top

java.lang.Object
  |
  +--us.openinternet.luge.transformer.LDAPobjectclass.Top
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GroupOfNames, Person

public class Top
extends java.lang.Object
implements java.io.Serializable

All classes in the LDAPobjectclasses package are utilized by the Transformers. Unless you are using the Transformers directly, you will not need to use these objects.

See Also:
Serialized Form

Field Summary
 netscape.ldap.LDAPAttributeSet internalAttributes
           
 
Constructor Summary
protected Top()
          This constructor initializes the internals.
protected Top(netscape.ldap.LDAPEntry entry)
           
 
Method Summary
 void addObjectClass(java.lang.String className)
          Add an objectclass entry to the list for this object.
 java.lang.String getBase()
           
 java.lang.String getDn()
           
 netscape.ldap.LDAPEntry getEntry()
          This method will return a raw LDAPEntry object suitible to pass into the LDAPConnection.add() method.
 java.lang.String getIdentifyingAttribute()
          Get the identifying attribute whose first value will be used to construct the Relative DN for this entry if/when it is first added to the directory.
 java.lang.String getLdapAttribute(java.lang.String attrName)
          Returns the value of the attribute named by the parameter value.
 java.lang.String[] getLdapAttributeValues(java.lang.String attrName)
          Returns the values of the attribute named by the parameter value.
 java.lang.String listAttributes()
          Generate a text-list of all the LDAP attributes currently known for this object
 void replaceLdapAttribute(java.lang.String attrName, java.lang.String attrVal)
          Replaces the value of one attribute, with anothoer.
 void setAllAttributes(java.util.Hashtable newAttrs)
           
 void setBase(java.lang.String baseDn)
          Set all of the attributes for this object in one fell swoop.
 void setDn(java.lang.String dn)
           
 void setIdentifyingAttribute(java.lang.String att)
          Force the entry to use the provided identifying attribute to construct the relative DN if/when it is added to the directory.
 void setLdapAttribute(java.lang.String attrName, java.lang.String attrVal)
          Set one attribute, with the name specified, to the value specified.
 void setLdapAttributeValues(java.lang.String attrName, java.lang.String[] attrVals)
          Set one attribute, with the name specified, to the values specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

internalAttributes

public netscape.ldap.LDAPAttributeSet internalAttributes
Constructor Detail

Top

protected Top()
This constructor initializes the internals.


Top

protected Top(netscape.ldap.LDAPEntry entry)
Method Detail

addObjectClass

public void addObjectClass(java.lang.String className)
Add an objectclass entry to the list for this object. Each subsidiary object in the heirarchy should use this in the constructor to add it's own distinguishing objectclass name, after invoking super().


setLdapAttribute

public void setLdapAttribute(java.lang.String attrName,
                             java.lang.String attrVal)
Set one attribute, with the name specified, to the value specified. Note that this method is currently limited, and does not handle multi-valued attributes correctly.


replaceLdapAttribute

public void replaceLdapAttribute(java.lang.String attrName,
                                 java.lang.String attrVal)
Replaces the value of one attribute, with anothoer. Note that this method will delete multi-vauled attributes with the new supplied value. Also, like setLdapAttribute, this method handles only single values.


getLdapAttribute

public java.lang.String getLdapAttribute(java.lang.String attrName)
Returns the value of the attribute named by the parameter value. Note that this is limited, and does not handle multi-value entries correctly. (Returns only the first element).

Returns:
java.lang.String -- Value of the attribute.

getLdapAttributeValues

public java.lang.String[] getLdapAttributeValues(java.lang.String attrName)
Returns the values of the attribute named by the parameter value.

Returns:
java.lang.String[] -- Values of the attribute.

setLdapAttributeValues

public void setLdapAttributeValues(java.lang.String attrName,
                                   java.lang.String[] attrVals)
Set one attribute, with the name specified, to the values specified.


listAttributes

public java.lang.String listAttributes()
Generate a text-list of all the LDAP attributes currently known for this object

Returns:
String -- Comma-separated list of attribute keys and values.

setAllAttributes

public void setAllAttributes(java.util.Hashtable newAttrs)

setBase

public void setBase(java.lang.String baseDn)
Set all of the attributes for this object in one fell swoop.


getBase

public java.lang.String getBase()

setIdentifyingAttribute

public void setIdentifyingAttribute(java.lang.String att)
Force the entry to use the provided identifying attribute to construct the relative DN if/when it is added to the directory.


getIdentifyingAttribute

public java.lang.String getIdentifyingAttribute()
Get the identifying attribute whose first value will be used to construct the Relative DN for this entry if/when it is first added to the directory.

Returns:
Name of the attribute

getDn

public java.lang.String getDn()

setDn

public void setDn(java.lang.String dn)

getEntry

public netscape.ldap.LDAPEntry getEntry()
This method will return a raw LDAPEntry object suitible to pass into the LDAPConnection.add() method.


Copyright 2003, Michael Schwartz All Rights Reserved.