Class LdapDataHelper
java.lang.Object
com.xebialabs.deployit.security.principaldata.LdapDataHelper
Utility class for handling LDAP data retrieval.
This class provides methods to read attributes from LDAP entries.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringreadStringAttribute(String entryName, org.springframework.ldap.core.DirContextOperations data, String attribute) Reads a string attribute from an LDAP entry.
-
Constructor Details
-
LdapDataHelper
public LdapDataHelper()
-
-
Method Details
-
readStringAttribute
public static String readStringAttribute(String entryName, org.springframework.ldap.core.DirContextOperations data, String attribute) Reads a string attribute from an LDAP entry.- Parameters:
entryName- The name of the LDAP entry from which to read the attribute.data- The DirContextOperations instance containing the LDAP data.attribute- The name of the attribute to read.- Returns:
- The value of the attribute as a String, or null if the attribute does not exist or cannot be cast to a String.
-