Qore openldap Module 1.3.0
Loading...
Searching...
No Matches
LdapEntry Class Reference

Represents a single LDAP entry with convenient attribute access. More...

#include <LdapHelper.qm.dox.h>

Public Member Methods

void constructor (string dn, hash< auto > attributes)
 Creates a new LdapEntry.
 
auto getAttribute (string name)
 Gets an attribute value.
 
soft< string > getAttributeString (string name)
 Gets an attribute value as a string.
 
list< auto > getAttributeList (string name)
 Gets an attribute value as a list.
 
bool hasAttribute (string name)
 Checks if the entry has an attribute.
 
list< string > getAttributeNames ()
 Gets all attribute names.
 
string getRdnValue ()
 Gets the RDN value.
 
string getRdnType ()
 Gets the RDN type.
 
string getParent ()
 Gets the parent DN.
 
bool hasObjectClass (string objectClass)
 Checks if entry has a specific objectClass.
 
hash< auto > toHash ()
 Returns a hash representation.
 
string toString ()
 Returns a string representation.
 

Public Attributes

string dn
 The Distinguished Name of the entry.
 
LdapDn parsedDn
 Parsed DN.
 
hash< auto > attributes
 The entry's attributes.
 

Detailed Description

Represents a single LDAP entry with convenient attribute access.

Member Function Documentation

◆ constructor()

void LdapEntry::constructor ( string  dn,
hash< auto >  attributes 
)

Creates a new LdapEntry.

Parameters
dnthe distinguished name
attributesthe entry's attributes

◆ getAttribute()

auto LdapEntry::getAttribute ( string  name)

Gets an attribute value.

Parameters
namethe attribute name
Returns
the attribute value (string or list)

◆ getAttributeList()

list< auto > LdapEntry::getAttributeList ( string  name)

Gets an attribute value as a list.

Parameters
namethe attribute name
Returns
the values as a list

◆ getAttributeNames()

list< string > LdapEntry::getAttributeNames ( )

Gets all attribute names.

Returns
list of attribute names

◆ getAttributeString()

soft< string > LdapEntry::getAttributeString ( string  name)

Gets an attribute value as a string.

Parameters
namethe attribute name
Returns
the first value if multiple, or the single value

◆ hasAttribute()

bool LdapEntry::hasAttribute ( string  name)

Checks if the entry has an attribute.

Parameters
namethe attribute name
Returns
True if the attribute exists

◆ hasObjectClass()

bool LdapEntry::hasObjectClass ( string  objectClass)

Checks if entry has a specific objectClass.

Parameters
objectClassthe objectClass to check
Returns
True if the entry has the objectClass

The documentation for this class was generated from the following file: