directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: MultiValue attribute
Date Tue, 29 Jan 2013 14:55:01 GMT
Le 1/29/13 3:47 PM, Carlo.Accorsi@ibs-ag.com 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 


Mime
View raw message