Class LDAPGenericObject
java.lang.Object
de.hybris.platform.ldap.connection.LDAPGenericObject
Implements a generic LDAP object to store the information requested from the LDAP server
-
Constructor Summary
ConstructorsConstructorDescriptionLDAPGenericObject(ConfigValueObject config) Creates a new instance of LdapGenericObjectLDAPGenericObject(ConfigValueObject config, Attributes attribs) LDAPGenericObject(ConfigValueObject config, LdapContext context, String name, String base) Creates a new instance of LDAPGenericObjectLDAPGenericObject(ConfigValueObject config, LdapContext context, String name, String base, String hybrisTypeCode) Creates a new instance of LDAPGenericObjectLDAPGenericObject(SearchResult searchResult, String base) LDAPGenericObject(LdapContext context, String name, String base) Creates a new instance of LDAPGenericObjectLDAPGenericObject(LdapContext context, String name, String base, String hybrisTypeCode) Creates a new instance of LDAPGenericObject -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the absolute name of object, which is a combination of the base name and the relative namegetAttribute(String key) Retrieves a single named attribute as a List of StringsRetrieves the attributes of the object as a HashTable containing Lists for each attribute.getBase()Retrieves the base name of the object.getDN()getName()Retrieves the object's name relative to the basegetValue()voidsetAttribute(String key, List values) Add a attribute with its values to the generic objectvoidsetAttribute(String key, NamingEnumeration enumerationValues) Add a attribute with its values to the generic objectvoidsetAttribute(Attribute attribute) Add a attribute with its values to the generic objectvoidsetAttributes(Attributes attributes) Add attributes with their values to the generic objectvoidsetHybrisTypeCode(String code)
-
Constructor Details
-
LDAPGenericObject
Creates a new instance of LdapGenericObject- Throws:
NamingException
-
LDAPGenericObject
- Throws:
NamingException
-
LDAPGenericObject
- Parameters:
searchResult-base-- Throws:
NamingException
-
LDAPGenericObject
Creates a new instance of LDAPGenericObject- Parameters:
context- The javax.naming.ldap.LdapContext containig the requested dataname- the name of the object relative to the basebase- the base name of the object
-
LDAPGenericObject
Creates a new instance of LDAPGenericObject- Parameters:
context- The javax.naming.ldap.LdapContext containig the requested dataname- the name of the object relative to the basebase- the base name of the object
-
LDAPGenericObject
Creates a new instance of LDAPGenericObject- Parameters:
context- The javax.naming.ldap.LdapContext containig the requested dataname- the name of the object relative to the basebase- the base name of the objecthybrisTypeCode- the code of the type which is mapped to the objectClass of the corresponding ldap value
-
LDAPGenericObject
public LDAPGenericObject(ConfigValueObject config, LdapContext context, String name, String base, String hybrisTypeCode) Creates a new instance of LDAPGenericObject- Parameters:
context- The javax.naming.ldap.LdapContext containig the requested dataname- the name of the object relative to the basebase- the base name of the objecthybrisTypeCode- the code of the type which is mapped to the objectClass of the corresponding ldap value
-
-
Method Details
-
getName
Retrieves the object's name relative to the base- Returns:
- the relative name.
-
getBase
Retrieves the base name of the object. In most cases this is the search base used to request the objects from the LDAP server- Returns:
- the base name
-
getAbsoluteName
Retrieves the absolute name of object, which is a combination of the base name and the relative name- Returns:
- the absolute name.
-
getAttributes
Retrieves the attributes of the object as a HashTable containing Lists for each attribute.- Returns:
- the attribute hash
-
getAttribute
Retrieves a single named attribute as a List of Strings- Parameters:
key- the name of attribute, eg. "cn"- Returns:
- the List of all requested attribute values
-
setAttribute
Add a attribute with its values to the generic object- Parameters:
key- The name of the attributevalues- the List containing the values of the attribute represented as Strings
-
setAttribute
Add a attribute with its values to the generic object- Parameters:
key- The name of the attributeenumerationValues- the NamingEnumeration containing the values of the attribute represented as Strings- Throws:
NamingException- if a naming exception is encountered while attempting to retrieve the elements. See javax.naming.NamingException and its subclasses for the possible naming exceptions.
-
setAttribute
Add a attribute with its values to the generic object- Parameters:
attribute- The javax.naming.directory.Attribute to add to the generic object- Throws:
NamingException- if a naming exception is encountered while attempting to retrieve the elements. See javax.naming.NamingException and its subclasses for the possible naming exceptions.
-
setAttributes
Add attributes with their values to the generic object- Parameters:
attributes- The javax.naming.directory.Attributes to add to the generic object- Throws:
NamingException- if a naming exception is encountered while attempting to retrieve the elements. See javax.naming.NamingException and its subclasses for the possible naming exceptions.
-
setHybrisTypeCode
-
getHybrisTypeCode
-
getValue
-
getDN
-