|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.ldap.LDAPEntry
Represents a single entry in a directory, consisting of a distinguished name (DN) and zero or more attributes.
An instance of LDAPEntry is created in order to add an entry to a directory, and instances of LDAPEntry are returned on a search by enumerating an LDAPSearchResults.
LDAPAttribute
,
LDAPAttributeSet
,
Serialized FormField Summary | |
protected LDAPAttributeSet |
attrs
|
protected java.lang.String |
dn
|
Constructor Summary | |
LDAPEntry()
Constructs an empty entry. |
|
LDAPEntry(java.lang.String dn)
Constructs a new entry with the specified distinguished name and with an empty attribute set. |
|
LDAPEntry(java.lang.String dn,
LDAPAttributeSet attrs)
Constructs a new entry with the specified distinguished name and set of attributes. |
Method Summary | |
int |
compareTo(java.lang.Object entry)
Compares this object with the specified object for order. |
LDAPAttribute |
getAttribute(java.lang.String attrName)
Returns the attributes matching the specified attrName. |
LDAPAttributeSet |
getAttributeSet()
Returns the attribute set of the entry. |
LDAPAttributeSet |
getAttributeSet(java.lang.String subtype)
Returns an attribute set from the entry, consisting of only those attributes matching the specified subtypes. |
java.lang.String |
getDN()
Returns the distinguished name of the entry. |
static java.lang.Object |
readDSML(java.io.InputStream input)
This method is used to deserialize the DSML encoded representation of this class. |
void |
readExternal(java.io.ObjectInput in)
Reads the serialized object from the underlying input stream. |
java.lang.String |
toString()
Returns a string representation of this LDAPEntry |
void |
writeDSML(java.io.OutputStream oout)
This method does DSML serialization of the instance. |
void |
writeExternal(java.io.ObjectOutput out)
Writes the object state to a stream in XML format |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String dn
protected LDAPAttributeSet attrs
Constructor Detail |
public LDAPEntry()
public LDAPEntry(java.lang.String dn)
dn
- The distinguished name of the entry. The
value is not validated. An invalid distinguished
name will cause operations using this entry to fail.public LDAPEntry(java.lang.String dn, LDAPAttributeSet attrs)
dn
- The distinguished name of the new entry. The
value is not validated. An invalid distinguished
name will cause operations using this entry to fail.
attrs
- The initial set of attributes assigned to the
entry.Method Detail |
public LDAPAttribute getAttribute(java.lang.String attrName)
attrName
- The name of the attribute or attributes to return.
public LDAPAttributeSet getAttributeSet()
All base and subtype variants of all attributes are returned. The LDAPAttributeSet returned may be empty if there are no attributes in the entry.
public LDAPAttributeSet getAttributeSet(java.lang.String subtype)
The getAttributeSet method can be used to extract only a particular language variant subtype of each attribute, if it exists. The "subtype" may be, for example, "lang-ja", "binary", or "lang-ja;phonetic". If more than one subtype is specified, separated with a semicolon, only those attributes with all of the named subtypes will be returned. The LDAPAttributeSet returned may be empty if there are no matching attributes in the entry.
subtype
- One or more subtype specification(s), separated
with semicolons. The "lang-ja" and
"lang-en;phonetic" are valid subtype
specifications.
public java.lang.String getDN()
public int compareTo(java.lang.Object entry)
Ordering is determined by comparing normalized DN values
(see getDN()
and
LDAPDN.normalize(java.lang.String)
) using the
compareTo method of the String class.
compareTo
in interface java.lang.Comparable
entry
- Entry to compare to
public java.lang.String toString()
public void writeDSML(java.io.OutputStream oout) throws java.io.IOException
oout
- Outputstream where the serialzed data has to be written
java.io.IOException
- if write fails on OutputStreampublic static java.lang.Object readDSML(java.io.InputStream input) throws java.io.IOException
input
- InputStream for the DSML formatted data.
java.io.IOException
- when serialization fails.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The ObjectOutput stream where the Object in XML format
is being written to
java.io.IOException
- - If I/O errors occurpublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- The ObjectInput stream where the Serialized Object is being read from
java.io.IOException
- - If I/O errors occur
java.lang.ClassNotFoundException
- - If the class for an object being restored
cannot be found.
|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |