RelyingPartyByTag require multiple entity attribute values
Cantor, Scott
cantor.2 at osu.edu
Wed Jun 10 19:52:12 EDT 2015
On 6/10/15, 6:43 PM, "users on behalf of Jeffrey Crawford" <users-bounces at shibboleth.net on behalf of jeffreyc at ucsc.edu> wrote:
>Well that was just the prompt I needed. I guess I just don't understand spring all that well. At first I had:
> <constructor-arg>
> <bean class="org.opensaml.saml.common.profile.logic.EntityGroupNamePredicate"
>
> c:groupName="urn:mace:ucsc.edu:metadata:local"/>
>
></constructor-arg>
That would work if the constructor argument were called groupName, but it's called names in that class def. It's called groupNames in the helper wrapper class I did that you probably copied that from. It's literally either done by position or by the actual name of the parameter in the class determined by introspection. Spring is wiring the classes directly, there's nothing in between doing any remapping of the names used.
If you do things inside Eclipse with the Spring Tool Suite, it even gives you autocomplete when you add things in some cases.
>But this seems to work as expected now:
><constructor-arg>
> <bean class="org.opensaml.saml.common.profile.logic.EntityGroupNamePredicate">
> <constructor-arg value="urn:mace:ucsc.edu:metadata:local"/>
> </bean>
></constructor-arg>
>
>Does the above look sane to you?
Yes, that's doing it by position. You're also implicitly constructing a list there because Spring will autowire a single value into a list-valued parameter. It's fine, just something to be aware of.
-- Scott
More information about the users
mailing list