KLDAP::LdapObject

KLDAP::LdapObject Class Reference

#include <ldapobject.h>

Public Member Functions

 LdapObject (const QString &dn)
 
 LdapObject (const LdapObject &that)
 
void addValue (const QString &attributeName, const QByteArray &value)
 
const LdapAttrMapattributes () const
 
void clear ()
 
LdapDN dn () const
 
bool hasAttribute (const QString &attributeName) const
 
LdapObjectoperator= (const LdapObject &that)
 
void setAttributes (const LdapAttrMap &attrs)
 
void setDn (const LdapDN &dn)
 
void setDn (const QString &dn)
 
void setValues (const QString &attributeName, const LdapAttrValue &values)
 
QString toString () const
 
QByteArray value (const QString &attributeName) const
 
LdapAttrValue values (const QString &attributeName) const
 

Detailed Description

This class represents an LDAP Object.

Definition at line 30 of file ldapobject.h.

Member Function Documentation

void LdapObject::addValue ( const QString attributeName,
const QByteArray value 
)

Adds the given value to the specified attribute.

If the given attribute not exists, then it's created.

Parameters
attributeNamethe attribute for which to add a value
valuethe attribute value to add

Definition at line 112 of file ldapobject.cpp.

const LdapAttrMap & LdapObject::attributes ( ) const

Returns the attributes and their values.

Definition at line 82 of file ldapobject.cpp.

void LdapObject::clear ( )

Clears the name and attributes of the object.

Definition at line 101 of file ldapobject.cpp.

LdapDN LdapObject::dn ( ) const

Return the Distinguished Name of the object.

Definition at line 77 of file ldapobject.cpp.

bool LdapObject::hasAttribute ( const QString attributeName) const

Returns true if the given attributethe exists, false otherwise.

Definition at line 135 of file ldapobject.cpp.

void LdapObject::setAttributes ( const LdapAttrMap attrs)

Sets the attributes and attribute values of the object.

Definition at line 72 of file ldapobject.cpp.

void LdapObject::setDn ( const LdapDN &  dn)

Sets the Distinguished Name of the object.

Definition at line 62 of file ldapobject.cpp.

void LdapObject::setDn ( const QString dn)

Sets the Distinguished Name of the object.

Definition at line 67 of file ldapobject.cpp.

void LdapObject::setValues ( const QString attributeName,
const LdapAttrValue values 
)

Sets the given attribute values.

If the given attribute not exists, then it's created, if exists, it's overwritten.

Parameters
attributeNamethe attribute name for which to set values
valuesthe values of attribute to set

Definition at line 107 of file ldapobject.cpp.

QString LdapObject::toString ( ) const

Returns the text presentation (LDIF format) of the object.

Definition at line 87 of file ldapobject.cpp.

QByteArray LdapObject::value ( const QString attributeName) const

Returns the first value of the attribute with the given name or an empty byte array if the attribute does not exists.

Definition at line 126 of file ldapobject.cpp.

LdapAttrValue LdapObject::values ( const QString attributeName) const

Returns all values of the attribute with the given name.

Definition at line 117 of file ldapobject.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 5 2020 23:08:21 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.