How to determine which attribute is the 'name' attribute of a DirContext?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rich_Carpenter
Posted On:   Thursday, October 4, 2001 08:27 AM

Provided with a DirContext object, how can it be determined which of the Context's attributes is the one that serves as it's name? This seems to be related on objectClass. For instance in a person object class, it seems the attribute cn serves as the name attribute. Likewise, for an organizationalUnit object class, the ou attribute serves as the name and with an organization object class the o attribute serves as the name. I understand there is a getNameInNamespace method, but for my purposes that has the disadvantage of returning a value with the same 'case' that was used to lookup the context. I am    More>>

Provided with a DirContext object, how can it be determined
which of the Context's attributes is the one that serves as it's
name?


This seems to be related on objectClass. For instance in a
person object class, it seems the attribute cn serves
as the name attribute. Likewise, for an organizationalUnit
object class, the ou attribute serves as the name and
with an organization object class the o attribute
serves as the name.


I understand there is a getNameInNamespace method, but for
my purposes that has the disadvantage of returning a value
with the same 'case' that was used to lookup the context. I am
interested in obtaining the value in a case sensitive fashion,
i.e. with the same 'case' used to initially create the context.

   <<Less
About | Sitemap | Contact