com.atlassian.crowd.directory.ldap.util
Class DirectoryAttributeRetriever
java.lang.Object
com.atlassian.crowd.directory.ldap.util.DirectoryAttributeRetriever
public class DirectoryAttributeRetriever
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryAttributeRetriever
public DirectoryAttributeRetriever()
getValueFromAttributes
public static String getValueFromAttributes(String directoryAttributeName,
Attributes directoryAttributes)
- Retrieves the first value from the collection of attributes for the
supplied name directoryAttributeName. If no value exists or if the value
is not safe for XML marshalling,
null
is returned.
- Parameters:
directoryAttributeName
- attribute name key.directoryAttributes
- collection of attributes to examine.
- Returns:
- first attribute value.
getValueFromExternalIdAttribute
public static String getValueFromExternalIdAttribute(String externalIdAttribute,
Attributes directoryAttributes)
- Retrieves the first value from the collection of attributes for the
supplied name externalIdAttribute. If name of the attribute is empty
or no value for attribute exists empty string is returned
- Parameters:
externalIdAttribute
- name of external Id attributedirectoryAttributes
- collection of attributes
- Returns:
- null if there is no attribute name,
empty string if there is no value for an attribute name,
value of attribute otherwise
Copyright © 2013 Atlassian. All Rights Reserved.