directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <elecha...@gmail.com>
Subject Re: [Boolean Valued Attributes] Should Java's "true" work?
Date Fri, 22 Jun 2007 20:53:58 GMT
System.out.println( true ) will *always print "true"/

Ok, which attributeType are you using ? It seems that it might be an
H/R attribute, so in tis case, you must do :
attributes.put( "yourHRattribute", Boolean.TRUE.toString() );

Btw, you might want to svn up : I have fixed the readible typo.

On 6/22/07, Ole Ersoy <ole.ersoy@gmail.com> wrote:
> I did use the Boolean syntax for the entry and I just tried it with Boolean.TRUE as the
value.  I still get this exception:
>
> javax.naming.NamingException: The value stored in an Human Readible attribute is not
a String
>         at org.apache.directory.server.core.schema.SchemaService.assertHumanReadible(SchemaService.java:1965)
>
> When I do this:
> System.out.println(true);  ... It prints "true", so I imagine that "true" is what is
sent over the wire to ADS.  Seems like this should be an OK value?
>
> Thoughts?
>
> Thanks,
> - Ole
>
>
> Emmanuel Lecharny wrote:
> > No, it won't work, I guess.
> >
> > You sould store an object into your attribute, like Boolean.TRUE.
> >
> > Be aware that your attribute syntax must also allow you to use booleans
> > values.
> >
> > On 6/22/07, Ole Ersoy <ole.ersoy@gmail.com> wrote:
> >> Hey Guys,
> >>
> >> I tried to create an entry containing an attribute like this:
> >>
> >> attributes.put("someBooleanTypeAttributeName", true);
> >>
> >> And got an exception (Noted in most recent JIRA filed).  Should that
> >> work?
> >>
> >> Thanks,
> >> - Ole
> >>
> >>
> >>
> >
> >
>


-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com

Mime
View raw message