Re: JNDI/LDAP and multivalued attributs
Re: JNDI/LDAP and multivalued attributs
- Subject: Re: JNDI/LDAP and multivalued attributs
- From: Chuck Hill <email@hidden>
- Date: Wed, 07 Jan 2004 13:40:52 -0800
Is this what you mean?
/**
* Returns an NSArray holding the value(s) from a potentially multi-valued
LDAP attribute. The
* JNDI adaptor will return these as (for example) null, String, and
NSArray if there are zero,
* one or more values. This method makes these into a consistent NSArray
return type. The
* NSArray will contain zero, one, or more instances respectively.
*
* @param object <code>Object</code> which is a potentially multi-valued
LDAP attribute
* @return an NSArray holding the value(s) from <code>object</code>
*/
public static NSArray ldapMultiValue(Object object) {
NSArray ldapMultiValue;
if (object == null) {
ldapMultiValue = NSArray.EmptyArray;
}
else if (object instanceof NSArray) {
ldapMultiValue = (NSArray)object;
}
else {
ldapMultiValue = new NSArray(object);
}
return ldapMultiValue;
}
Chuck
At 09:41 PM 07/01/2004 +0100, Lionel GUILLAUME wrote:
>Hi,
>
>I am using WebObjects with JNDI/LDAP. I read the example
>"DiscussionBoard" to understand
>who to create new entries ans it works fine for simple attributs, but I
>can't work
>with multivalued attributs (like uniquemenbers with groupofuniquenames
>objectclass).
>
>Does anybody how to work with multivalued attributs?
>_______________________________________________
>webobjects-dev mailing list | email@hidden
>Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>Do not post admin requests to the list. They will be ignored.
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.