Le 1/29/13 3:47 PM, [email protected] a écrit :
> Hi,
> Congrats on the new releases!  I'm In the process of refactoring all our JNDI 
> code to ApacheDS API :)
>
> The attribute 'member' in our schema  for users is used to store group DN's a 
> user is a member of.
>
> We sometimes need to manipulate this group String[] with other logic and 
> therefore need to retrieve it from the directory.
> I can see if the list is the same with .contains but I can't figure out how 
> to get  an array  of values out of an Attribute..?
>
> http://directory.apache.org/api/gen-docs/latest/apidocs/
There is no method that returns a list of values.

However, you don't really need such a method : you can iterate on the
values :

for ( Value<?> value : attribute )
{
    // Do whatever you need with the value...
}

I don't know if it fits your need...


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to