|
LDAPJDK 4.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--netscape.ldap.LDAPEntry
Represents an entry in the directory.
| Constructor Summary | |
LDAPEntry()
Constructs an empty entry. |
|
LDAPEntry(java.lang.String distinguishedName)
Constructs a new entry with the specified distinguished name and with an empty attribute set. |
|
LDAPEntry(java.lang.String distinguishedName,
LDAPAttributeSet attrs)
Constructs a new entry with the specified distinguished name and set of attributes. |
|
| Method Summary | |
LDAPAttribute |
getAttribute(java.lang.String attrName)
In an entry, returns the single attribute that exactly matches the specified attribute name. |
LDAPAttribute |
getAttribute(java.lang.String attrName,
java.lang.String lang)
Returns the subtype that matches "attrName" and that best matches a language specification "lang". |
LDAPAttributeSet |
getAttributeSet()
Returns the attribute set of the entry. |
LDAPAttributeSet |
getAttributeSet(java.lang.String subtype)
Creates a new attribute set containing only the attributes that have the specified subtypes. |
java.lang.String |
getDN()
Returns the distinguished name of the current entry. |
java.lang.String |
toString()
Retrieves the string representation of the entry's distinguished name (DN) and its attributes. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public LDAPEntry()
public LDAPEntry(java.lang.String distinguishedName)
distinguishedName - the distinguished name of the new entry
public LDAPEntry(java.lang.String distinguishedName,
LDAPAttributeSet attrs)
distinguishedName - the distinguished name of the new entryattrs - the set of attributes to assign to the new entryLDAPAttributeSet| Method Detail |
public java.lang.String getDN()
public LDAPAttributeSet getAttributeSet()
LDAPAttributeSetpublic LDAPAttributeSet getAttributeSet(java.lang.String subtype)
For example, suppose an entry contains the following attributes:
cn cn;lang-ja sn;phonetic;lang-ja sn;lang-usIf you call the
getAttributeSet method and pass
lang-ja as the argument, the method returns
an attribute set containing the following attributes:
cn;lang-ja sn;phonetic;lang-ja
subtype - semi-colon delimited list of subtypes
that you want to find in attribute names.
"lang-ja" // Only Japanese language subtypes
"binary" // Only binary subtypes
"binary;lang-ja" // Only Japanese language subtypes
which also are binary
LDAPAttributeSet,
LDAPAttributeSet.getSubset(java.lang.String)public LDAPAttribute getAttribute(java.lang.String attrName)
attrName - name of attribute to return
For example:
"cn" // Only a non-subtyped version of cn
"cn;lang-ja" // Only a Japanese version of cn, will not
// return "cn;lang-ja-JP-kanji", for example
LDAPAttribute
public LDAPAttribute getAttribute(java.lang.String attrName,
java.lang.String lang)
Assume the entry contains only the following attributes:
cn;lang-en
cn;lang-ja-JP-kanji
sn
getAttribute( "cn" ) returns null.
getAttribute( "sn" ) returns the "sn" attribute.
getAttribute( "cn", "lang-en-us" ) returns the "cn;lang-en" attribute.
getAttribute( "cn", "lang-en" ) returns the "cn;lang-en" attribute.
getAttribute( "cn", "lang-ja" ) returns null.
getAttribute( "sn", "lang-en" ) returns the "sn" attribute.
attrName - name of attribute to find in the entrylang - a language specification (for example, lang-en)LDAPAttributepublic java.lang.String toString()
LDAPEntry: uid=bjensen, ou=People, o=airius.com; LDAPAttributeSet:
LDAPAttribute {type='cn', values='Barbara Jensen,Babs Jensen'}
LDAPAttribute {type='sn', values='Jensen'}LDAPAttribute {type='givenname',
values='Barbara'}LDAPAttribute {type='objectclass', values='top,person,
organizationalPerson,inetOrgPerson'}LDAPAttribute {type='ou',
values='Product Development,People'}
|
LDAPJDK 4.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||