Hi all.
I'm trying to pass a map of values into a Hivemind service and I'm hitting problems. I'm coming from Spring, so the Spring version looks like this:
<bean id="userDetailsService" class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl">
<property name="userMap">
<value>
robert.cole@db.com,ROLE_SUPERUSER
tom.nugent@db.com,ROLE_DATA_ADMINISTRATOR
fred,ROLE_SUPPORT
</value>
</property>
</bean>
Spring translates the "value" attribute into a Properties object with the specified values. Now that I'm in Hivemind, how do I represent the map (its treated as a Properties object within the InMemoryDaoImpl) in Hivemind? I've tried the code below but I get an error that the value attribute is not being set. I can't find any Hivemind documentation about how to specify that the value is a Properties object (or a map)
<implementation service-id="hivemind.acegi.dao.UserDetailsService">
<invoke-factory>
<construct class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl">
<set-object property="userMap">
<value>
robert.cole@db.com=ROLE_SUPERUSER
tom.nugent@db.com=ROLE_DATA_ADMINISTRATOR
fred=ROLE_SUPPORT
</value>
</set-object>
</construct>
</invoke-factory>
</implementation>
I'm suspecting that I need to use a Property Editor to translate some text into a Properties object but I'm in the dark here. Any help would be appreciated.
Thanks,
Rob Cole
---
This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Thanks Shing, looks useful
Rob Cole
CSA Web
+44 (0)20 754 51117
Shing Hing Man <ma...@yahoo.com>
04/09/2006 13:37 To
Tapestry users <us...@tapestry.apache.org>
cc
Please respond to
"Tapestry users" <us...@tapestry.apache.org> Subject
Re: Specifying a map of values in Hivemind? (Tapestry-Acegi related)
You might like to check out example 7 on
http://lombok.demon.co.uk/hiveMind/welcome
Shing
--- Robert Cole <ro...@db.com> wrote:
>
> Hi all.
>
> I'm trying to pass a map of values into a Hivemind
> service and I'm hitting problems. I'm coming from
> Spring, so the Spring version looks like this:
>
> <bean id="userDetailsService"
>
class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl">
> <property name="userMap">
> <value>
> robert.cole@db.com,ROLE_SUPERUSER
> tom.nugent@db.com,ROLE_DATA_ADMINISTRATOR
> fred,ROLE_SUPPORT
> </value>
> </property>
> </bean>
>
> Spring translates the "value" attribute into a
> Properties object with the specified values. Now
> that I'm in Hivemind, how do I represent the map
> (its treated as a Properties object within the
> InMemoryDaoImpl) in Hivemind? I've tried the code
> below but I get an error that the value attribute is
> not being set. I can't find any Hivemind
> documentation about how to specify that the value is
> a Properties object (or a map)
>
> <implementation
> service-id="hivemind.acegi.dao.UserDetailsService">
> <invoke-factory>
> <construct
>
class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl">
> <set-object property="userMap">
> <value>
> robert.cole@db.com=ROLE_SUPERUSER
>
> tom.nugent@db.com=ROLE_DATA_ADMINISTRATOR
> fred=ROLE_SUPPORT
> </value>
> </set-object>
> </construct>
> </invoke-factory>
> </implementation>
>
> I'm suspecting that I need to use a Property Editor
> to translate some text into a Properties object but
> I'm in the dark here. Any help would be appreciated.
>
> Thanks,
>
> Rob Cole
>
> ---
>
> This e-mail may contain confidential and/or
> privileged information. If you
> are not the intended recipient (or have received
> this e-mail in error)
> please notify the sender immediately and destroy
> this e-mail. Any
> unauthorized copying, disclosure or distribution of
> the material in this
> e-mail is strictly forbidden.
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
>
>
Home page :
http://uk.geocities.com/matmsh/index.html
___________________________________________________________
Inbox full of spam? Get leading spam protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---
This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
You might like to check out example 7 on http://lombok.demon.co.uk/hiveMind/welcome Shing --- Robert Cole <ro...@db.com> wrote: > > Hi all. > > I'm trying to pass a map of values into a Hivemind > service and I'm hitting problems. I'm coming from > Spring, so the Spring version looks like this: > > <bean id="userDetailsService" > class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl"> > <property name="userMap"> > <value> > robert.cole@db.com,ROLE_SUPERUSER > tom.nugent@db.com,ROLE_DATA_ADMINISTRATOR > fred,ROLE_SUPPORT > </value> > </property> > </bean> > > Spring translates the "value" attribute into a > Properties object with the specified values. Now > that I'm in Hivemind, how do I represent the map > (its treated as a Properties object within the > InMemoryDaoImpl) in Hivemind? I've tried the code > below but I get an error that the value attribute is > not being set. I can't find any Hivemind > documentation about how to specify that the value is > a Properties object (or a map) > > <implementation > service-id="hivemind.acegi.dao.UserDetailsService"> > <invoke-factory> > <construct > class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl"> > <set-object property="userMap"> > <value> > robert.cole@db.com=ROLE_SUPERUSER > > tom.nugent@db.com=ROLE_DATA_ADMINISTRATOR > fred=ROLE_SUPPORT > </value> > </set-object> > </construct> > </invoke-factory> > </implementation> > > I'm suspecting that I need to use a Property Editor > to translate some text into a Properties object but > I'm in the dark here. Any help would be appreciated. > > Thanks, > > Rob Cole > > --- > > This e-mail may contain confidential and/or > privileged information. If you > are not the intended recipient (or have received > this e-mail in error) > please notify the sender immediately and destroy > this e-mail. Any > unauthorized copying, disclosure or distribution of > the material in this > e-mail is strictly forbidden. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > users-unsubscribe@tapestry.apache.org > For additional commands, e-mail: > users-help@tapestry.apache.org > > Home page : http://uk.geocities.com/matmsh/index.html ___________________________________________________________ Inbox full of spam? Get leading spam protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org For additional commands, e-mail: users-help@tapestry.apache.org